diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-11 03:22:04 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-11 03:22:04 -0500 |
commit | 95fd4845ed0ffcab305b4f30ce1c12dc34f1b56c (patch) | |
tree | aa2aac22a5b329b778a6771a87bbf1945ad49bbd /kernel/sched.c | |
parent | d278c48435625cb6b7edcf6a547620768b175709 (diff) | |
parent | 8e4921515c1a379539607eb443d51c30f4f7f338 (diff) |
Merge commit 'v2.6.29-rc4' into perfcounters/core
Conflicts:
arch/x86/kernel/setup_percpu.c
arch/x86/mm/fault.c
drivers/acpi/processor_idle.c
kernel/irq/handle.c
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 173768f142ad..0952931ca7f6 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -2311,6 +2311,16 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync) | |||
2311 | if (!sched_feat(SYNC_WAKEUPS)) | 2311 | if (!sched_feat(SYNC_WAKEUPS)) |
2312 | sync = 0; | 2312 | sync = 0; |
2313 | 2313 | ||
2314 | if (!sync) { | ||
2315 | if (current->se.avg_overlap < sysctl_sched_migration_cost && | ||
2316 | p->se.avg_overlap < sysctl_sched_migration_cost) | ||
2317 | sync = 1; | ||
2318 | } else { | ||
2319 | if (current->se.avg_overlap >= sysctl_sched_migration_cost || | ||
2320 | p->se.avg_overlap >= sysctl_sched_migration_cost) | ||
2321 | sync = 0; | ||
2322 | } | ||
2323 | |||
2314 | #ifdef CONFIG_SMP | 2324 | #ifdef CONFIG_SMP |
2315 | if (sched_feat(LB_WAKEUP_UPDATE)) { | 2325 | if (sched_feat(LB_WAKEUP_UPDATE)) { |
2316 | struct sched_domain *sd; | 2326 | struct sched_domain *sd; |
@@ -4774,8 +4784,8 @@ EXPORT_SYMBOL(default_wake_function); | |||
4774 | * started to run but is not in state TASK_RUNNING. try_to_wake_up() returns | 4784 | * started to run but is not in state TASK_RUNNING. try_to_wake_up() returns |
4775 | * zero in this (rare) case, and we handle it by continuing to scan the queue. | 4785 | * zero in this (rare) case, and we handle it by continuing to scan the queue. |
4776 | */ | 4786 | */ |
4777 | static void __wake_up_common(wait_queue_head_t *q, unsigned int mode, | 4787 | void __wake_up_common(wait_queue_head_t *q, unsigned int mode, |
4778 | int nr_exclusive, int sync, void *key) | 4788 | int nr_exclusive, int sync, void *key) |
4779 | { | 4789 | { |
4780 | wait_queue_t *curr, *next; | 4790 | wait_queue_t *curr, *next; |
4781 | 4791 | ||