Re: [PATCH v6 27/42] x86/resctrl: Move RFTYPE flags to be managed by resctrl

From: James Morse
Date: Fri Feb 28 2025 - 14:58:24 EST


Hi Reinette,

On 20/02/2025 01:17, Reinette Chatre wrote:
> On 2/7/25 10:18 AM, James Morse wrote:
>> resctrl_file_fflags_init() is called from the architecture specific code
>> to make the 'thread_throttle_mode' file visible. The architecture specific
>> code has already set the membw.throttle_mode in the rdt_resource.
>>
>> This forces the RFTYPE flags used by resctrl to be exposed to the
>> architecture specific code.
>>
>> This doesn't need to be specific to the architecture, the throttle_mode
>> can be used by resctrl to determine if the 'thread_throttle_mode' file
>> should be visible. This allows the RFTYPE flags to be private to resctrl.
>>
>> Add thread_throttle_mode_init(), and use it to call
>> resctrl_file_fflags_init() from resctrl_setup(). This avoids
>
> " from resctrl_setup()" -> " from resctrl_init()" ?

Ugh, thanks!


>> publishing an extra function between the architecture and filesystem
>> code.

> | Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>


Thanks!

James