Re: [PATCH v2 2/2] SLUB: Mark merged slab caches in /proc/slabinfo

From: Tony Luck
Date: Thu Sep 16 2010 - 18:08:28 EST


On Thu, Sep 16, 2010 at 10:49 AM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> That would allow slabtop etc to show the number of actual allocations
> at the granularity that we want (ie you'd see who is the real user),
> but still then use the same slab pages and avoid the slab
> fragmentation.

It might be hard to interpret the data. Suppose "foo" and "bar"
are slab caches that have separate accounting, but a merged
allocator. Now we do 20 allocations from foo, and free 19 of them.
Then we do 19 allocations from bar. The accounts would show
that foo has 1 object in use and 19 free. While bar would show
19 objects in use.

But the 19 "free" foo objects aren't free at all, they've been
handed out to bar.

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