Lines Matching refs:chain

152  * @hlist_dup: linked into the stable_node->hlist with a stable_node chain
527 static __always_inline bool is_stable_node_chain(struct ksm_stable_node *chain)
529 return chain->rmap_hlist_len == STABLE_NODE_CHAIN;
538 struct ksm_stable_node *chain)
542 VM_BUG_ON(!is_stable_node_chain(chain));
543 hlist_add_head(&dup->hlist_dup, &chain->hlist);
813 struct ksm_stable_node *chain = alloc_stable_node();
815 if (likely(chain)) {
816 INIT_HLIST_HEAD(&chain->hlist);
817 chain->chain_prune_time = jiffies;
818 chain->rmap_hlist_len = STABLE_NODE_CHAIN;
820 chain->nid = NUMA_NO_NODE; /* debug */
825 * Put the stable node chain in the first dimension of
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);
840 return chain;
843 static inline void free_stable_node_chain(struct ksm_stable_node *chain,
846 rb_erase(&chain->node, root);
847 free_stable_node(chain);
1676 * nr is counting all dups in the chain only if
1692 * deduplication limit so drop the chain.
1701 * to be equal to stable_node_dup if the chain
1718 * the chain, put it there so next search will
1726 * the position of the found dup in the chain,
1727 * but the total number of dups in the chain.
1757 * stable_node_dup if the chain is collapsed (in which case
1758 * *_stable_node will be equal to *_stable_node_dup like if the chain
1795 static __always_inline struct page *chain(struct ksm_stable_node **s_n_d,
1852 * order to collapse the stable_node chain if a single
1857 * stable_node_dup like if the chain never existed.
1862 * this stable_node chain, or this chain was
1873 * this stable_node chain to let the tree walk
1875 * stable_node dups in a stable_node chain
1912 * without adding it to the chain.
1920 * If the stable_node is a chain and
1980 * If stable_node was a chain and chain_prune collapsed it,
1982 * stable_node. A collapse of the chain is indistinguishable
1983 * from the case there was no chain in the stable
1984 * rbtree. Otherwise stable_node is the chain and
1990 /* there is no chain */
2031 * If stable_node was a chain and chain_prune collapsed it,
2033 * stable_node. A collapse of the chain is indistinguishable
2034 * from the case there was no chain in the stable
2035 * rbtree. Otherwise stable_node is the chain and
2040 /* chain is missing so create it */
2048 * migrated to the stable_node chain
2091 tree_page = chain(&stable_node_dup, stable_node, root);
2095 * this stable_node chain, or this chain was
2106 * this stable_node chain to let the tree walk
2108 * stable_node dups in a stable_node chain
2159 /* chain is missing so create it */