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

From: Christoph Lameter
Date: Wed May 04 2011 - 16:33:07 EST


On Wed, 4 May 2011, Valdis.Kletnieks@xxxxxx wrote:

> On Wed, 04 May 2011 15:04:39 CDT, Christoph Lameter said:
> > On Wed, 4 May 2011, Linus Torvalds wrote:
>
> > > But cmpxchg DOES NOT MAKE SENSE without atomicity guarantees.
> >
> > This is not a real cmpxchg after all. Its not atomic in the sense of
> > other functions. Its only "percpu atomic" if you want it that way. This is
> > *not* a full cmpxchg_double().
>
> Calling it a cmpxchg when it doesn't have the primary distinguishing property
> of a hardware cmpxchg is just loading a bullet in the chamber and inviting
> kernel hackers to point it at their feet...

It does have most of the distinguishing characterstics but the
lock-prefixless cmpxchg8b/16b (which is quite fast) is used in a
unique way here in a percpu fastdpath. Thats why we have the strange
naming this_cpu_cmpxchg_double etc.



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