STRUCT MISC_CG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct misc_cg(9) β€” the Kernel API Manual, but make it make sense

okay so bestie, we're looking at struct misc_cg here, and it's literally the Miscellaneous controller's cgroup structure πŸ’–. That's the whole vibe. It lives in the Kernel API Manual and it's a struct, so grab a snack and let's get into it ✨


πŸŽ€ NAME πŸŽ€

struct misc_cg β€” the Miscellaneous controller's cgroup structure. that's it, that's the name, no cap 🫢


✨ SYNOPSIS ✨

here's the whole thing, exactly as it is, don't come for me about the spacing:

struct misc_cg {
    struct cgroup_subsys_state css;
    struct cgroup_file events_file;
    struct cgroup_file events_local_file;
    struct misc_res res[MISC_CG_RES_TYPES];
 };

like, look at her. iconic. 🌸


🌈 Members 🌈

okay so these are the members, one at a time, no skipping:

  • css β€” the cgroup subsys state object. she's the main character of this struct honestly πŸ‘‘
  • events_file β€” the handle for the misc resources events file. very "who's keeping receipts" energy πŸ’…
  • res β€” an array of misc resources usage in the cgroup. it's typed MISC_CG_RES_TYPES, so it's giving "one slot per resource type" fr fr πŸ“
lowkey note bestie: events_local_file is in the struct up there ☝️ but the manpage doesn't describe it in the Members list, so i'm not gonna invent lore for it. we report, we don't speculate πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, they're the friend group:

  • Kernel file ./include/linux/misc_cgroup.h
  • enum misc_res_type(9)
  • struct misc_res(9)
  • css_misc(9)

and that's the page!! source is ./include/linux, dated October 2026 β€” mwah, ty for coming to my ted talk, drink some water and go read misc_cgroup.h πŸ’œπŸ§šβ­

πŸ“¦ where this page comes from