diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-24 16:11:13 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-24 16:11:13 -0700 |
commit | d1caeb02b17c6bc215a9a40a98a1beb92dcbd310 (patch) | |
tree | 4ed5e724ce073c270fb9e4d8d9cb665b826ff111 /kernel/sched_rt.c | |
parent | 37a3cc99d5048df62bb201c0b45a51ba94497e45 (diff) | |
parent | 095e56c7036fe97bc3ebcd80ed6e121be0847656 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
sched: fix startup penalty calculation
sched: simplify bonus calculation #2
sched: simplify bonus calculation #1
sched: tidy up and simplify the bonus balance
sched: optimize task_tick_rt() a bit
sched: simplify can_migrate_task()
sched: remove HZ dependency from the granularity default
sched: CONFIG_SCHED_GROUP_FAIR=y fixlet
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r-- | kernel/sched_rt.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index dcdcad632fd9..4b87476a02d0 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c @@ -207,10 +207,15 @@ static void task_tick_rt(struct rq *rq, struct task_struct *p) return; p->time_slice = static_prio_timeslice(p->static_prio); - set_tsk_need_resched(p); - /* put it at the end of the queue: */ - requeue_task_rt(rq, p); + /* + * Requeue to the end of queue if we are not the only element + * on the queue: + */ + if (p->run_list.prev != p->run_list.next) { + requeue_task_rt(rq, p); + set_tsk_need_resched(p); + } } static struct sched_class rt_sched_class __read_mostly = { |