diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-08-18 11:48:17 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-10-29 13:00:30 +0300 |
commit | 45da7a2b0af8fa29dff2e6ba8926322068350fce (patch) | |
tree | e9b9745ab73fd899d35bcb1f089d91cae1151277 /kernel/sched | |
parent | b13772f8135633f273f0cf742143b19cffbf9e1d (diff) | |
download | linux-45da7a2b0af8fa29dff2e6ba8926322068350fce.tar.xz |
sched/fair: Exclude the current CPU from find_new_ilb()
It is possible for find_new_ilb() to select the current CPU, however,
this only happens from newidle balancing, in which case need_resched()
will be true, and consequently nohz_csd_func() will not trigger the
softirq.
Exclude the current CPU from becoming an ILB target.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/fair.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index b9368d123451..cd9a37c0601b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -10056,6 +10056,10 @@ static inline int find_new_ilb(void) for_each_cpu_and(ilb, nohz.idle_cpus_mask, housekeeping_cpumask(HK_FLAG_MISC)) { + + if (ilb == smp_processor_id()) + continue; + if (idle_cpu(ilb)) return ilb; } |