Re: [PATCH v1 10/31] x86/resctrl: Move monitor init work to a resctrl init call
From: James Morse
Date: Wed Jun 05 2024 - 12:40:30 EST
Hi Shawn,
On 10/04/2024 03:57, Shawn Wang wrote:
> On 3/22/24 12:50 AM, James Morse wrote:
>> rdt_get_mon_l3_config() is called from the architecture's
>> resctrl_arch_late_init(), and initialises both architecture specific
>> fields, such as hw_res->mon_scale and resctrl filesystem fields
>> by calling dom_data_init().
>>
>> To separate the filesystem and architecture parts of resctrl, this
>> function needs splitting up.
>>
>> Add resctrl_mon_resource_init() to do the filesystem specific work,
>> and call it from resctrl_init(). This runs later, but is still before
>> the filesystem is mounted and the rmid_ptrs[] array can be used.
> Now x86 platform defaults to all monitoring features on the L3 cache, but some monitoring
> features may also be on the L2 cache or memory controller according to the MPAM spec. For
> example, the memory bandwidth monitors could be on the memory controller.
>
> Will resctrl_mon_resource_init() consider this scenario?
Nope.
The aim here is to get existing user-space software working on machines with MPAM.
You can build an MPAM machine with monitors on the L1, L2 and L5 - but resctrl can't
expose them, and there is no existing software that makes use of them.
The result is the MPAM driver plays fast and loose with some of this stuff to try and slot
the machine into a Xeon shaped hole.
I'd like to support this in the future, but it will need user visible filesystem changes -
its not worth discussing now.
I strongly suspect that declaring all monitors platform-specific, and plumbing them out
via perf is the best thing for everyone...
Thanks,
James