History

sched/fair: Avoid a second scan of target in select_idle_cpu

When select_idle_cpu starts scanning for an idle CPU, it starts with a target CPU that has already been checked by select_idle_sibling. This patch starts with the next CPU instead.

Mel Gorman committed 5 years ago

Commit 56498cf1 parent 89aafd61 file · +1 −1Browse files

Unified · Split

kernel/sched/fair.c+1−1
@@ -6220,7 +6220,7 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool · 6219 unmodified lines
62206220 time = cpu_clock(this);
62216221 }
62226222
6223− for_each_cpu_wrap(cpu, cpus, target) {
6223+ for_each_cpu_wrap(cpu, cpus, target + 1) {
62246224 if (has_idle_core) {
62256225 i = select_idle_core(p, cpu, cpus, &idle_cpu);
62266226 if ((unsigned int)i < nr_cpumask_bits)

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