STRUCT TMIGR_HIERARCHY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct tmigr_hierarchy(9) πŸ’–

okay so bestie, welcome to the struct tmigr_hierarchy(9) page from the Kernel API Manual β€” yes it's a kernel struct, yes it's lowkey iconic, and yes I'm gonna walk you through it like we're annotating it in the group chat 🫢


πŸŽ€ NAME πŸŽ€

struct tmigr_hierarchy β€” it's a hierarchy that's associated to a given CPU capacity. that's the whole vibe ✨

Here's the tea though: homogeneous systems only get one hierarchy. heterogenous systems get one hierarchy per CPU capacity. so like, more capacity variety = more hierarchies, periodt πŸ’…


🌸 SYNOPSIS 🌸

struct tmigr_hierarchy {
    struct cpumask          *cpumask;
    struct tmigr_group      *root;
    unsigned long           capacity;
    struct list_head        node;
    struct list_head        level_list[];
};

look at her. so structured. so organized. main character struct fr fr πŸ‘‘


✨ Members ✨

so this is the part where we meet everybody in the struct, one by one, no skipping πŸ₯°

  • cpumask β€” the CPUs that belong to this hierarchy. it's a pointer to a struct cpumask, and it's literally the guest list for this hierarchy's party πŸ’–
  • root β€” the current root of the hierarchy. a struct tmigr_group pointer, and it's giving "the one at the top of the tree" energy πŸŒ³πŸ‘‘
  • capacity β€” the CPU capacity that's associated to this hierarchy, typed as unsigned long. this is the little label that tells you which capacity club this hierarchy belongs to πŸŽ€
  • node β€” a struct list_head that is this thing's node in the global hierarchy list. so she's linked up with all her sister hierarchies, iykyk πŸ”—
  • level_list β€” per level lists of tmigr groups. note the [] β€” it's a flexible-ish trailing array of struct list_head, so there's one list per level, bestie πŸ“šβœ¨

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, they're all in the kernel file ./kernel/time/timer_migration.h and they're all part of the same friend group πŸ’œ

  • struct tmigr_event(9)
  • struct tmigr_group(9)
  • struct tmigr_cpu(9)
  • union tmigr_state(9)

ngl this struct is small but she's doing a LOT of work. respect the capacity partitioning, okay? 🫢

and that's the page!! this one came from ./kernel/time and the date on it is October 2026, so like, mark your calendars bestie πŸ˜­πŸ’– slay, go read your kernel source, and remember: every hierarchy deserves its own capacity. periodt 🌈⭐

πŸ“¦ where this page comes from