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

From: Thomas Gleixner
Date: Wed May 04 2011 - 10:21:39 EST


On Wed, 4 May 2011, Christoph Lameter wrote:
>
> The above should not happen. If a kernel config indicates that there is no
> cmpxchg16b/cmpxchg8b available then we need to not compile the path that
> uses cmpxchg8b/cmpxchg16b. Guess we need CMPXCHG_DOUBLE_LOCAL or so.

Oh no, you have perfectly fine replacements for that in percpu.h with
irqsafe and preempt safe versions. So why adding another CONFIG from
hell which creates even more ifdef mess ?

The whole CONFIG_CMPXCHG_LOCAL ifdeffery in slub.c is horrible and I
think it's not necessary at all for two reasons:

1) irqsafe_cpu_cmpxchg() can be emulated cheap and we still have the
advantatage of shorter irq disabled sections. And the difference
between the current CONFIG_CMPXCHG_LOCAL=n and using the emulation
macros with the short irqsave/restore around the access is probably
not measurable at all.

2) that would actually test the code under all possible combinations
and not splitting the tester base into x86 and !x86. So that bug
would have been avoided in the first place.

Thanks,

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