aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 770b1f9ebe14..242d0d47a70d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2266,9 +2266,15 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
2266 if (!sched_feat(SYNC_WAKEUPS)) 2266 if (!sched_feat(SYNC_WAKEUPS))
2267 sync = 0; 2267 sync = 0;
2268 2268
2269 if (!sync && (current->se.avg_overlap < sysctl_sched_migration_cost && 2269 if (!sync) {
2270 p->se.avg_overlap < sysctl_sched_migration_cost)) 2270 if (current->se.avg_overlap < sysctl_sched_migration_cost &&
2271 sync = 1; 2271 p->se.avg_overlap < sysctl_sched_migration_cost)
2272 sync = 1;
2273 } else {
2274 if (current->se.avg_overlap >= sysctl_sched_migration_cost ||
2275 p->se.avg_overlap >= sysctl_sched_migration_cost)
2276 sync = 0;
2277 }
2272 2278
2273#ifdef CONFIG_SMP 2279#ifdef CONFIG_SMP
2274 if (sched_feat(LB_WAKEUP_UPDATE)) { 2280 if (sched_feat(LB_WAKEUP_UPDATE)) {