On Tue, 2005-06-07 at 13:04 +0200, Ingo Molnar wrote:
> i have released the -V0.7.47-20 Real-Time Preemption patch, which can be
> downloaded from the usual place:
>
Ingo,
Here's the MAX_USER_RT_PRIO patch against your kernel.
-- Steve
--- kernel/sched.c.orig 2005-06-07 07:25:37.000000000 -0400
+++ kernel/sched.c 2005-06-07 07:27:38.000000000 -0400
@@ -2865,7 +2865,7 @@ static void trace_array(prio_array_t *ar
trace_special_pid(p->pid, p->prio,
p->policy == SCHED_NORMAL ?
p->static_prio :
- MAX_USER_RT_PRIO - p->rt_priority);
+ (MAX_RT_PRIO-1) - p->rt_priority);
}
}
}
@@ -3632,7 +3632,7 @@ int mutex_getprio(task_t *p)
int prio;
if (p->policy != SCHED_NORMAL)
- prio = MAX_USER_RT_PRIO-1 - p->rt_priority;
+ prio = MAX_RT_PRIO-1 - p->rt_priority;
else
prio = __effective_prio(p);
trace_special_pid(p->pid, p->prio, prio);
@@ -3794,7 +3794,7 @@ static void __setscheduler(struct task_s
p->policy = policy;
p->rt_priority = prio;
if (policy != SCHED_NORMAL)
- p->prio = MAX_USER_RT_PRIO-1 - p->rt_priority;
+ p->prio = MAX_RT_PRIO-1 - p->rt_priority;
else
p->prio = p->static_prio;
}
@@ -3826,7 +3826,8 @@ recheck:
* 1..MAX_USER_RT_PRIO-1, valid priority for SCHED_NORMAL is 0.
*/
if (param->sched_priority < 0 ||
- param->sched_priority > MAX_USER_RT_PRIO-1)
+ (p->mm && param->sched_priority > MAX_USER_RT_PRIO-1) ||
+ (!p->mm && param->sched_priority > MAX_RT_PRIO-1))
return -EINVAL;
if ((policy == SCHED_NORMAL) != (param->sched_priority == 0))
return -EINVAL;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]