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

From: Linus Torvalds
Date: Wed May 04 2011 - 17:20:28 EST


On Wed, May 4, 2011 at 2:06 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> The problem is that cmpxchg *IS*NOT*AN*CMPXCHG*AT*ALL*. Not even on UP.

Btw, the really sad thing is that as far as I can tell, the
cmpxchg64_local() function that we define actually gets this *right*,
with a helper function that actually works (and disables interrupts)
and all the alternative_io() stuff to then use the right instruction
automatically if the CPU supports it, rather than making it a
hardcoded decision.

But we don't use it, because the "percpu_cmpxchg8b_double()" code
rolls its own inferior version, and has slightly different semantics
(ie the whole "return value success" thing).

So close, but yet so far.

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