Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163015
b: refs/heads/master
c: e69b0f1
h: refs/heads/master
i:
  163013: 3a98491
  163011: c6aa321
  163007: 21b9d1b
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Sep 15, 2009
1 parent 045664a commit 10db5ab
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 63859d4fe4c97b737e7adbfe60acb1c2b2e668cb
refs/heads/master: e69b0f1b41c0e57bb1e29100b5810a5914efcb45
14 changes: 11 additions & 3 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1165,9 +1165,17 @@ static int wake_affine(struct sched_domain *sd, struct task_struct *p, int sync)
load = source_load(prev_cpu, idx);
this_load = target_load(this_cpu, idx);

if (sync && (curr->se.avg_overlap > sysctl_sched_migration_cost ||
p->se.avg_overlap > sysctl_sched_migration_cost))
sync = 0;
if (sync) {
if (sched_feat(SYNC_LESS) &&
(curr->se.avg_overlap > sysctl_sched_migration_cost ||
p->se.avg_overlap > sysctl_sched_migration_cost))
sync = 0;
} else {
if (sched_feat(SYNC_MORE) &&
(curr->se.avg_overlap < sysctl_sched_migration_cost &&
p->se.avg_overlap < sysctl_sched_migration_cost))
sync = 1;
}

/*
* If sync wakeup then subtract the (maximum possible)
Expand Down
10 changes: 10 additions & 0 deletions trunk/kernel/sched_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ SCHED_FEAT(SYNC_WAKEUPS, 1)
*/
SCHED_FEAT(AFFINE_WAKEUPS, 1)

/*
* Weaken SYNC hint based on overlap
*/
SCHED_FEAT(SYNC_LESS, 1)

/*
* Add SYNC hint based on overlap
*/
SCHED_FEAT(SYNC_MORE, 0)

/*
* Prefer to schedule the task we woke last (assuming it failed
* wakeup-preemption), since its likely going to consume data we
Expand Down

0 comments on commit 10db5ab

Please sign in to comment.