Re: [RFD] resctrl: reassigning a running container's CTRL_MON group

From: James Morse
Date: Wed Nov 09 2022 - 13:02:26 EST


Hi Reinette, Tony,

On 08/11/2022 23:18, Reinette Chatre wrote:
> On 11/8/2022 1:56 PM, Luck, Tony wrote:
>>> Looking at some history there even seems to have been some work surrounding
>>> "rotating" of RMIDs that seem related to what you mention above:
>>>
>>> commit bff671dba7981195a644a5dc210d65de8ae2d251
>>> Author: Matt Fleming <matt.fleming@xxxxxxxxx>
>>> Date: Fri Jan 23 18:45:47 2015 +0000
>>>
>>> perf/x86/intel: Perform rotation on Intel CQM RMIDs
>>>
>>> There are many use cases where people will want to monitor more tasks
>>> than there exist RMIDs in the hardware, meaning that we have to perform
>>> some kind of multiplexing.
>>
>> That would work for monitoring memory bandwidth. But not for LLC occupancy
>> as there's no way to set an occupancy counter to the value of what the new set of
>> processes are using. So you'd have to live with nonsense values for a potentially
>> long time until natural LLC evictions and re-fills sorted things out. Either that or
>> flush the entire LLC when reassigning an RMID so you can count up from zero
>> as the cache is re-filled.
>
> Tony helped me to find some more history here. Please see the commit message
> of the patch below for some information on why the perf support was removed.
> This is not all specific to monitoring of cache occupancy.

Thanks!

I'll be sure to cite this in the future perf support, and check I've covered all the
issues described here.


James


> commit c39a0e2c8850f08249383f2425dbd8dbe4baad69
> Author: Vikas Shivappa <vikas.shivappa@xxxxxxxxxxxxxxx>
> Date: Tue Jul 25 14:14:20 2017 -0700
>
> x86/perf/cqm: Wipe out perf based cqm