Commit 45da7a2b authored by Peter Zijlstra's avatar Peter Zijlstra

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: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
parent b13772f8
...@@ -10056,6 +10056,10 @@ static inline int find_new_ilb(void) ...@@ -10056,6 +10056,10 @@ static inline int find_new_ilb(void)
for_each_cpu_and(ilb, nohz.idle_cpus_mask, for_each_cpu_and(ilb, nohz.idle_cpus_mask,
housekeeping_cpumask(HK_FLAG_MISC)) { housekeeping_cpumask(HK_FLAG_MISC)) {
if (ilb == smp_processor_id())
continue;
if (idle_cpu(ilb)) if (idle_cpu(ilb))
return ilb; return ilb;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment