Skip to content

Commit 45da7a2

Browse files
author
Peter Zijlstra
committed
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>
1 parent b13772f commit 45da7a2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎kernel/sched/fair.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10056,6 +10056,10 @@ static inline int find_new_ilb(void)
1005610056

1005710057
for_each_cpu_and(ilb, nohz.idle_cpus_mask,
1005810058
housekeeping_cpumask(HK_FLAG_MISC)) {
10059+
10060+
if (ilb == smp_processor_id())
10061+
continue;
10062+
1005910063
if (idle_cpu(ilb))
1006010064
return ilb;
1006110065
}

0 commit comments

Comments
 (0)