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: rename ptep/pmdp_clear_young_notify() to ptep/pmdp_test_and_clear_young_notify()

Rename ptep/pmdp_clear_young_notify() to
ptep/pmdp_test_and_clear_young_notify() to make the function names
consistent.

Link: https://lkml.kernel.org/r/b3454077ce88745e6f88386b1763721746884565.1772778858.git.baolin.wang@linux.alibaba.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Suggested-by: David Hildenbrand (Arm) <david@kernel.org>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Jann Horn <jannh@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes (Oracle) <ljs@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Rik van Riel <riel@surriel.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Wei Xu <weixugc@google.com>
Cc: Will Deacon <will@kernel.org>
Cc: Yuanchu Xie <yuanchu@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Baolin Wang and committed by
Andrew Morton
37fb436f 5a970006

+8 -8
+4 -4
mm/internal.h
··· 1819 1819 return young; 1820 1820 } 1821 1821 1822 - static inline int ptep_clear_young_notify(struct vm_area_struct *vma, 1822 + static inline int ptep_test_and_clear_young_notify(struct vm_area_struct *vma, 1823 1823 unsigned long addr, pte_t *ptep) 1824 1824 { 1825 1825 int young; ··· 1829 1829 return young; 1830 1830 } 1831 1831 1832 - static inline int pmdp_clear_young_notify(struct vm_area_struct *vma, 1832 + static inline int pmdp_test_and_clear_young_notify(struct vm_area_struct *vma, 1833 1833 unsigned long addr, pmd_t *pmdp) 1834 1834 { 1835 1835 int young; ··· 1843 1843 1844 1844 #define clear_flush_young_ptes_notify clear_flush_young_ptes 1845 1845 #define pmdp_clear_flush_young_notify pmdp_clear_flush_young 1846 - #define ptep_clear_young_notify ptep_test_and_clear_young 1847 - #define pmdp_clear_young_notify pmdp_test_and_clear_young 1846 + #define ptep_test_and_clear_young_notify ptep_test_and_clear_young 1847 + #define pmdp_test_and_clear_young_notify pmdp_test_and_clear_young 1848 1848 1849 1849 #endif /* CONFIG_MMU_NOTIFIER */ 1850 1850
+4 -4
mm/vmscan.c
··· 3533 3533 if (!folio) 3534 3534 continue; 3535 3535 3536 - if (!ptep_clear_young_notify(args->vma, addr, pte + i)) 3536 + if (!ptep_test_and_clear_young_notify(args->vma, addr, pte + i)) 3537 3537 continue; 3538 3538 3539 3539 if (last != folio) { ··· 3624 3624 if (!folio) 3625 3625 goto next; 3626 3626 3627 - if (!pmdp_clear_young_notify(vma, addr, pmd + i)) 3627 + if (!pmdp_test_and_clear_young_notify(vma, addr, pmd + i)) 3628 3628 goto next; 3629 3629 3630 3630 if (last != folio) { ··· 4214 4214 lockdep_assert_held(pvmw->ptl); 4215 4215 VM_WARN_ON_ONCE_FOLIO(folio_test_lru(folio), folio); 4216 4216 4217 - if (!ptep_clear_young_notify(vma, addr, pte)) 4217 + if (!ptep_test_and_clear_young_notify(vma, addr, pte)) 4218 4218 return false; 4219 4219 4220 4220 if (spin_is_contended(pvmw->ptl)) ··· 4260 4260 if (!folio) 4261 4261 continue; 4262 4262 4263 - if (!ptep_clear_young_notify(vma, addr, pte + i)) 4263 + if (!ptep_test_and_clear_young_notify(vma, addr, pte + i)) 4264 4264 continue; 4265 4265 4266 4266 if (last != folio) {