Re: [PATCH] procfs: provide slub's /proc/slabinfo

Matt Mackall
2008-01-02T22:52:45Z

On Wed, 2008-01-02 at 11:35 -0800, Linus Torvalds wrote:
>
> On Wed, 2 Jan 2008, Pekka Enberg wrote:
> >
> > I already sent the remaining bits to Linus but this looks much
> > cleaner. Thanks Hugh!
> >
> > Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
>
> Actually, I'd much rather just do this instead (on top of your patch)
>
> It just creates a new CONFIG_SLABINFO that automatically has the right
> dependencies (ie depends on PROC being on, and either SLAB or SLUB), and
> then both SLAB and SLUB just have the exact same interfaces.
>
> Which means that SLOB could also trivially implement the same thing, with
> no new #ifdef'fery or other crud.

Except SLOB's emulation of slabs is so thin, it doesn't have the
relevant information. We have a very small struct kmem_cache, which I
suppose could contain a counter. But we don't have anything like the
kmalloc slabs, so you'd only be getting half the picture anyway.
The output of slabtop would simply be misleading because there are no
underlying "slabs" in the first place.

--
Mathematics is the supreme nostalgia of our time.