Home
last modified time | relevance | path

Searched refs:pvmw (Results 1 – 13 of 13) sorted by relevance

/linux-6.6.21/mm/
Dpage_vma_mapped.c10 static inline bool not_found(struct page_vma_mapped_walk *pvmw) in not_found() argument
12 page_vma_mapped_walk_done(pvmw); in not_found()
16 static bool map_pte(struct page_vma_mapped_walk *pvmw, spinlock_t **ptlp) in map_pte() argument
20 if (pvmw->flags & PVMW_SYNC) { in map_pte()
22 pvmw->pte = pte_offset_map_lock(pvmw->vma->vm_mm, pvmw->pmd, in map_pte()
23 pvmw->address, &pvmw->ptl); in map_pte()
24 *ptlp = pvmw->ptl; in map_pte()
25 return !!pvmw->pte; in map_pte()
35 pvmw->pte = pte_offset_map_nolock(pvmw->vma->vm_mm, pvmw->pmd, in map_pte()
36 pvmw->address, ptlp); in map_pte()
[all …]
Drmap.c808 DEFINE_FOLIO_VMA_WALK(pvmw, folio, vma, address, 0); in folio_referenced_one()
811 while (page_vma_mapped_walk(&pvmw)) { in folio_referenced_one()
812 address = pvmw.address; in folio_referenced_one()
815 (!folio_test_large(folio) || !pvmw.pte)) { in folio_referenced_one()
817 mlock_vma_folio(folio, vma, !pvmw.pte); in folio_referenced_one()
818 page_vma_mapped_walk_done(&pvmw); in folio_referenced_one()
823 if (pvmw.pte) { in folio_referenced_one()
825 pte_young(ptep_get(pvmw.pte))) { in folio_referenced_one()
826 lru_gen_look_around(&pvmw); in folio_referenced_one()
831 pvmw.pte)) in folio_referenced_one()
[all …]
Dpage_idle.c56 DEFINE_FOLIO_VMA_WALK(pvmw, folio, vma, addr, 0); in page_idle_clear_pte_refs_one()
59 while (page_vma_mapped_walk(&pvmw)) { in page_idle_clear_pte_refs_one()
60 addr = pvmw.address; in page_idle_clear_pte_refs_one()
61 if (pvmw.pte) { in page_idle_clear_pte_refs_one()
66 if (ptep_clear_young_notify(vma, addr, pvmw.pte)) in page_idle_clear_pte_refs_one()
69 if (pmdp_clear_young_notify(vma, addr, pvmw.pmd)) in page_idle_clear_pte_refs_one()
Dmigrate.c186 DEFINE_FOLIO_VMA_WALK(pvmw, old, vma, addr, PVMW_SYNC | PVMW_MIGRATION); in remove_migration_pte()
188 while (page_vma_mapped_walk(&pvmw)) { in remove_migration_pte()
198 idx = linear_page_index(vma, pvmw.address) - pvmw.pgoff; in remove_migration_pte()
203 if (!pvmw.pte) { in remove_migration_pte()
206 remove_migration_pmd(&pvmw, new); in remove_migration_pte()
213 old_pte = ptep_get(pvmw.pte); in remove_migration_pte()
252 hugepage_add_anon_rmap(new, vma, pvmw.address, in remove_migration_pte()
256 set_huge_pte_at(vma->vm_mm, pvmw.address, pvmw.pte, pte, in remove_migration_pte()
262 page_add_anon_rmap(new, vma, pvmw.address, in remove_migration_pte()
266 set_pte_at(vma->vm_mm, pvmw.address, pvmw.pte, pte); in remove_migration_pte()
[all …]
Dksm.c1099 DEFINE_PAGE_VMA_WALK(pvmw, page, vma, 0, 0); in write_protect_page()
1106 pvmw.address = page_address_in_vma(page, vma); in write_protect_page()
1107 if (pvmw.address == -EFAULT) in write_protect_page()
1112 mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, mm, pvmw.address, in write_protect_page()
1113 pvmw.address + PAGE_SIZE); in write_protect_page()
1116 if (!page_vma_mapped_walk(&pvmw)) in write_protect_page()
1118 if (WARN_ONCE(!pvmw.pte, "Unexpected PMD mapping?")) in write_protect_page()
1122 entry = ptep_get(pvmw.pte); in write_protect_page()
1126 flush_cache_page(vma, pvmw.address, page_to_pfn(page)); in write_protect_page()
1141 entry = ptep_clear_flush(vma, pvmw.address, pvmw.pte); in write_protect_page()
[all …]
Dinternal.h676 static inline unsigned long vma_address_end(struct page_vma_mapped_walk *pvmw) in vma_address_end() argument
678 struct vm_area_struct *vma = pvmw->vma; in vma_address_end()
683 if (pvmw->nr_pages == 1) in vma_address_end()
684 return pvmw->address + PAGE_SIZE; in vma_address_end()
686 pgoff = pvmw->pgoff + pvmw->nr_pages; in vma_address_end()
Dhuge_memory.c3204 int set_pmd_migration_entry(struct page_vma_mapped_walk *pvmw, in set_pmd_migration_entry() argument
3207 struct vm_area_struct *vma = pvmw->vma; in set_pmd_migration_entry()
3209 unsigned long address = pvmw->address; in set_pmd_migration_entry()
3215 if (!(pvmw->pmd && !pvmw->pte)) in set_pmd_migration_entry()
3219 pmdval = pmdp_invalidate(vma, address, pvmw->pmd); in set_pmd_migration_entry()
3224 set_pmd_at(mm, address, pvmw->pmd, pmdval); in set_pmd_migration_entry()
3245 set_pmd_at(mm, address, pvmw->pmd, pmdswp); in set_pmd_migration_entry()
3253 void remove_migration_pmd(struct page_vma_mapped_walk *pvmw, struct page *new) in remove_migration_pmd() argument
3255 struct vm_area_struct *vma = pvmw->vma; in remove_migration_pmd()
3257 unsigned long address = pvmw->address; in remove_migration_pmd()
[all …]
Dvmscan.c4650 void lru_gen_look_around(struct page_vma_mapped_walk *pvmw) in lru_gen_look_around() argument
4657 pte_t *pte = pvmw->pte; in lru_gen_look_around()
4658 unsigned long addr = pvmw->address; in lru_gen_look_around()
4659 struct vm_area_struct *vma = pvmw->vma; in lru_gen_look_around()
4660 struct folio *folio = pfn_folio(pvmw->pfn); in lru_gen_look_around()
4668 lockdep_assert_held(pvmw->ptl); in lru_gen_look_around()
4671 if (spin_is_contended(pvmw->ptl)) in lru_gen_look_around()
4748 update_bloom_filter(lruvec, max_seq, pvmw->pmd); in lru_gen_look_around()
/linux-6.6.21/mm/damon/
Dpaddr.c22 DEFINE_FOLIO_VMA_WALK(pvmw, folio, vma, addr, 0); in __damon_pa_mkold()
24 while (page_vma_mapped_walk(&pvmw)) { in __damon_pa_mkold()
25 addr = pvmw.address; in __damon_pa_mkold()
26 if (pvmw.pte) in __damon_pa_mkold()
27 damon_ptep_mkold(pvmw.pte, vma, addr); in __damon_pa_mkold()
29 damon_pmdp_mkold(pvmw.pmd, vma, addr); in __damon_pa_mkold()
86 DEFINE_FOLIO_VMA_WALK(pvmw, folio, vma, addr, 0); in __damon_pa_young()
89 while (page_vma_mapped_walk(&pvmw)) { in __damon_pa_young()
90 addr = pvmw.address; in __damon_pa_young()
91 if (pvmw.pte) { in __damon_pa_young()
[all …]
/linux-6.6.21/include/linux/
Drmap.h415 static inline void page_vma_mapped_walk_done(struct page_vma_mapped_walk *pvmw) in page_vma_mapped_walk_done() argument
418 if (pvmw->pte && !is_vm_hugetlb_page(pvmw->vma)) in page_vma_mapped_walk_done()
419 pte_unmap(pvmw->pte); in page_vma_mapped_walk_done()
420 if (pvmw->ptl) in page_vma_mapped_walk_done()
421 spin_unlock(pvmw->ptl); in page_vma_mapped_walk_done()
424 bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw);
Dswapops.h488 extern int set_pmd_migration_entry(struct page_vma_mapped_walk *pvmw,
491 extern void remove_migration_pmd(struct page_vma_mapped_walk *pvmw,
521 static inline int set_pmd_migration_entry(struct page_vma_mapped_walk *pvmw, in set_pmd_migration_entry() argument
527 static inline void remove_migration_pmd(struct page_vma_mapped_walk *pvmw, in remove_migration_pmd() argument
Dmmzone.h492 void lru_gen_look_around(struct page_vma_mapped_walk *pvmw);
584 static inline void lru_gen_look_around(struct page_vma_mapped_walk *pvmw) in lru_gen_look_around() argument
/linux-6.6.21/kernel/events/
Duprobes.c159 DEFINE_FOLIO_VMA_WALK(pvmw, old_folio, vma, addr, 0); in __replace_page()
178 if (!page_vma_mapped_walk(&pvmw)) in __replace_page()
180 VM_BUG_ON_PAGE(addr != pvmw.address, old_page); in __replace_page()
195 flush_cache_page(vma, addr, pte_pfn(ptep_get(pvmw.pte))); in __replace_page()
196 ptep_clear_flush(vma, addr, pvmw.pte); in __replace_page()
198 set_pte_at_notify(mm, addr, pvmw.pte, in __replace_page()
204 page_vma_mapped_walk_done(&pvmw); in __replace_page()