Re: [block IO crash] Re: 2.6.39-rc5-git2 boot crashs

From: Christoph Lameter
Date: Wed May 04 2011 - 10:19:50 EST


On Wed, 4 May 2011, Thomas Gleixner wrote:

> Index: linux-2.6/include/linux/percpu.h
> ===================================================================
> --- linux-2.6.orig/include/linux/percpu.h
> +++ linux-2.6/include/linux/percpu.h
> @@ -948,7 +948,7 @@ do { \
> irqsafe_generic_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2)
> # endif
> # define irqsafe_cpu_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) \
> - __pcpu_double_call_return_int(irqsafe_cpu_cmpxchg_double_, (pcp1), (pcp2), (oval1), (oval2), (nval1), (nval2))
> + __pcpu_double_call_return_bool(irqsafe_cpu_cmpxchg_double_, (pcp1), (pcp2), (oval1), (oval2), (nval1), (nval2))
> #endif
>
> #endif /* __LINUX_PERCPU_H */

Looking at the same thing here testing a similar patch. This should go
separately as a bug fix.

> Index: linux-2.6/mm/slub.c
> ===================================================================
> --- linux-2.6.orig/mm/slub.c
> +++ linux-2.6/mm/slub.c
> @@ -1940,7 +1940,7 @@ redo:
> * Since this is without lock semantics the protection is only against
> * code executing on this cpu *not* from access by other cpus.
> */
> - if (unlikely(!this_cpu_cmpxchg_double(
> + if (unlikely(!irqsafe_cpu_cmpxchg_double(
> s->cpu_slab->freelist, s->cpu_slab->tid,
> object, tid,
> get_freepointer(s, object), next_tid(tid)))) {
> @@ -2145,7 +2145,7 @@ redo:
> set_freepointer(s, object, c->freelist);
>
> #ifdef CONFIG_CMPXCHG_LOCAL
> - if (unlikely(!this_cpu_cmpxchg_double(
> + if (unlikely(!irqsafe_cpu_cmpxchg_double(
> s->cpu_slab->freelist, s->cpu_slab->tid,
> c->freelist, tid,
> object, next_tid(tid)))) {
>

Ok as a basic fix since it does not change the code generated for the
common x86 and other.

My version also takes out the CONFIG_CMPXCHG_LOCAL.

We could make the above two patches and then make the CONFIG_CMPXCHG_LOCAL
removal a separate one (since it requires some benchmarking).

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