lkml.org 
[lkml]   [2008]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] procfs: provide slub's /proc/slabinfo

* Matt Mackall <mpm@selenic.com> wrote:

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

i think SLOB/embedded is sufficiently special that a "no /proc/slabinfo"
restriction is perfectly supportable. (for instance it's only selectable
if CONFIG_EMBEDDED=y) If a SLOB user has any memory allocation problems
it's worth going to the bigger allocators anyway, to get all the
debugging goodies.

btw., do you think it would be worth/possible to have build mode for
SLUB that is acceptably close to the memory efficiency of SLOB? (and
hence work towards unifying all the 3 allocators into SLUB in essence)

right now we are far away from it - SLUB has an order of magnitude
larger .o than SLOB, even on UP. I'm wondering why that is so - SLUB's
data structures _are_ quite compact and could in theory be used in a
SLOB-alike way. Perhaps one problem is that much of SLUB's debugging
code is always built in?

Ingo


\
 
 \ /
  Last update: 2008-01-03 09:55    [W:0.112 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site