diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-02-11 08:27:17 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-11 08:43:35 -0500 |
commit | fc631c82e1734d718ff0832558f64c8f5d185f26 (patch) | |
tree | 7bef1c5f3f2c3f454280026e1a528de526302827 /kernel/sched_fair.c | |
parent | 483b4ee60edbefdfbff0dd538fb81f368d9e7c0d (diff) |
sched: revert recent sync wakeup changes
Intel reported a 10% regression (mysql+sysbench) on a 16-way machine
with these patches:
1596e29: sched: symmetric sync vs avg_overlap
d942fb6: sched: fix sync wakeups
Revert them.
Reported-by: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
Bisected-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index a7e50ba185ac..0566f2a03c42 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -1191,15 +1191,20 @@ wake_affine(struct sched_domain *this_sd, struct rq *this_rq, | |||
1191 | int idx, unsigned long load, unsigned long this_load, | 1191 | int idx, unsigned long load, unsigned long this_load, |
1192 | unsigned int imbalance) | 1192 | unsigned int imbalance) |
1193 | { | 1193 | { |
1194 | struct task_struct *curr = this_rq->curr; | ||
1195 | struct task_group *tg; | ||
1194 | unsigned long tl = this_load; | 1196 | unsigned long tl = this_load; |
1195 | unsigned long tl_per_task; | 1197 | unsigned long tl_per_task; |
1196 | struct task_group *tg; | ||
1197 | unsigned long weight; | 1198 | unsigned long weight; |
1198 | int balanced; | 1199 | int balanced; |
1199 | 1200 | ||
1200 | if (!(this_sd->flags & SD_WAKE_AFFINE) || !sched_feat(AFFINE_WAKEUPS)) | 1201 | if (!(this_sd->flags & SD_WAKE_AFFINE) || !sched_feat(AFFINE_WAKEUPS)) |
1201 | return 0; | 1202 | return 0; |
1202 | 1203 | ||
1204 | if (sync && (curr->se.avg_overlap > sysctl_sched_migration_cost || | ||
1205 | p->se.avg_overlap > sysctl_sched_migration_cost)) | ||
1206 | sync = 0; | ||
1207 | |||
1203 | /* | 1208 | /* |
1204 | * If sync wakeup then subtract the (maximum possible) | 1209 | * If sync wakeup then subtract the (maximum possible) |
1205 | * effect of the currently running task from the load | 1210 | * effect of the currently running task from the load |
@@ -1426,7 +1431,9 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int sync) | |||
1426 | if (!sched_feat(WAKEUP_PREEMPT)) | 1431 | if (!sched_feat(WAKEUP_PREEMPT)) |
1427 | return; | 1432 | return; |
1428 | 1433 | ||
1429 | if (sched_feat(WAKEUP_OVERLAP) && sync) { | 1434 | if (sched_feat(WAKEUP_OVERLAP) && (sync || |
1435 | (se->avg_overlap < sysctl_sched_migration_cost && | ||
1436 | pse->avg_overlap < sysctl_sched_migration_cost))) { | ||
1430 | resched_task(curr); | 1437 | resched_task(curr); |
1431 | return; | 1438 | return; |
1432 | } | 1439 | } |