Lines Matching defs:chain

148  * @hlist_dup: linked into the stable_node->hlist with a stable_node chain
339 static __always_inline bool is_stable_node_chain(struct stable_node *chain)
341 return chain->rmap_hlist_len == STABLE_NODE_CHAIN;
350 struct stable_node *chain)
354 VM_BUG_ON(!is_stable_node_chain(chain));
355 hlist_add_head(&dup->hlist_dup, &chain->hlist);
595 struct stable_node *chain = alloc_stable_node();
597 if (likely(chain)) {
598 INIT_HLIST_HEAD(&chain->hlist);
599 chain->chain_prune_time = jiffies;
600 chain->rmap_hlist_len = STABLE_NODE_CHAIN;
602 chain->nid = NUMA_NO_NODE; /* debug */
607 * Put the stable node chain in the first dimension of
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);
622 return chain;
625 static inline void free_stable_node_chain(struct stable_node *chain,
628 rb_erase(&chain->node, root);
629 free_stable_node(chain);
1416 * nr is counting all dups in the chain only if
1432 * deduplication limit so drop the chain.
1441 * to be equal to stable_node_dup if the chain
1458 * the chain, put it there so next search will
1466 * the position of the found dup in the chain,
1467 * but the total number of dups in the chain.
1497 * stable_node_dup if the chain is collapsed (in which case
1498 * *_stable_node will be equal to *_stable_node_dup like if the chain
1535 static __always_inline struct page *chain(struct stable_node **s_n_d,
1592 * order to collapse the stable_node chain if a single
1597 * stable_node_dup like if the chain never existed.
1602 * this stable_node chain, or this chain was
1613 * this stable_node chain to let the tree walk
1615 * stable_node dups in a stable_node chain
1652 * without adding it to the chain.
1660 * If the stable_node is a chain and
1720 * If stable_node was a chain and chain_prune collapsed it,
1722 * stable_node. A collapse of the chain is indistinguishable
1723 * from the case there was no chain in the stable
1724 * rbtree. Otherwise stable_node is the chain and
1730 /* there is no chain */
1771 * If stable_node was a chain and chain_prune collapsed it,
1773 * stable_node. A collapse of the chain is indistinguishable
1774 * from the case there was no chain in the stable
1775 * rbtree. Otherwise stable_node is the chain and
1781 /* chain is missing so create it */
1789 * migrated to the stable_node chain
1833 tree_page = chain(&stable_node_dup, stable_node, root);
1837 * this stable_node chain, or this chain was
1848 * this stable_node chain to let the tree walk
1850 * stable_node dups in a stable_node chain
1901 /* chain is missing so create it */