On Tue, 19 Feb 2008, Eric Dumazet wrote:
quoted text > 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.
--
unsubscribe notice To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Messages in current thread:
Re: Linux 2.6.25-rc2 , Christoph Lameter , (Wed Feb 27, 7:32 pm)