STRUCT RDT_HW_RESOURCE(9)
β¨ 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 viaresctrl_arch_get_num_closidso nobody gets it twisted withstruct 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.hstructarch_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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms