STRUCT RESCTRL_CACHE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to the Kernel API Manual, section 9 β€” yes we're in the big leagues now, this is the struct resctrl_cache(9) page and it's lowkey iconic. Sit down, grab a strawberry πŸ“, and let's get into it.

This struct is literally the whole vibe check for cache allocation data β€” it's giving "everything you need to know about how this cache wants to be sliced and diced." ✨


πŸŽ€ SYNOPSIS πŸŽ€

struct resctrl_cache {
    unsigned int    cbm_len;
    unsigned int    min_cbm_bits;
    unsigned int    shareable_bits;
    bool arch_has_sparse_bitmasks;
    bool arch_has_per_cpu_cfg;
    bool io_alloc_capable;
};

no cap, that's the whole thing. six fields, all baddies. 🫢


🌸 Members 🌸

  • cbm_len β€” the length of the cache bit mask. that's her. that's the size of the mask, periodt. πŸ’…
  • min_cbm_bits β€” the minimum number of consecutive bits that gotta be set. and listen β€” a value of 0 here means the architecture can support zero CBM (yes, actually zero, that's a real thing, not me being dramatic 😭).
  • shareable_bits β€” a bitmask of shareable resource with other executing entities. i.e. what this resource is willing to share with the other kids in the group chat. πŸ‘‘
  • arch_has_sparse_bitmasks β€” True if a bitmask like f00f is valid. yeah. f00f. those gaps are allowed, she's not regular, she's sparse and she's valid 🌈
  • arch_has_per_cpu_cfg β€” True if the QOS_CFG register for this cache level has CPU scope. iykyk.
  • io_alloc_capable β€” True if a portion of the cache can be configured for I/O traffic. so I/O gets a lil slice too, generous queen πŸŽ€

πŸ¦‹ SEE ALSO πŸ¦‹

okay this is the part where the whole friend group gets tagged. all of these live in the kernel file ./include/linux/resctrl.h and honestly? the roster is stacked:


bestie heads up 🫢 β€” this page lives in ./include/linux, and that's the source line, not a fun lil folder to go poking at randomly. read responsibly. πŸ’œ

and that's the page!! okay love you, bye β€” sourced from ./include/linux, dated October 2026, and forever signed struct resctrl_cache(9). slay, go read some kernel headers πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from