Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/huge_memory: use mm instead of tlb->mm

Reduce the repetition, and lay the ground for further refactorings by
keeping this variable separate.

Link: https://lkml.kernel.org/r/98104cde87e4b2aabeb16f236b8731591594457f.1774029655.git.ljs@kernel.org
Signed-off-by: Lorenzo Stoakes (Oracle) <ljs@kernel.org>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Cc: Barry Song <baohua@kernel.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Lance Yang <lance.yang@linux.dev>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Nico Pache <npache@redhat.com>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Lorenzo Stoakes (Oracle) and committed by
Andrew Morton
1c6b7ff6 1fc034c1

+4 -3
+4 -3
mm/huge_memory.c
··· 2415 2415 pmd_t *pmd, unsigned long addr) 2416 2416 { 2417 2417 bool has_deposit = arch_needs_pgtable_deposit(); 2418 + struct mm_struct *mm = tlb->mm; 2418 2419 struct folio *folio = NULL; 2419 2420 bool flush_needed = false; 2420 2421 spinlock_t *ptl; ··· 2463 2462 2464 2463 if (folio_test_anon(folio)) { 2465 2464 has_deposit = true; 2466 - add_mm_counter(tlb->mm, MM_ANONPAGES, -HPAGE_PMD_NR); 2465 + add_mm_counter(mm, MM_ANONPAGES, -HPAGE_PMD_NR); 2467 2466 } else { 2468 - add_mm_counter(tlb->mm, mm_counter_file(folio), 2467 + add_mm_counter(mm, mm_counter_file(folio), 2469 2468 -HPAGE_PMD_NR); 2470 2469 2471 2470 /* ··· 2484 2483 2485 2484 out: 2486 2485 if (has_deposit) 2487 - zap_deposited_table(tlb->mm, pmd); 2486 + zap_deposited_table(mm, pmd); 2488 2487 2489 2488 spin_unlock(ptl); 2490 2489 if (flush_needed)