linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Esben Nielsen <nielsen.esben@googlemail.com>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	"Duetsch, Thomas LDE1" <thomas.duetsch@siemens.com>
Subject: [PATCH -rt] Don't let raise_softirq_prio lower the prio (was: [RT] rt priority losing)
Date: Mon, 24 Jul 2006 13:15:01 -0400	[thread overview]
Message-ID: <1153761301.11295.30.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.64.0607241854360.10471@localhost.localdomain>

On Mon, 2006-07-24 at 18:54 +0100, Esben Nielsen wrote:

> >
> > OK, you are right about this.  The PI chain should not be affected.  But
> > this could still be a problem if the softirq was running at a high prio
> > for a task when a lower prio callback needs to be made.  It looks like
> > timer is removed from the base before the function runs.  So when the
> > interrupt looks at the base to determine the priority to set it at, it
> > might actually lower the priority of a running hrtimer thread.
> >
> 
> That is a simple bug which ought to be simple fixable.

I guess the simple fix is not to allow the interrupt to lower the
priority. But simple fixes do not always handle all the cases.

Thomas G., see any side effects with this patch?

-- Steve

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Index: linux-2.6.17-rt7/kernel/softirq.c
===================================================================
--- linux-2.6.17-rt7.orig/kernel/softirq.c	2006-07-24 13:08:53.000000000 -0400
+++ linux-2.6.17-rt7/kernel/softirq.c	2006-07-24 13:10:13.000000000 -0400
@@ -108,7 +108,12 @@ static void wakeup_softirqd_prio(int sof
 	struct task_struct *tsk = __get_cpu_var(ksoftirqd[softirq].tsk);
 
 	if (tsk) {
-		if (tsk->normal_prio != prio) {
+		/*
+		 * The lower the prio, the higher the priority.
+		 * This can only raise the priority but it can
+		 * not lower it.
+		 */
+		if (tsk->normal_prio > prio) {
 			struct sched_param param;
 
 			param.sched_priority = MAX_RT_PRIO-1 - prio;



  reply	other threads:[~2006-07-24 17:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-24 15:41 [RT] rt priority losing Steven Rostedt
2006-07-24 17:00 ` Esben Nielsen
2006-07-24 16:37   ` Steven Rostedt
2006-07-24 16:44     ` Thomas Gleixner
2006-07-24 17:54     ` Esben Nielsen
2006-07-24 17:15       ` Steven Rostedt [this message]
2006-07-26  8:10         ` [PATCH -rt] Don't let raise_softirq_prio lower the prio (was: [RT] rt priority losing) Ingo Molnar

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=1153761301.11295.30.camel@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nielsen.esben@googlemail.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.duetsch@siemens.com \
    /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;
as well as URLs for NNTP newsgroup(s).