RE: [PATCH 2/2] x86/resctrl: Don't workqueue local event counter reads

From: Luck, Tony
Date: Mon Nov 04 2024 - 17:56:51 EST


> cpu = cpumask_any_housekeeping(cpumask, RESCTRL_PICK_ANY_CPU);

To a large degree Peter's is working around inefficiency in this housekeeping
call.

Code may be running on a suitable CPU from the domain cpumask, but this
call will very likely pick the first CPU in that mask, rather than the current one.

From that point it's all downhill unless you are lucky enough that the first
CPU is a tick_nohz_full_cpu() one and you take the

smp_call_function_any(cpumask, mon_event_count, rr, 1);

path. It seems that on many systems you'll take the

smp_call_on_cpu(cpu, smp_mon_event_count, rr, false);

path and make a pointless IPI to get the data.

-Tony