STRUCT RDT_HW_RESOURCE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct rdt_hw_resource(9) ✨

okay so this is a page straight out of the Kernel API Manual, and it's all about struct rdt_hw_resource β€” literally the arch private attributes of a resctrl resource. bestie, this is the struct that holds the stuff the architecture keeps to itself, no cap πŸ’…


πŸŽ€ NAME πŸŽ€

struct rdt_hw_resource β€” arch private attributes of a resctrl resource πŸ¦‹


🌸 SYNOPSIS 🌸

struct rdt_hw_resource {
    struct rdt_resource     r_resctrl;
    u32 num_closid;
    unsigned int            msr_base;
    void (*msr_update)(struct msr_param *m);
    unsigned int            mon_scale;
    unsigned int            mbm_width;
    bool cdp_enabled;
    bool mbm_cntr_assign_enabled;
    bool sdciae_enabled;
 };

periodt, that's the whole shape of it πŸ’–


πŸ‘‘ Members πŸ‘‘

  • r_resctrl β€” the attributes of the resource that resctrl uses directly. main character of the struct fr fr ✨
  • num_closid β€” the maximum number of closid this hardware can support, regardless of CDP. it gets exposed via resctrl_arch_get_num_closid so nobody gets it twisted with struct resctrl_schema's property of the same name β€” that one's been corrected for features like CDP, this one hasn't. iykyk πŸ™ˆ
  • msr_base β€” the base MSR address for CBMs πŸ”₯
  • msr_update β€” function pointer that updates QOS MSRs πŸ’…
  • mon_scale β€” literally: cqm counter * mon_scale = occupancy in bytes πŸ“
  • mbm_width β€” monitor width, used to detect and correct for overflow. not me being obsessed with overflow handling 😭
  • cdp_enabled β€” the CDP state of this resource πŸ‘‘
  • mbm_cntr_assign_enabled β€” the ABMC feature is enabled 🌈
  • sdciae_enabled β€” the SDCIAE feature (the one backing "io_alloc") is enabled ⭐

🧚 Description 🧚

so the way this works: the members of this structure are either private to the architecture β€” like mbm_width, she's not talking to anybody πŸ’€ β€” or they're accessed via helpers that provide abstraction, like msr_update and msr_base. cute little layer of separation, love that for us 🫢


🌟 SEE ALSO 🌟

  • Kernel file ./arch/x86/kernel/cpu/resctrl/internal.h struct arch_mbm_state(9)
  • struct rdt_hw_ctrl_domain(9)
  • struct rdt_hw_l3_mon_domain(9)
  • struct rdt_perf_pkg_mon_domain(9)
  • struct msr_param(9)

and that's the whole page bestie!! sign-off time: this one lives in ./arch/x86/kernel/cpu/resctrl, dated October 2026, and it's struct rdt_hw_resource(9) πŸ’œ slay, go read the internals, mwah πŸŽ€

πŸ“¦ where this page comes from