Re: 2.6.6-rc3-mm2 (4KSTACK)

Andrew Morton
2004-05-11T02:39:39Z

Horst von Brand <vonbrand@inf.utfsm.cl> wrote:
>
> Bill Davidsen <davidsen@tmr.com> said:
>
> [...]
>
> > I tried 4k stack, I couldn't measure any improvement in anything (as in
> > no visible speedup or saving in memory).
>
> 4K stacks lets the kernel create new threads/processes as long as there is
> free memory; with 8K stacks it needs two consecutive free page frames in
> physical memory, when memory is fragmented (and large) they are hard to
> come by...

This is true to a surprising extent. A couple of weeks ago I observed my
256MB box freeing over 20MB of pages before it could successfully acquire a
single 1-order page.

That was during an updatedb run.

And a 1-order GFP_NOFS allocation was actually livelocking, because
!__GFP_FS allocations aren't allowed to enter dentry reclaim. Which is why
VFS caches are now forced to use 0-order allocations.