> Playing devil's advocate, I wonder whether there is a point beyond > which it would be better to have an interface to hand over some of the > counters to perf? > > The logic for round-robin scheduling of events onto counters, dealing > with overflows etc. has already been invented over there, and it's > fiddly to get right. Ideally resctrl wouldn't have its own special > implementation of that kind of stuff. > > (Said my someone who has never tried to hack up an uncore event source > in perf.) Initial implementation on Intel RDT tried to use perf ... it all went badly and was reverted. There are some very un-perf-like properties that we couldn't find a workaround for at the time. E.g. 1) Cache occupancy counters. These change even when your workload isn't running (downward due to evictions). 2) Counters based on RMIDs show the aggregated values from multiple CPUs as tasks are scheduled on cores. But maybe you meant "don't let resctrl use all those counters" ... hand some of them to perf to use in some other way? -Tony