From: Ingo Molnar <mingo@elte.hu>
To: karsten wiese <annabellesgarden@yahoo.de>
Cc: Rui Nuno Capela <rncbc@rncbc.org>,
Jan Altenberg <tb10alj@tglx.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] realtime-preempt patch-2.6.15-rt19 compile error (was: realtime-preempt patch-2.6.15-rt18 issues)
Date: Wed, 15 Mar 2006 10:31:22 +0100 [thread overview]
Message-ID: <20060315093122.GA1682@elte.hu> (raw)
In-Reply-To: <20060314231344.44688.qmail@web26506.mail.ukl.yahoo.com>
* karsten wiese <annabellesgarden@yahoo.de> wrote:
>
> --- Rui Nuno Capela <rncbc@rncbc.org> schrieb:
> > - The SLAB related usb-storage crash on disconnect is
> > still there:
>
> and its still in up to rc6-rt3, unless you apply attached patch. My
> uniprocessor behaves with it.
ah, indeed!
> Ingo, what exactly needs fixing here?
smp_call_function() will call things in a hardirq context, so calling
do_drain() from there [which uses preemptible spinlocks, etc.] is
unsafe. (it will work most of the time, but not all of the time) It
should rather be done from some per-CPU task.
a better fix would be the one below - it still does the call on the
current CPU, and skips other CPUs (on SMP). Does this solve the problem
on your box too?
Ingo
Index: linux-rt.q/mm/slab.c
===================================================================
--- linux-rt.q.orig/mm/slab.c
+++ linux-rt.q/mm/slab.c
@@ -2192,19 +2192,20 @@ static void check_spinlock_acquired_node
*/
static void smp_call_function_all_cpus(void (*func)(void *arg), void *arg)
{
- unsigned long flags;
+ unsigned int this_cpu;
check_irq_on();
- preempt_disable();
+// preempt_disable();
- slab_irq_disable(flags);
+ slab_irq_disable(this_cpu);
func(arg);
- slab_irq_enable(flags);
+ slab_irq_enable(this_cpu);
- if (smp_call_function(func, arg, 1, 1))
- BUG();
+// FIXME
+// if (smp_call_function(func, arg, 1, 1))
+// BUG();
- preempt_enable();
+// preempt_enable();
}
static void drain_array_locked(struct kmem_cache *cachep, struct array_cache *ac,
@@ -2231,8 +2232,7 @@ static void drain_cpu_caches(struct kmem
int this_cpu;
int node;
-// FIXME:
-// smp_call_function_all_cpus(do_drain, cachep);
+ smp_call_function_all_cpus(do_drain, cachep);
check_irq_on();
for_each_online_node(node) {
l3 = cachep->nodelists[node];
next prev parent reply other threads:[~2006-03-15 9:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-06 12:11 realtime-preempt patch-2.6.15-rt18 issues Rui Nuno Capela
2006-03-06 12:35 ` Ingo Molnar
2006-03-06 13:24 ` Ingo Molnar
2006-03-06 15:10 ` Rui Nuno Capela
2006-03-07 9:40 ` [PATCH] realtime-preempt patch-2.6.15-rt19 compile error (was: realtime-preempt patch-2.6.15-rt18 issues) Jan Altenberg
2006-03-07 11:27 ` Ingo Molnar
2006-03-07 12:33 ` Rui Nuno Capela
2006-03-10 7:44 ` realtime-preempt patch-2.6.15-rt18 issues Jan Altenberg
2006-03-14 23:13 ` [PATCH] realtime-preempt patch-2.6.15-rt19 compile error (was: realtime-preempt patch-2.6.15-rt18 issues) karsten wiese
2006-03-15 9:31 ` Ingo Molnar [this message]
2006-03-15 10:19 ` Jan Altenberg
2006-03-15 11:04 ` Ingo Molnar
2006-03-15 14:08 ` karsten wiese
-- strict thread matches above, loose matches on Subject: below --
2006-03-08 17:15 Rui Nuno Capela
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=20060315093122.GA1682@elte.hu \
--to=mingo@elte.hu \
--cc=annabellesgarden@yahoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rncbc@rncbc.org \
--cc=tb10alj@tglx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.