mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 05:31:37 -04:00
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>
This commit is contained in:
committed by
Andrew Morton
parent
5a97000678
commit
37fb436ff6
@@ -1819,7 +1819,7 @@ static inline int pmdp_clear_flush_young_notify(struct vm_area_struct *vma,
|
||||
return young;
|
||||
}
|
||||
|
||||
static inline int ptep_clear_young_notify(struct vm_area_struct *vma,
|
||||
static inline int ptep_test_and_clear_young_notify(struct vm_area_struct *vma,
|
||||
unsigned long addr, pte_t *ptep)
|
||||
{
|
||||
int young;
|
||||
@@ -1829,7 +1829,7 @@ static inline int ptep_clear_young_notify(struct vm_area_struct *vma,
|
||||
return young;
|
||||
}
|
||||
|
||||
static inline int pmdp_clear_young_notify(struct vm_area_struct *vma,
|
||||
static inline int pmdp_test_and_clear_young_notify(struct vm_area_struct *vma,
|
||||
unsigned long addr, pmd_t *pmdp)
|
||||
{
|
||||
int young;
|
||||
@@ -1843,8 +1843,8 @@ static inline int pmdp_clear_young_notify(struct vm_area_struct *vma,
|
||||
|
||||
#define clear_flush_young_ptes_notify clear_flush_young_ptes
|
||||
#define pmdp_clear_flush_young_notify pmdp_clear_flush_young
|
||||
#define ptep_clear_young_notify ptep_test_and_clear_young
|
||||
#define pmdp_clear_young_notify pmdp_test_and_clear_young
|
||||
#define ptep_test_and_clear_young_notify ptep_test_and_clear_young
|
||||
#define pmdp_test_and_clear_young_notify pmdp_test_and_clear_young
|
||||
|
||||
#endif /* CONFIG_MMU_NOTIFIER */
|
||||
|
||||
|
||||
@@ -3533,7 +3533,7 @@ static bool walk_pte_range(pmd_t *pmd, unsigned long start, unsigned long end,
|
||||
if (!folio)
|
||||
continue;
|
||||
|
||||
if (!ptep_clear_young_notify(args->vma, addr, pte + i))
|
||||
if (!ptep_test_and_clear_young_notify(args->vma, addr, pte + i))
|
||||
continue;
|
||||
|
||||
if (last != folio) {
|
||||
@@ -3624,7 +3624,7 @@ static void walk_pmd_range_locked(pud_t *pud, unsigned long addr, struct vm_area
|
||||
if (!folio)
|
||||
goto next;
|
||||
|
||||
if (!pmdp_clear_young_notify(vma, addr, pmd + i))
|
||||
if (!pmdp_test_and_clear_young_notify(vma, addr, pmd + i))
|
||||
goto next;
|
||||
|
||||
if (last != folio) {
|
||||
@@ -4214,7 +4214,7 @@ bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw)
|
||||
lockdep_assert_held(pvmw->ptl);
|
||||
VM_WARN_ON_ONCE_FOLIO(folio_test_lru(folio), folio);
|
||||
|
||||
if (!ptep_clear_young_notify(vma, addr, pte))
|
||||
if (!ptep_test_and_clear_young_notify(vma, addr, pte))
|
||||
return false;
|
||||
|
||||
if (spin_is_contended(pvmw->ptl))
|
||||
@@ -4260,7 +4260,7 @@ bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw)
|
||||
if (!folio)
|
||||
continue;
|
||||
|
||||
if (!ptep_clear_young_notify(vma, addr, pte + i))
|
||||
if (!ptep_test_and_clear_young_notify(vma, addr, pte + i))
|
||||
continue;
|
||||
|
||||
if (last != folio) {
|
||||
|
||||
Reference in New Issue
Block a user