Home
last modified time | relevance | path

Searched refs:anon_vma (Results 1 – 25 of 26) sorted by relevance

12

/linux-6.1.9/mm/
Drmap.c89 static inline struct anon_vma *anon_vma_alloc(void) in anon_vma_alloc()
91 struct anon_vma *anon_vma; in anon_vma_alloc() local
93 anon_vma = kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL); in anon_vma_alloc()
94 if (anon_vma) { in anon_vma_alloc()
95 atomic_set(&anon_vma->refcount, 1); in anon_vma_alloc()
96 anon_vma->num_children = 0; in anon_vma_alloc()
97 anon_vma->num_active_vmas = 0; in anon_vma_alloc()
98 anon_vma->parent = anon_vma; in anon_vma_alloc()
103 anon_vma->root = anon_vma; in anon_vma_alloc()
106 return anon_vma; in anon_vma_alloc()
[all …]
Dmmap.c336 struct anon_vma *anon_vma = vma->anon_vma; in validate_mm() local
339 if (anon_vma) { in validate_mm()
340 anon_vma_lock_read(anon_vma); in validate_mm()
343 anon_vma_unlock_read(anon_vma); in validate_mm()
380 anon_vma_interval_tree_remove(avc, &avc->anon_vma->rb_root); in anon_vma_interval_tree_pre_update_vma()
389 anon_vma_interval_tree_insert(avc, &avc->anon_vma->rb_root); in anon_vma_interval_tree_post_update_vma()
519 struct anon_vma *anon_vma = vma->anon_vma; in vma_expand() local
525 if (next->anon_vma && !vma->anon_vma) { in vma_expand()
528 anon_vma = next->anon_vma; in vma_expand()
529 vma->anon_vma = anon_vma; in vma_expand()
[all …]
Dksm.c196 struct anon_vma *anon_vma; /* when stable */ member
494 if (!vma || !(vma->vm_flags & VM_MERGEABLE) || !vma->anon_vma) in find_mergeable_vma()
509 put_anon_vma(rmap_item->anon_vma); in break_cow()
617 put_anon_vma(rmap_item->anon_vma); in remove_node_from_stable_tree()
768 put_anon_vma(rmap_item->anon_vma); in remove_rmap_item_from_tree()
966 if (!(vma->vm_flags & VM_MERGEABLE) || !vma->anon_vma) in unmerge_and_remove_all_rmap_items()
1290 rmap_item->anon_vma = vma->anon_vma; in try_to_merge_with_ksm_page()
1291 get_anon_vma(vma->anon_vma); in try_to_merge_with_ksm_page()
2299 if (!vma->anon_vma) in scan_get_next_rmap_item()
2482 if (vma->anon_vma) { in ksm_madvise()
[all …]
Dmigrate.c1007 struct anon_vma *anon_vma = NULL; in __unmap_and_move() local
1068 anon_vma = folio_get_anon_vma(src); in __unmap_and_move()
1106 !folio_test_ksm(src) && !anon_vma, src); in __unmap_and_move()
1137 if (anon_vma) in __unmap_and_move()
1138 put_anon_vma(anon_vma); in __unmap_and_move()
1259 struct anon_vma *anon_vma = NULL; in unmap_and_move_huge_page() local
1307 anon_vma = folio_get_anon_vma(src); in unmap_and_move_huge_page()
1347 if (anon_vma) in unmap_and_move_huge_page()
1348 put_anon_vma(anon_vma); in unmap_and_move_huge_page()
Dkhugepaged.c845 if (expect_anon && (!(*vmap)->anon_vma || !vma_is_anonymous(*vmap))) in hugepage_vma_revalidate()
1033 anon_vma_lock_write(vma->anon_vma); in collapse_huge_page()
1072 anon_vma_unlock_write(vma->anon_vma); in collapse_huge_page()
1080 anon_vma_unlock_write(vma->anon_vma); in collapse_huge_page()
1411 if (vma->anon_vma) in collapse_and_free_pmd()
1412 lockdep_assert_held_write(&vma->anon_vma->root->rwsem); in collapse_and_free_pmd()
1570 if (vma->anon_vma) in collapse_pte_mapped_thp()
1571 anon_vma_lock_write(vma->anon_vma); in collapse_pte_mapped_thp()
1575 if (vma->anon_vma) in collapse_pte_mapped_thp()
1576 anon_vma_unlock_write(vma->anon_vma); in collapse_pte_mapped_thp()
[all …]
Dmremap.c109 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()
1037 vma->vm_flags, vma->anon_vma, vma->vm_file, in SYSCALL_DEFINE5()
Dhuge_memory.c147 if (!vma->anon_vma) in hugepage_vma_check()
1314 VM_BUG_ON_VMA(!vma->anon_vma, vma); in do_huge_pmd_wp_page()
2638 struct anon_vma *anon_vma = NULL; in split_huge_page_to_list() local
2664 anon_vma = folio_get_anon_vma(folio); in split_huge_page_to_list()
2665 if (!anon_vma) { in split_huge_page_to_list()
2671 anon_vma_lock_write(anon_vma); in split_huge_page_to_list()
2698 anon_vma = NULL; in split_huge_page_to_list()
2772 if (anon_vma) { in split_huge_page_to_list()
2773 anon_vma_unlock_write(anon_vma); in split_huge_page_to_list()
2774 put_anon_vma(anon_vma); in split_huge_page_to_list()
Ddebug.c148 vma->anon_vma, vma->vm_ops, vma->vm_pgoff, in dump_vma()
Dinternal.h483 struct anon_vma *folio_anon_vma(struct folio *folio);
Dmlock.c420 *prev = vma_merge(mm, *prev, start, end, newflags, vma->anon_vma, in mlock_fixup()
Dmprotect.c606 vma->anon_vma, vma->vm_file, pgoff, vma_policy(vma), in mprotect_fixup()
Dutil.c746 struct anon_vma *folio_anon_vma(struct folio *folio) in folio_anon_vma()
Dmadvise.c155 *prev = vma_merge(mm, *prev, start, end, new_flags, vma->anon_vma, in madvise_update_vma()
Dmemory-failure.c506 struct anon_vma *av; in collect_procs_anon()
Dmempolicy.c817 vma->anon_vma, vma->vm_file, pgoff, in mbind_range()
Dmemory.c560 (void *)addr, vma->vm_flags, vma->anon_vma, mapping, index); in print_bad_pte()
1259 if (src_vma->anon_vma) in vma_needs_copy()
Dswapfile.c1990 if (vma->anon_vma) { in unuse_mm()
/linux-6.1.9/include/linux/
Drmap.h31 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 …]
Dmm_types.h488 struct anon_vma *anon_vma; /* Serialized by page_table_lock */ member
Dmm.h34 struct anon_vma;
2688 unsigned long vm_flags, struct anon_vma *, struct file *, pgoff_t,
2690 extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *);
/linux-6.1.9/fs/
Duserfaultfd.c903 new_flags, vma->anon_vma, in userfaultfd_release()
1452 vma->anon_vma, vma->vm_file, vma->vm_pgoff, in userfaultfd_register()
1644 vma->anon_vma, vma->vm_file, vma->vm_pgoff, in userfaultfd_unregister()
Dcoredump.c1067 if ((!IS_ENABLED(CONFIG_MMU) || vma->anon_vma) && FILTER(ANON_PRIVATE)) in vma_dump_size()
/linux-6.1.9/Documentation/mm/
Dtranshuge.rst98 takes the mmap_lock in write mode in addition to the anon_vma lock). If
/linux-6.1.9/Documentation/admin-guide/mm/
Dksm.rst239 cannot do all the locking needed to reconstitute a cross-anon_vma KSM page.
/linux-6.1.9/kernel/
Dfork.c659 tmp->anon_vma = NULL; in dup_mmap()

12