summaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-01-26 17:56:17 +0100
committerIngo Molnar <mingo@elte.hu>2009-02-01 10:49:06 +0100
commitd942fb6c7d391baba3dddb566eb735fbf3df8528 (patch)
tree0340b810c79f873b7aea34298aa22e2ebf740df3 /kernel/sched.c
parentf90d4118bacef87894621a3e8aba853fa0c89abc (diff)
downloadop-kernel-dev-d942fb6c7d391baba3dddb566eb735fbf3df8528.zip
op-kernel-dev-d942fb6c7d391baba3dddb566eb735fbf3df8528.tar.gz
sched: fix sync wakeups
Pawel Dziekonski reported that the openssl benchmark and his quantum chemistry application both show slowdowns due to the scheduler under-parallelizing execution. The reason are pipe wakeups still doing 'sync' wakeups which overrides the normal buddy wakeup logic - even if waker and wakee are loosely coupled. Fix an inversion of logic in the buddy wakeup code. Reported-by: Pawel Dziekonski <dzieko@gmail.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 52bbf1c..770b1f9 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2266,6 +2266,10 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
if (!sched_feat(SYNC_WAKEUPS))
sync = 0;
+ if (!sync && (current->se.avg_overlap < sysctl_sched_migration_cost &&
+ p->se.avg_overlap < sysctl_sched_migration_cost))
+ sync = 1;
+
#ifdef CONFIG_SMP
if (sched_feat(LB_WAKEUP_UPDATE)) {
struct sched_domain *sd;
OpenPOWER on IntegriCloud