lkml.org 
[lkml]   [2006]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] realtime-preempt patch-2.6.15-rt19 compile error (was: realtime-preempt patch-2.6.15-rt18 issues)

* 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];
-
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-03-15 10:36    [W:0.474 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site