diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-04 08:36:58 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-04 08:36:58 -0700 |
commit | 148086bb64694cc91624bab2a550d50f800eb4b7 (patch) | |
tree | 77e208ccee6fc97c608f6d827e2605345bf3b20d /kernel/sched.c | |
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/sched.c')
-rw-r--r-- | kernel/sched.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index f592ce6f861..a8845516ace 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -5011,6 +5011,17 @@ recheck: return -EINVAL; } + /* + * If not changing anything there's no need to proceed further: + */ + if (unlikely(policy == p->policy && (!rt_policy(policy) || + param->sched_priority == p->rt_priority))) { + + __task_rq_unlock(rq); + raw_spin_unlock_irqrestore(&p->pi_lock, flags); + return 0; + } + #ifdef CONFIG_RT_GROUP_SCHED if (user) { /* |