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

From: Christoph Lameter
Date: Wed May 04 2011 - 11:28:13 EST


On Wed, 4 May 2011, Linus Torvalds wrote:

> On Wed, May 4, 2011 at 8:00 AM, Christoph Lameter <cl@xxxxxxxxx> wrote:
> >
> > Right there is only the tid management that is added. Hope I am fast
> > enough to at least get one patch in (not very well tested):
>
> So the thing that worries me about this is non-x86 architectures.
>
> Have we verified that the generic routines are ok for all
> architectures? Has somebody checked the memory barriers in particular?

There are no memory barriers used. The barrier() here is a compiler hint
to not keep data across it. This is dealing with concurrency issues on
the *same* cpu due to preemption and irqs. It avoids the interrupt
disable. There no memory barrier issues for code running on a single cpu.
The cpu is always guaranteed to have a consistent view of the data.

There is an additional patchset that also uses a cmpxchg_double for the
slowpath. There barrier issues may arise because concurrent access is
possible but that is likely to be merged only in 2.6.41. The
cmpxchg_double in that case is a locked operation.

> Things that work on x86 may not work on non-x86. Everything should be
> per-cpu _except_ for the initialization, I think, but that should be
> double-checked.

The fallback path is using interrupt disable / enable. This must be
working on all arches AFAICT.

> My gut reaction would be: let's do the minimal patch that just fixes
> things to do irqsafe_cpu_cmpxchg_double() for 2.6.39, and then let's
> remove the #ifdef'fery in -rc1. Or make _really_ sure that things are
> ok for platforms that never even triggered the CMPXCHG_LOCAL case
> before.
>
> Hmm?

Ok. Pekka can put that patch in for the next round of merges?

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