STRUCT RESCTRL_PQR_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct resctrl_pqr_state(9) πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ β€” this one lives over in ./arch/x86/include/asm and it's literally the state cache for the PQR MSR, no cap πŸŽ€


🌸 NAME 🌸

struct resctrl_pqr_state β€” the state cache for the PQR MSR, periodt πŸ’…


✨ SYNOPSIS ✨

struct resctrl_pqr_state {
    u32 cur_rmid;
    u32 cur_closid;
    u32 default_rmid;
    u32 default_closid;
 };

like, that's the whole vibe. four lil u32s and she's iconic πŸ¦‹


🫢 Members 🫢

  • cur_rmid β€” the cached Resource Monitoring ID πŸ‘‘ (this is the current one, bestie)
  • cur_closid β€” the cached Class Of Service ID ⭐
  • default_rmid β€” the user assigned Resource Monitoring ID πŸ’–
  • default_closid β€” the user assigned cached Class Of Service ID πŸŽ€ (yes girl, "user assigned cached" β€” that's exactly what the original says, iykyk)

πŸ’€ Description πŸ’€

okay so here's the tea β˜• the upper 32 bits of MSR_IA32_PQR_ASSOC contain closid, and the lower 10 bits hold rmid. and because the update to MSR_IA32_PQR_ASSOC always contains both parts, we literally have to cache them β€” no way around it, fr fr 😭

this struct also stores the user configured per cpu CLOSID and RMID 🌈

and plot twist, the cache is also doing us a solid: it helps avoid pointless updates if the value does not change πŸ’… like, why write if nothing changed? exactly. we don't. ate and left no crumbs πŸ”₯


πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./arch/x86/include/asm/resctrl.h β€” go read it, bestie, it's giving main character energy πŸ‘‘

kay that's the whole page!! this one's from ./arch/x86/include/asm, dated October 2026, and it's filed under struct resctrl_pqr_state(9) β€” mwah, go slay your kernel reading πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from