* [PATCH] sched: inaccurate calculation for normal priority
@ 2008-11-24 12:05 jia zhang
0 siblings, 0 replies; only message in thread
From: jia zhang @ 2008-11-24 12:05 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar
Here we should check to see if the task is a rt ktherad or normal rt process, although right now MAX_USER_RT_PRIO is equal MAX_RT_PRIO.
Signed-off-by: jia zhang <jia.zhang2008@gmail.com>
---
b/kernel/sched.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 9b1e793..b3038e4 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1711,7 +1711,8 @@ static inline int normal_prio(struct task_struct *p)
int prio;
if (task_has_rt_policy(p))
- prio = MAX_RT_PRIO-1 - p->rt_priority;
+ prio = p->mm ? MAX_USER_RT_PRIO-1 - p->rt_priority :
+ MAX_RT_PRIO-1 - p->rt_priority;
else
prio = __normal_prio(p);
return prio;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-24 12:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-24 12:05 [PATCH] sched: inaccurate calculation for normal priority jia zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox