Re: [PATCH v3 9/9] perf stat: Add no-affinity flag
From: Andi Kleen
Date: Thu Nov 06 2025 - 12:31:34 EST
Ian Rogers <irogers@xxxxxxxxxx> writes:
> 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.
I would rather use a real time scheduling policy instead if you see starvation.
That would still get the batching efficiency.
If it's done it would be better in .perfconfig instead of adding ever
more obscure command line options.
-Andi