diff options
| author | Shrikanth Hegde <sshegde@linux.ibm.com> | 2026-03-24 01:06:27 +0530 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2026-03-24 10:07:04 +0100 |
| commit | 76504bce4ee6b8757647e07bc1710dcac9acdc2e (patch) | |
| tree | f9d3aecee16a2cbcf456f5645e4b4b32ee943105 /tools/perf/scripts/python/bin | |
| parent | e379dce8af11d8d6040b4348316a499bfd174bfb (diff) | |
sched/fair: Get this cpu once in find_new_ilb()
Calling smp_processor_id() on:
- In CONFIG_DEBUG_PREEMPT=y, if preemption/irq is disabled, then it does
not print any warning.
- In CONFIG_DEBUG_PREEMPT=n, it doesn't do anything apart from getting
__smp_processor_id
So with both CONFIG_DEBUG_PREEMPT=y/n, in preemption disabled section
it is better to cache the value. It could save a few cycles. Though
tiny, repeated in loop could add up to a small value.
find_new_ilb is called in interrupt context. So preemption is disabled.
So Hoist the this_cpu out of loop
Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com>
Link: https://patch.msgid.link/20260323193630.640311-2-sshegde@linux.ibm.com
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
