mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Esben Nielsen <nielsen.esben@googlemail.com>
To: Steven Rostedt <rostedt@goodmis.org>
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: Re: [RT] rt priority losing
Date: Mon, 24 Jul 2006 18:00:24 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0607241758420.10471@localhost.localdomain> (raw)
In-Reply-To: <1153755660.4002.137.camel@localhost.localdomain>

On Mon, 24 Jul 2006, Steven Rostedt wrote:

> Ingo or Tglx,
>
> It has come to my attention that the dynamic hrtimer softirq can lose a
> boosted priority.  That is, if a softirq is running while a timeout
> happens, and the call back is of lower priority than the currently
> running hrtimer softirq, the timer interrupt will still lower the
> hrtimer softirq.
>
> Here's the problem code:
>
> static void wakeup_softirqd_prio(int softirq, int prio)
> {
> 	/* Interrupts are disabled: no need to stop preemption */
> 	struct task_struct *tsk = __get_cpu_var(ksoftirqd[softirq].tsk);
>
> 	if (tsk) {
> 		if (tsk->normal_prio != prio) {
> 			struct sched_param param;
>
> 			param.sched_priority = MAX_RT_PRIO-1 - prio;
> 			setscheduler(tsk, -1, SCHED_FIFO, &param);
> 		}
> 		if(tsk->state != TASK_RUNNING)
> 			wake_up_process(tsk);
> 	}
> }
>
>
> So, tsk could be softirqd-hrmono and we lower the priority. (only
> normal_prio is checked versus prio).
>
> So this can be a problem, if the softirq function holds a lock of a high
> priority task, and is running boosted.  If another timer goes off with a
> lower priority, we can lower the priority of the softirqd and lose the
> inherited priority that it was running at.

There is a check for that inside setscheduler():
 	p->prio = rt_mutex_getprio(p);

Esben

>
> -- Steve
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

  reply	other threads:[~2006-07-24 16:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-24 15:41 Steven Rostedt
2006-07-24 17:00 ` Esben Nielsen [this message]
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       ` [PATCH -rt] Don't let raise_softirq_prio lower the prio (was: [RT] rt priority losing) Steven Rostedt
2006-07-26  8:10         ` 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=Pine.LNX.4.64.0607241758420.10471@localhost.localdomain \
    --to=nielsen.esben@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --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

all inboxes | Powered by JetHome®