Re: [PATCH 00/12] Cqm2: Intel Cache quality monitoring fixes

From: David Carrillo-Cisneros
Date: Thu Feb 02 2017 - 21:14:58 EST


Something to be aware is that CAT cpus don't work the way CPU
filtering works in perf:

If I have the following CAT groups:
- default group with task TD
- group GC1 with CPU0 and CLOSID 1
- group GT1 with no CPUs and task T1 and CLOSID2
- TD and T1 run on CPU0.

Then T1 will use CLOSID2 and TD CLOSID1. Some allocations done in CPU0
did not use CLOSID1.

Now, if I have the same setup in monitoring groups and I were to read
llc_occupancy in the RMID of GC1, I'd read llc_occupancy for TD only,
and have a blind spot on T1. That's not how CPU events work on perf.

So CPUs have a different meaning on CAT than on perf.

The above is another reason to separate the allocation and the
monitoring groups. Having
- Independent allocation and monitoring groups.
- Independent CPU and task grouping.
would allow us semantics that monitor CAT groups and eventually can be
extended to also monitor the perf way, this is support:
- filter by task
- filter by task group (cgroup or monitoring group or whatever).
- filter by CPU (the perf way)
- combinations of task/task_group and CPU (the perf way)

If we tie allocation groups and monitoring groups, we are tying the
meaning of CPUs and we'll have to choose between the CAT meaning or
the perf meaning.

Let's allow semantics that will allow perf like monitoring to
eventually work, even if its not immediately supported.

Thanks,
David