Commit 0df0d063 authored by Nick Piggin's avatar Nick Piggin Committed by Linus Torvalds

[PATCH] sched: make rt_task unlikely

From: Ingo Molnar <mingo@elte.hu>

RT tasks are unlikely, move this into rt_task() instead of open-coding it.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ce9bb66d
......@@ -304,7 +304,7 @@ struct signal_struct {
#define MAX_PRIO (MAX_RT_PRIO + 40)
#define rt_task(p) ((p)->prio < MAX_RT_PRIO)
#define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO))
/*
* Some day this will be a full-fledged user tracking system..
......
......@@ -2019,7 +2019,7 @@ void scheduler_tick(int user_ticks, int sys_ticks)
* timeslice. This makes it possible for interactive tasks
* to use up their timeslices at their highest priority levels.
*/
if (unlikely(rt_task(p))) {
if (rt_task(p)) {
/*
* RR tasks need a special form of timeslice management.
* FIFO tasks have no timeslices.
......@@ -3015,7 +3015,7 @@ asmlinkage long sys_sched_yield(void)
* (special rule: RT tasks will just roundrobin in the active
* array.)
*/
if (unlikely(rt_task(current)))
if (rt_task(current))
target = rq->active;
dequeue_task(current, array);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment