History

sched/fair: Dissociate wakeup decisions from SD flag value

The CFS wakeup code will only ever go through EAS / its fast path on "regular" wakeups (i.e. not on forks or execs). These are currently gated by a check against 'sd_flag', which would be SD_BALANCE_WAKE at wakeup. However, we now have a flag that explicitly tells us whether a wakeup is a "regular" one, so hinge those conditions on that flag instead.

Valentin Schneider committed 6 years ago

Commit dc824eb1 parent 3aef1551 file · +2 −3Browse files

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

Unified · Split

kernel/sched/fair.c+2−3
@@ -6705,7 +6705,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int wake_flags) · 6704 unmodified lines
67056705 /* SD_flags and WF_flags share the first nibble */
67066706 int sd_flag = wake_flags & 0xF;
67076707
6708− if (sd_flag & SD_BALANCE_WAKE) {
6708+ if (wake_flags & WF_TTWU) {
67096709 record_wakee(p);
67106710
67116711 if (sched_energy_enabled()) {
@@ -6742,9 +6742,8 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int wake_flags) · 30 unmodified lines
67426742 if (unlikely(sd)) {
67436743 /* Slow path */
67446744 new_cpu = find_idlest_cpu(sd, p, cpu, prev_cpu, sd_flag);
6745− } else if (sd_flag & SD_BALANCE_WAKE) { /* XXX always ? */
6745+ } else if (wake_flags & WF_TTWU) { /* XXX always ? */
67466746 /* Fast path */
6747−
67486747 new_cpu = select_idle_sibling(p, prev_cpu, new_cpu);
67496748
67506749 if (want_affine)

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