Re: [RFD] resctrl: reassigning a running container's CTRL_MON group
From: Peter Newman
Date: Wed Nov 16 2022 - 08:20:46 EST
Hi James,
On Fri, Nov 11, 2022 at 7:38 PM James Morse <james.morse@xxxxxxx> wrote:
> On 09/11/2022 19:11, Reinette Chatre wrote:
> > On 11/9/2022 1:50 AM, Peter Newman wrote:
> >> Using this we can permanently pin RMIDs to CPUs and read the
> >> counters on every task switch to implement MBM RMIDs in software.
>
> >> This has the caveats that evictions while one task is running could have
> >> resulted from a previous task on the current CPU, but will be counted
> >> against the new task's software-RMID, and that CMT doesn't work.
>
> (Sounds like the best thing to do in a bad situation)
>
>
> >> I will propose making this available as a mount option for cloud container
> >> use cases which need to monitor a large number of tasks on B/W counter-poor
> >> systems, and of course don't need CMT.
>
> Why does it need to be a mount option?
>
> If this is the only way of using the counters on this platform, then the skid from the
> counters is just a property of the platform. It can be advertised to user-space via some
> file in 'info'.
No, it's not the only way of using the counters. The limitation is much
more problematic for users who monitor all tasks all the time. RMIDs
would be more likely to remain in use on systems that only monitor
select tasks, so they should be able to benefit from skid-free bandwidth
counts and CMT, so I think the proposed mode should be opt-in.
> Architecture specific mount options are a bad idea, platform specific ones are even worse!
It is already the case today in resctrlfs that the platform's features
will determine which mount options are available to the user. I believe
the same implementation would work on Intel platforms, but it would just
be silly to enable when these platforms have enough counters to back all
their RMIDs.
Also I believe it's fine for this option to be missing on MPAM until
someone is interested in paying the tradeoffs to monitor more groups and
is motivated enough to implement it.
-Peter