/linux-6.6.21/mm/ |
D | rmap.c | 90 static inline struct anon_vma *anon_vma_alloc(void) in anon_vma_alloc() 92 struct anon_vma *anon_vma; in anon_vma_alloc() local 94 anon_vma = kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL); in anon_vma_alloc() 95 if (anon_vma) { in anon_vma_alloc() 96 atomic_set(&anon_vma->refcount, 1); in anon_vma_alloc() 97 anon_vma->num_children = 0; in anon_vma_alloc() 98 anon_vma->num_active_vmas = 0; in anon_vma_alloc() 99 anon_vma->parent = anon_vma; in anon_vma_alloc() 104 anon_vma->root = anon_vma; in anon_vma_alloc() 107 return anon_vma; in anon_vma_alloc() [all …]
|
D | mmap.c | 291 struct anon_vma *anon_vma = vma->anon_vma; in validate_mm() local 315 if (anon_vma) { in validate_mm() 316 anon_vma_lock_read(anon_vma); in validate_mm() 319 anon_vma_unlock_read(anon_vma); in validate_mm() 355 anon_vma_interval_tree_remove(avc, &avc->anon_vma->rb_root); in anon_vma_interval_tree_pre_update_vma() 364 anon_vma_interval_tree_insert(avc, &avc->anon_vma->rb_root); in anon_vma_interval_tree_post_update_vma() 434 vp->anon_vma = vma->anon_vma; in init_multi_vma_prep() 438 if (!vp->anon_vma && next) in init_multi_vma_prep() 439 vp->anon_vma = next->anon_vma; in init_multi_vma_prep() 485 if (vp->anon_vma) { in vma_prepare() [all …]
|
D | migrate.c | 1041 struct anon_vma *anon_vma) in __migrate_folio_record() argument 1043 dst->private = (void *)anon_vma + old_page_state; in __migrate_folio_record() 1048 struct anon_vma **anon_vmap) in __migrate_folio_extract() 1052 *anon_vmap = (struct anon_vma *)(private & ~PAGE_OLD_STATES); in __migrate_folio_extract() 1060 struct anon_vma *anon_vma, in migrate_folio_undo_src() argument 1067 if (anon_vma) in migrate_folio_undo_src() 1068 put_anon_vma(anon_vma); in migrate_folio_undo_src() 1114 struct anon_vma *anon_vma = NULL; in migrate_folio_unmap() local 1203 anon_vma = folio_get_anon_vma(src); in migrate_folio_unmap() 1218 __migrate_folio_record(dst, old_page_state, anon_vma); in migrate_folio_unmap() [all …]
|
D | ksm.c | 200 struct anon_vma *anon_vma; /* when stable */ member 562 if (!vma || !(vma->vm_flags & VM_MERGEABLE) || !vma->anon_vma) in find_mergeable_vma() 577 put_anon_vma(rmap_item->anon_vma); in break_cow() 687 put_anon_vma(rmap_item->anon_vma); in remove_node_from_stable_tree() 839 put_anon_vma(rmap_item->anon_vma); in remove_rmap_item_from_tree() 1043 if (!(vma->vm_flags & VM_MERGEABLE) || !vma->anon_vma) in unmerge_and_remove_all_rmap_items() 1374 rmap_item->anon_vma = vma->anon_vma; in try_to_merge_with_ksm_page() 1375 get_anon_vma(vma->anon_vma); in try_to_merge_with_ksm_page() 2390 if (!vma->anon_vma) in scan_get_next_rmap_item() 2555 if (vma->anon_vma) { in __ksm_del_vma() [all …]
|
D | mremap.c | 109 if (vma->anon_vma) in take_rmap_locks() 110 anon_vma_lock_write(vma->anon_vma); in take_rmap_locks() 115 if (vma->anon_vma) in drop_rmap_locks() 116 anon_vma_unlock_write(vma->anon_vma); in drop_rmap_locks() 1057 extension_end, vma->vm_flags, vma->anon_vma, in SYSCALL_DEFINE5()
|
D | huge_memory.c | 148 if (!vma->anon_vma) in hugepage_vma_check() 1299 VM_BUG_ON_VMA(!vma->anon_vma, vma); in do_huge_pmd_wp_page() 2629 struct anon_vma *anon_vma = NULL; in split_huge_page_to_list() local 2656 anon_vma = folio_get_anon_vma(folio); in split_huge_page_to_list() 2657 if (!anon_vma) { in split_huge_page_to_list() 2663 anon_vma_lock_write(anon_vma); in split_huge_page_to_list() 2689 anon_vma = NULL; in split_huge_page_to_list() 2765 if (anon_vma) { in split_huge_page_to_list() 2766 anon_vma_unlock_write(anon_vma); in split_huge_page_to_list() 2767 put_anon_vma(anon_vma); in split_huge_page_to_list()
|
D | internal.h | 578 struct anon_vma *folio_anon_vma(struct folio *folio); 1152 struct anon_vma *anon_vma; member
|
D | debug.c | 156 vma->anon_vma, vma->vm_ops, vma->vm_pgoff, in dump_vma()
|
D | khugepaged.c | 936 if (expect_anon && (!(*vmap)->anon_vma || !vma_is_anonymous(*vmap))) in hugepage_vma_revalidate() 1149 anon_vma_lock_write(vma->anon_vma); in collapse_huge_page() 1190 anon_vma_unlock_write(vma->anon_vma); in collapse_huge_page() 1198 anon_vma_unlock_write(vma->anon_vma); in collapse_huge_page() 1698 if (READ_ONCE(vma->anon_vma)) in retract_page_tables() 1741 if (unlikely(vma->anon_vma || userfaultfd_wp(vma))) { in retract_page_tables()
|
D | util.c | 750 struct anon_vma *folio_anon_vma(struct folio *folio) in folio_anon_vma()
|
D | mlock.c | 430 vma->anon_vma, vma->vm_file, pgoff, vma_policy(vma), in mlock_fixup()
|
D | mprotect.c | 633 vma->anon_vma, vma->vm_file, pgoff, vma_policy(vma), in mprotect_fixup()
|
D | memory.c | 529 (void *)addr, vma->vm_flags, vma->anon_vma, mapping, index); in print_bad_pte() 1255 if (src_vma->anon_vma) in vma_needs_copy() 3435 if ((vmf->flags & FAULT_FLAG_VMA_LOCK) && !vma->anon_vma) { in do_wp_page() 5472 if (unlikely(vma_is_anonymous(vma) && !vma->anon_vma)) in lock_vma_under_rcu()
|
D | madvise.c | 154 vma->anon_vma, vma->vm_file, pgoff, vma_policy(vma), in madvise_update_vma()
|
D | memory-failure.c | 603 struct anon_vma *av; in collect_procs_anon()
|
D | mempolicy.c | 838 vma->anon_vma, vma->vm_file, pgoff, new_pol, in mbind_range()
|
/linux-6.6.21/include/linux/ |
D | rmap.h | 31 struct anon_vma { struct 32 struct anon_vma *root; /* Root of this anon_vma tree */ argument 54 struct anon_vma *parent; /* Parent of this anon_vma */ argument 84 struct anon_vma *anon_vma; member 106 static inline void get_anon_vma(struct anon_vma *anon_vma) in get_anon_vma() argument 108 atomic_inc(&anon_vma->refcount); in get_anon_vma() 111 void __put_anon_vma(struct anon_vma *anon_vma); 113 static inline void put_anon_vma(struct anon_vma *anon_vma) in put_anon_vma() argument 115 if (atomic_dec_and_test(&anon_vma->refcount)) in put_anon_vma() 116 __put_anon_vma(anon_vma); in put_anon_vma() [all …]
|
D | mm_types.h | 631 struct anon_vma *anon_vma; /* Serialized by page_table_lock */ member
|
D | mm.h | 35 struct anon_vma; 3226 unsigned long end, unsigned long vm_flags, struct anon_vma *, 3229 extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *);
|
/linux-6.6.21/Documentation/translations/zh_CN/admin-guide/mm/ |
D | ksm.rst | 194 制,因为do_swap_page()不能做所有的锁,而需要重组一个跨anon_vma的KSM页。
|
/linux-6.6.21/fs/ |
D | userfaultfd.c | 926 new_flags, vma->anon_vma, in userfaultfd_release() 1483 vma->anon_vma, vma->vm_file, pgoff, in userfaultfd_register() 1669 vma->anon_vma, vma->vm_file, pgoff, in userfaultfd_unregister()
|
D | coredump.c | 1074 if ((!IS_ENABLED(CONFIG_MMU) || vma->anon_vma) && FILTER(ANON_PRIVATE)) in vma_dump_size()
|
/linux-6.6.21/Documentation/mm/ |
D | transhuge.rst | 96 takes the mmap_lock in write mode in addition to the anon_vma lock). If
|
/linux-6.6.21/Documentation/admin-guide/mm/ |
D | ksm.rst | 253 cannot do all the locking needed to reconstitute a cross-anon_vma KSM page.
|
/linux-6.6.21/kernel/ |
D | fork.c | 726 tmp->anon_vma = NULL; in dup_mmap()
|