From: Steven Rostedt <rostedt@goodmis.org>
To: Dean Nelson <dcn@SGI.com>
Cc: mingo@elte.hu, linux-ia64@vger.kernel.org, linux-altix@SGI.com,
edwardsg@SGI.com, linux-kernel@vger.kernel.org, akpm@osdl.org,
anton.wilson@camotion.com
Subject: Re: [PATCH] MAX_USER_RT_PRIO and MAX_RT_PRIO are wrong!
Date: Tue, 07 Jun 2005 13:31:59 -0400 [thread overview]
Message-ID: <1118165519.5667.3.camel@localhost.localdomain> (raw)
In-Reply-To: <20050607154846.GA1253@sgi.com>
On Tue, 2005-06-07 at 10:48 -0500, Dean Nelson wrote:
> You are correct xpc_activating() needs to be changed to use MAX_RT_PRIO.
> So please do add that change to your patch.
I haven't tested this patch, I just used the previous patch (which I did
test) and added your change.
-- Steve
--- linux-2.6.12-rc6/kernel/sched.c.orig 2005-06-07 13:22:33.000000000 -0400
+++ linux-2.6.12-rc6/kernel/sched.c 2005-06-07 13:22:37.000000000 -0400
@@ -3347,7 +3347,7 @@
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;
}
@@ -3379,7 +3379,8 @@
* 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;
--- linux-2.6.12-rc6/arch/ia64/sn/kernel/xpc_main.c.orig 2005-06-07 13:23:26.000000000 -0400
+++ linux-2.6.12-rc6/arch/ia64/sn/kernel/xpc_main.c 2005-06-07 13:23:43.000000000 -0400
@@ -420,7 +420,7 @@
partid_t partid = (u64) __partid;
struct xpc_partition *part = &xpc_partitions[partid];
unsigned long irq_flags;
- struct sched_param param = { sched_priority: MAX_USER_RT_PRIO - 1 };
+ struct sched_param param = { sched_priority: MAX_RT_PRIO - 1 };
int ret;
next prev parent reply other threads:[~2005-06-07 17:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-07 2:46 [PATCH] MAX_USER_RT_PRIO and MAX_RT_PRIO are wrong! Steven Rostedt
2005-06-07 3:25 ` Steven Rostedt
2005-06-07 5:33 ` Ingo Molnar
2005-06-07 11:25 ` Steven Rostedt
2005-06-07 15:48 ` Dean Nelson
2005-06-07 17:31 ` Steven Rostedt [this message]
2005-06-07 19:10 ` Dean Nelson
2005-06-07 19:23 ` Steven Rostedt
2005-06-07 20:19 ` Dean Nelson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1118165519.5667.3.camel@localhost.localdomain \
--to=rostedt@goodmis.org \
--cc=akpm@osdl.org \
--cc=anton.wilson@camotion.com \
--cc=dcn@SGI.com \
--cc=edwardsg@SGI.com \
--cc=linux-altix@SGI.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox