diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 52bbf1c842a8..8ee437a5ec1d 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -2266,6 +2266,16 @@ 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) { | ||
2270 | if (current->se.avg_overlap < sysctl_sched_migration_cost && | ||
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 | } | ||
2278 | |||
2269 | #ifdef CONFIG_SMP | 2279 | #ifdef CONFIG_SMP |
2270 | if (sched_feat(LB_WAKEUP_UPDATE)) { | 2280 | if (sched_feat(LB_WAKEUP_UPDATE)) { |
2271 | struct sched_domain *sd; | 2281 | struct sched_domain *sd; |
@@ -4687,8 +4697,8 @@ EXPORT_SYMBOL(default_wake_function); | |||
4687 | * started to run but is not in state TASK_RUNNING. try_to_wake_up() returns | 4697 | * started to run but is not in state TASK_RUNNING. try_to_wake_up() returns |
4688 | * zero in this (rare) case, and we handle it by continuing to scan the queue. | 4698 | * zero in this (rare) case, and we handle it by continuing to scan the queue. |
4689 | */ | 4699 | */ |
4690 | static void __wake_up_common(wait_queue_head_t *q, unsigned int mode, | 4700 | void __wake_up_common(wait_queue_head_t *q, unsigned int mode, |
4691 | int nr_exclusive, int sync, void *key) | 4701 | int nr_exclusive, int sync, void *key) |
4692 | { | 4702 | { |
4693 | wait_queue_t *curr, *next; | 4703 | wait_queue_t *curr, *next; |
4694 | 4704 | ||