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

Tony Luck
2010-09-16T22:08:25Z

On Thu, Sep 16, 2010 at 10:49 AM, Linus Torvalds
<torvalds@linux-foundation.org> 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