lkml.org 
[lkml]   [2006]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH -rt] Don't let raise_softirq_prio lower the prio (was: [RT] rt priority losing)
From
Date
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;

-
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/

\
 
 \ /
  Last update: 2006-07-24 19:19    [W:1.201 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site