Re: Linux 2.6.25-rc2

From: Christoph Lameter
Date: Wed Feb 27 2008 - 18:32:26 EST


On Tue, 19 Feb 2008, Eric Dumazet wrote:

> I wonder how SLUB_FASTPATH is supposed to work, since it is affected by
> a classical ABA problem of lockless algo.
>
> cmpxchg_local(&c->freelist, object, object[c->offset]) can succeed,
> while an interrupt came (on this cpu), and several allocations were done,
> and one free was performed at the end of this interruption, so 'object'
> was recycled.
> c->freelist can then contain the previous value (object), but
> object[c->offset] was changed by IRQ.
>
> We then put back in freelist an already allocated object.

Right. The alloc fastpath assumes that the object is not modified while it
is allocated...

Du! This shoots my nice scheme in the foot and there does not seem to be
an easy way to fix it. This means we also need to revert the
page->end patch. Useless if we do not have the cmpxchg_local.



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