STRUCT KSM_STABLE_NODE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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_nodes indicates temporarily on that list.
  • {unnamed_struct} β€” anonymous.
  • hlist_dup β€” linked into the stable_node->hlist with a stable_node chain.
  • list β€” linked into migrate_nodes, pending placement in the proper node tree.
  • hlist β€” hlist head of rmap_items using this ksm page.
  • {unnamed_union} β€” anonymous.
  • kpfn β€” page frame number of this ksm page (perhaps temporarily on wrong nid).
  • chain_prune_time β€” time of the last full garbage collection.
  • rmap_hlist_len β€” number of rmap_item entries in hlist or STABLE_NODE_CHAIN.
  • nid β€” NUMA node id of stable tree in which linked (may not match kpfn).

πŸ¦‹ SEE ALSO πŸ¦‹

Go peek at these, bestie β€” the whole friend group is here:


with so much love from source ./mm, October 2026, for struct ksm_stable_node(9) πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from