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

From: Christoph Lameter
Date: Wed May 04 2011 - 12:08:44 EST


On Wed, 4 May 2011, Linus Torvalds wrote:

> On Wed, May 4, 2011 at 8:28 AM, Christoph Lameter <cl@xxxxxxxxx> wrote:
> >
> > There are no memory barriers used. The barrier() here is a compiler hint
> > to not keep data across it.
>
> Go back and read my email, please.
>
> The lack of memory barriers is exactly what I worry about.
>
> Look at the initialization path. The "tid" thing is _not_ purely cpu-local.

kmem_cache_create() only hands the pointer to the slab cache back
after the percpu values have been initialized. In order to do an allocation one
needs to have the pointer to the slab cache.

You think that accesses to struct kmem_cache_cpu by other cpus could
require memory barriers? But this is what both SLAB and SLUB already do
today even before these modification. Nor do we have memory barriers for
the same situation in the page allocator.




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