History

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.

Peter Zijlstra committed 6 years ago

Commit 45da7a21 parent b13772f1 file · +4 −0Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/sched/fair.c+4−0
@@ -10056,6 +10056,10 @@ static inline int find_new_ilb(void) · 10055 unmodified lines
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 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t