Lines Matching refs:dup

89  *   write protected memory content, but each "dup" corresponds to a
532 static __always_inline bool is_stable_node_dup(struct ksm_stable_node *dup)
534 return dup->head == STABLE_NODE_DUP_HEAD;
537 static inline void stable_node_chain_add_dup(struct ksm_stable_node *dup,
540 VM_BUG_ON(is_stable_node_dup(dup));
541 dup->head = STABLE_NODE_DUP_HEAD;
543 hlist_add_head(&dup->hlist_dup, &chain->hlist);
547 static inline void __stable_node_dup_del(struct ksm_stable_node *dup)
549 VM_BUG_ON(!is_stable_node_dup(dup));
550 hlist_del(&dup->hlist_dup);
554 static inline void stable_node_dup_del(struct ksm_stable_node *dup)
556 VM_BUG_ON(is_stable_node_chain(dup));
557 if (is_stable_node_dup(dup))
558 __stable_node_dup_del(dup);
560 rb_erase(&dup->node, root_stable_tree + NUMA(dup->nid));
562 dup->head = NULL;
810 static struct ksm_stable_node *alloc_stable_node_chain(struct ksm_stable_node *dup,
814 VM_BUG_ON(is_stable_node_chain(dup));
829 rb_replace_node(&dup->node, &chain->node, root);
834 * dup stable_nodes in the chain->hlist point to pages
838 stable_node_chain_add_dup(dup, chain);
1061 * page and upping mmap_lock. Nor does it fit with the way we skip dup'ing
1149 struct ksm_stable_node *dup;
1160 hlist_for_each_entry_safe(dup, hlist_safe,
1162 VM_BUG_ON(!is_stable_node_dup(dup));
1163 if (remove_stable_node(dup))
1625 struct ksm_stable_node *dup, *found = NULL, *stable_node = *_stable_node;
1639 hlist_for_each_entry_safe(dup, hlist_safe,
1648 * (that's why we do a _safe walk). The "dup"
1652 _tree_page = get_ksm_page(dup, GET_KSM_PAGE_NOLOCK);
1656 if (is_page_sharing_candidate(dup)) {
1658 dup->rmap_hlist_len > found_rmap_hlist_len) {
1661 found = dup;
1665 /* skip put_page for found dup */
1715 * If the found stable_node dup can accept one
1726 * the position of the found dup in the chain,
1853 * stable_node dup was found in it). In such case the
1910 * into a stable node dup. If the mapcount is
1985 * stable_node_dup is the dup to replace.
2036 * stable_node_dup is the dup to replace.
2047 * Add this stable_node dup that was
3273 struct ksm_stable_node *dup;
3282 hlist_for_each_entry_safe(dup, hlist_safe,
3284 VM_BUG_ON(!is_stable_node_dup(dup));
3285 stable_node_dup_remove_range(dup, start_pfn, end_pfn);