Re: [PATCH v5 08/40] x86/resctrl: Generate default_ctrl instead of sharing it
From: Reinette Chatre
Date: Wed Oct 23 2024 - 17:16:07 EST
Hi James,
On 10/4/24 11:03 AM, James Morse wrote:
> The struct rdt_resource default_ctrl is used by both the architecture
> code for resetting the hardware controls, and by the filesystem parts
> of resctrl to report to user-space.
This is not accurate. The hardware controls may be different from
what is reported to user-space, for example when MBA software controller
is active.
>
> This means the value has to be shared, but might not match the
> properties of the control. e.g. a percentage greater than 100.
Are you referring to software controller here? When would this not
match properties of control? That this value may not match properties
of control contradicts first paragraph that this is used to reset the
control ...
>
> Instead, determine the default control value from a shared helper
> resctrl_get_default_ctrl() that uses the schema properties to
> determine the correct value.
>
> Signed-off-by: James Morse <james.morse@xxxxxxx>
> Tested-by: Carl Worth <carl@xxxxxxxxxxxxxxxxxxxxxx> # arm64
> Tested-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
> Reviewed-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
> ---
Reinette