Re: [PATCH 0/5] make slab gfp fair

Peter Zijlstra
2007-05-14T20:12:56Z

On Mon, 2007-05-14 at 13:06 -0700, Christoph Lameter wrote:
> On Mon, 14 May 2007, Peter Zijlstra wrote:
>
> > > Hmmm.. Maybe we could do that.... But what I had in mind was simply to
> > > set a page flag (DebugSlab()) if you know in alloc_slab that the slab
> > > should be only used for emergency allocation. If DebugSlab is set then the
> > > fastpath will not be called. You can trap all allocation attempts and
> > > insert whatever fancy logic you want in the debug path since its not
> > > performance critical.
> >
> > I might have missed some detail when I looked at SLUB, but I did not see
> > how setting SlabDebug would trap subsequent allocations to that slab.
>
> Ok its not evident in slab_alloc. But if SlabDebug is set then
> page->lockless_list is always NULL and we always fall back to
> __slab_alloc.

Ah, indeed, that is the detail I missed. Yes that would work out.

> There we check for SlabDebug and go to the debug: label.
> There you can insert any fancy processing you want.