From: Ingo Molnar <mingo@elte.hu>
To: Pieter Palmers <pieterp@joow.be>
Cc: Lee Revell <rlrevell@joe-job.com>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: status of: tasklet_unlock_wait() causes soft lockup with -rt and ieee1394 audio
Date: Mon, 22 Jan 2007 10:10:35 +0100 [thread overview]
Message-ID: <20070122091035.GA11821@elte.hu> (raw)
In-Reply-To: <45B3F7A5.2050708@joow.be>
* Pieter Palmers <pieterp@joow.be> wrote:
> Dear all,
>
> What is the status with respect to this problem? I see that in the
> current -rt patch the problematic code piece is different. I
> personally haven't tried to reproduce this myself on a more recent
> kernel, but I just got a report from one of our users who experienced
> the same problem with 2.6.19-rt15 and RT preemption (desktop
> preemption works fine).
>
> Should the latest -rt patches be fixed with respect to this issue? If
> so I'll try and test them, otherwise I omit the effort.
it's not fixed yet. Could you try the patch below?
Ingo
---
include/linux/interrupt.h | 6 ++----
kernel/softirq.c | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+), 4 deletions(-)
Index: linux/include/linux/interrupt.h
===================================================================
--- linux.orig/include/linux/interrupt.h
+++ linux/include/linux/interrupt.h
@@ -328,10 +328,8 @@ static inline void tasklet_unlock(struct
clear_bit(TASKLET_STATE_RUN, &(t)->state);
}
-static inline void tasklet_unlock_wait(struct tasklet_struct *t)
-{
- while (test_bit(TASKLET_STATE_RUN, &(t)->state)) { barrier(); }
-}
+extern void tasklet_unlock_wait(struct tasklet_struct *t);
+
#else
# define tasklet_trylock(t) 1
# define tasklet_tryunlock(t) 1
Index: linux/kernel/softirq.c
===================================================================
--- linux.orig/kernel/softirq.c
+++ linux/kernel/softirq.c
@@ -20,6 +20,7 @@
#include <linux/mm.h>
#include <linux/notifier.h>
#include <linux/percpu.h>
+#include <linux/delay.h>
#include <linux/cpu.h>
#include <linux/kthread.h>
#include <linux/rcupdate.h>
@@ -656,6 +657,25 @@ void __init softirq_init(void)
open_softirq(HI_SOFTIRQ, tasklet_hi_action, NULL);
}
+#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RT)
+
+void tasklet_unlock_wait(struct tasklet_struct *t)
+{
+ while (test_bit(TASKLET_STATE_RUN, &(t)->state)) {
+ /*
+ * Hack for now to avoid this busy-loop:
+ */
+#ifdef CONFIG_PREEMPT_RT
+ msleep(1);
+#else
+ barrier();
+#endif
+ }
+}
+EXPORT_SYMBOL(tasklet_unlock_wait);
+
+#endif
+
static int ksoftirqd(void * __data)
{
struct sched_param param = { .sched_priority = MAX_USER_RT_PRIO/2 };
next prev parent reply other threads:[~2007-01-22 9:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-08 15:18 tasklet_unlock_wait() causes soft lockup with -rt and ieee1394 audio Lee Revell
2006-07-09 1:51 ` Steven Rostedt
2006-07-09 2:12 ` Lee Revell
2006-07-09 11:17 ` Pieter Palmers
2006-07-10 14:41 ` Daniel Walker
2007-01-21 23:30 ` status of: " Pieter Palmers
2007-01-22 9:10 ` Ingo Molnar [this message]
2007-01-25 9:04 ` Pieter Palmers
2007-01-27 10:19 ` Pieter Palmers
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=20070122091035.GA11821@elte.hu \
--to=mingo@elte.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=pieterp@joow.be \
--cc=rlrevell@joe-job.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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