Re: [patch 1/3] slob: rework freelist handling

Nick Piggin
2007-05-24T04:13:39Z

On Wed, May 23, 2007 at 08:55:20PM -0700, Christoph Lameter wrote:
> On Thu, 24 May 2007, Nick Piggin wrote:
>
> > > Hummm... We have not tested with my patch yet. May save another 200k.
> >
> > Saved 12K. Shuld it have been more? I only applied the last patch you
> > sent (plus the initial SLUB_DEBUG fix).
>
> Yeah. The code size should have shrunk significantly. It seems that the
> inlining instead of saving memory as on x86_64 wasted memory and ate up
> the winnings through the shrink. Could you try the patch before to see how
> much actually is saved by shrinking?

After
text data bss dec hex filename
7864 3700 176 11740 2ddc mm/slub.o

Before
text data bss dec hex filename
9136 5932 176 15244 3b8c mm/slub.o

But the biggest issue you can see is not text size, because even if
slub.o was 1 byte, its total dynamic memory usage would still be a
lot higher.

> > Admittedly, I am not involved with any such tiny Linux projects, however
> > why should half of memory be available to userspace? What about a router
> > or firewall that basically does all work in kernel?
>
> It would also work fine with SLUB? Its about 12k code + data on
> x86_64. I doubt that this would be too much of an issue.

Well as I said, I am not the one to ask about whether SLUB could replace
SLOB or not. All else being equal, of course it is a good idea.

But what I think is clear is that SLOB simply uses memory more
efficiently than SLUB (in my test, anyway). I don't know how this can
still be in dispute?