diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-04 11:36:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-04 11:36:58 -0400 |
commit | 148086bb64694cc91624bab2a550d50f800eb4b7 (patch) | |
tree | 77e208ccee6fc97c608f6d827e2605345bf3b20d /kernel | |
parent | 4da7e90e653d67dfd405868246d316b04852e2d5 (diff) | |
parent | 3436ae1298cb22d722a6520fc97f112dd767a9e1 (diff) |
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: Fix rebalance interval calculation
sched, doc: Beef up load balancing description
sched: Leave sched_setscheduler() earlier if possible, do not disturb SCHED_FIFO tasks
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 11 | ||||
-rw-r--r-- | kernel/sched_fair.c | 5 |
2 files changed, 14 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index f592ce6f8616..a8845516ace6 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5011,6 +5011,17 @@ recheck: | |||
5011 | return -EINVAL; | 5011 | return -EINVAL; |
5012 | } | 5012 | } |
5013 | 5013 | ||
5014 | /* | ||
5015 | * If not changing anything there's no need to proceed further: | ||
5016 | */ | ||
5017 | if (unlikely(policy == p->policy && (!rt_policy(policy) || | ||
5018 | param->sched_priority == p->rt_priority))) { | ||
5019 | |||
5020 | __task_rq_unlock(rq); | ||
5021 | raw_spin_unlock_irqrestore(&p->pi_lock, flags); | ||
5022 | return 0; | ||
5023 | } | ||
5024 | |||
5014 | #ifdef CONFIG_RT_GROUP_SCHED | 5025 | #ifdef CONFIG_RT_GROUP_SCHED |
5015 | if (user) { | 5026 | if (user) { |
5016 | /* | 5027 | /* |
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 3f7ec9e27ee1..c7ec5c8e7b44 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/latencytop.h> | 23 | #include <linux/latencytop.h> |
24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
25 | #include <linux/cpumask.h> | ||
25 | 26 | ||
26 | /* | 27 | /* |
27 | * Targeted preemption latency for CPU-bound tasks: | 28 | * Targeted preemption latency for CPU-bound tasks: |
@@ -3850,8 +3851,8 @@ static void rebalance_domains(int cpu, enum cpu_idle_type idle) | |||
3850 | interval = msecs_to_jiffies(interval); | 3851 | interval = msecs_to_jiffies(interval); |
3851 | if (unlikely(!interval)) | 3852 | if (unlikely(!interval)) |
3852 | interval = 1; | 3853 | interval = 1; |
3853 | if (interval > HZ*NR_CPUS/10) | 3854 | if (interval > HZ*num_online_cpus()/10) |
3854 | interval = HZ*NR_CPUS/10; | 3855 | interval = HZ*num_online_cpus()/10; |
3855 | 3856 | ||
3856 | need_serialize = sd->flags & SD_SERIALIZE; | 3857 | need_serialize = sd->flags & SD_SERIALIZE; |
3857 | 3858 | ||