Re: [PATCH v5 3/3] perf stat: Add no-affinity flag

From: Andi Kleen

Date: Tue Nov 18 2025 - 18:19:08 EST


On Tue, Nov 18, 2025 at 01:13:26PM -0800, Ian Rogers wrote:
> Add flag that disables affinity behavior. Using sched_setaffinity to
> place a perf thread on a CPU can avoid certain interprocessor
> interrupts but may introduce a delay due to the scheduling,
> particularly on loaded machines. Add a command line option to disable
> the behavior. This behavior is less present in other tools like `perf
> record`, as it uses a ring buffer and doesn't make repeated system
> calls.

Like i wrote earlier a much better fix for starvation is to use
real-time priority instead of the old IPI storms this flag
is bringing back.

-Andi