STRUCT KSM_STABLE_NODE(9)
π struct ksm_stable_node π
okay so bestie, welcome to the Kernel API Manual β this is the page for struct ksm_stable_node(9), and the NAME tea is literally node of the stable rbtree. That's the assignment, no cap. πΈ
β¨ NAME β¨
struct ksm_stable_node β node of the stable rbtree. She's a node in the stable rbtree, periodt. π
π§ SYNOPSIS π§
Here's the struct exactly, bestie β keep every character, including those semicolons after the preprocessor lines, iykyk:
struct ksm_stable_node {
union {
struct rb_node node;
struct {
struct list_head *head;
struct {
struct hlist_node hlist_dup;
struct list_head list;
};
};
};
struct hlist_head hlist;
union {
unsigned long kpfn;
unsigned long chain_prune_time;
};
#define STABLE_NODE_CHAIN -1024;
int rmap_hlist_len;
#ifdef CONFIG_NUMA;
int nid;
#endif;
};
π Members π
Vibe check time, member by member, in order β every anonymous union/struct stays because the lore matters:
{unnamed_union}β anonymous.nodeβ rb node of this ksm page in the stable tree.{unnamed_struct}β anonymous.headβ (overlaying parent)migrate_nodesindicates temporarily on that list.{unnamed_struct}β anonymous.hlist_dupβ linked into thestable_node->hlistwith a stable_node chain.listβ linked intomigrate_nodes, pending placement in the proper node tree.hlistβ hlist head ofrmap_itemsusing this ksm page.{unnamed_union}β anonymous.kpfnβ page frame number of this ksm page (perhaps temporarily on wrongnid).chain_prune_timeβ time of the last full garbage collection.rmap_hlist_lenβ number ofrmap_itementries inhlistorSTABLE_NODE_CHAIN.nidβ NUMA node id of stable tree in which linked (may not matchkpfn).
π¦ SEE ALSO π¦
Go peek at these, bestie β the whole friend group is here:
- Kernel file
./mm/ksm.cOverview(9) struct ksm_mm_slot(9)struct ksm_scan(9)struct ksm_rmap_item(9)struct advisor_ctx(9)replace_page(9)ksm_do_scan(9)ksm_vma_flags(9)ksm_enable_merge_any(9)ksm_disable_merge_any(9)
with so much love from source ./mm, October 2026, for struct ksm_stable_node(9) πβ¨π¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms