Lines Matching refs:dup

81  *   write protected memory content, but each "dup" corresponds to a
344 static __always_inline bool is_stable_node_dup(struct stable_node *dup)
346 return dup->head == STABLE_NODE_DUP_HEAD;
349 static inline void stable_node_chain_add_dup(struct stable_node *dup,
352 VM_BUG_ON(is_stable_node_dup(dup));
353 dup->head = STABLE_NODE_DUP_HEAD;
355 hlist_add_head(&dup->hlist_dup, &chain->hlist);
359 static inline void __stable_node_dup_del(struct stable_node *dup)
361 VM_BUG_ON(!is_stable_node_dup(dup));
362 hlist_del(&dup->hlist_dup);
366 static inline void stable_node_dup_del(struct stable_node *dup)
368 VM_BUG_ON(is_stable_node_chain(dup));
369 if (is_stable_node_dup(dup))
370 __stable_node_dup_del(dup);
372 rb_erase(&dup->node, root_stable_tree + NUMA(dup->nid));
374 dup->head = NULL;
592 static struct stable_node *alloc_stable_node_chain(struct stable_node *dup,
596 VM_BUG_ON(is_stable_node_chain(dup));
611 rb_replace_node(&dup->node, &chain->node, root);
616 * dup stable_nodes in the chain->hlist point to pages
620 stable_node_chain_add_dup(dup, chain);
837 * page and upping mmap_lock. Nor does it fit with the way we skip dup'ing
919 struct stable_node *dup;
930 hlist_for_each_entry_safe(dup, hlist_safe,
932 VM_BUG_ON(!is_stable_node_dup(dup));
933 if (remove_stable_node(dup))
1365 struct stable_node *dup, *found = NULL, *stable_node = *_stable_node;
1379 hlist_for_each_entry_safe(dup, hlist_safe,
1388 * (that's why we do a _safe walk). The "dup"
1392 _tree_page = get_ksm_page(dup, GET_KSM_PAGE_NOLOCK);
1396 if (is_page_sharing_candidate(dup)) {
1398 dup->rmap_hlist_len > found_rmap_hlist_len) {
1401 found = dup;
1405 /* skip put_page for found dup */
1455 * If the found stable_node dup can accept one
1466 * the position of the found dup in the chain,
1593 * stable_node dup was found in it). In such case the
1650 * into a stable node dup. If the mapcount is
1725 * stable_node_dup is the dup to replace.
1776 * stable_node_dup is the dup to replace.
1788 * Add this stable_node dup that was
2730 struct stable_node *dup;
2739 hlist_for_each_entry_safe(dup, hlist_safe,
2741 VM_BUG_ON(!is_stable_node_dup(dup));
2742 stable_node_dup_remove_range(dup, start_pfn, end_pfn);