Re: SLOB lockup (was: Re: [tip:core/locking] lockdep: annotate reclaim context (__GFP_NOFS), fix SLOB)

From: Nick Piggin
Date: Mon Mar 16 2009 - 11:01:20 EST


On Tuesday 17 March 2009 01:52:09 Matt Mackall wrote:
> On Mon, 2009-03-16 at 21:00 +1100, Nick Piggin wrote:

> > This doesn't work because you have to hold the lock over the test
> > otherwise another thread can concurrently meddle with sp->units.
>
> Ahh, yes, I was glossing over that code because of the misleading
> comment. I was assuming this was the case where the object itself was a
> page, rather than object is the only allocation on the page.
>
> > For that matter my previous patch was buggy, aside from the obvious
> > that Ingo pointed out, because I unlocked before removing the page
> > from the freelist too.
> >
> > This should be pretty close to correct ;)
>
> Yes. Now the only question that remains is if we want to change a nearly
> negligible performance improvement for a nearly negligible size
> increase.

I'd let you decide that one. I very much doubt it would be noticable on
UP, however it might reduce interrupt hold times there. In case of
several CPUs case, it might give some small scalability improvement of
the lock.


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