Re: [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept
From: Chen, Yu C
Date: Fri Jul 03 2026 - 05:04:55 EST
Hi Ben,
On 7/2/2026 10:27 PM, Ben Horgan wrote:
Hi Chenyu,
[ ... ]
The following are current thoughts on how Control B can emulate Control A.
May I know if this direction is acceptable?
The main idea is that, Legacy MBA controller delegates to region-aware MBA
controller via a pointer, with its hw_update function converting
percentages
to the target's value range.
struct resctrl_hw_ctrl {
struct resctrl_ctrl r_ctrl;
unsigned int msr_base;
void (*hw_update)(struct hw_param *m);
/* points to the backing controller */
struct resctrl_ctrl *r_ctrl_emul; <-- newly added
};
What's the reason for this being in the architecture specific code? I
would expect that the resctrl core code would need to know about any
emulation even if the exact emulation is architecture specific?
I was thinking that the low-level emulation was implemented by the
hardware/architecture, so I put it within resctrl_hw_ctrl. But you
are right - the generic resctrl might need to be aware of the emulation,
because the "info" directory needs to display the emulation hierarchy.
Let me have a try at moving it into the generic resctrl, like into
struct resctrl_ctrl.
thanks,
Chenyu