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

From: Luck, Tony
Date: Tue Nov 08 2022 - 16:56:52 EST


> 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