Re: [PATCH] fork failures on ix86

ak@muc.de
Fri, 10 Jul 1998 20:10:29 +0200


On Fri, Jul 10, 1998 at 07:11:12PM +0200, David S. Miller wrote:
> Date: Fri, 10 Jul 1998 15:14:58 +0200
> From: ak@muc.de
>
> On Fri, Jul 10, 1998 at 01:42:45PM +0200, Bernd Schmidt wrote:
> > How about putting only a pointer to the task structure at the bottom of the
> > stack?
>
> That could work. Another advantage: we could use the slab allocator to
> allocate the task_struct then which does proper L2 cache colouring ->
> better cache usage.
>
> (it does L1 coloring...)
>
> I did this by hand on the Ultra to see what the effects would be on
> things like ctx switch latencies etc.
>
> The results were that the coloring made no difference at all (I tried
> both L1 line size and L2 line size for the colors).

OK, then it has the same speed as before - maybe a bit slower because of
the additional redirection. The big advantage of the trick Bernd suggested
is that it makes the system much more reliable. It is very bad when Linux
stops forking because memory is fragmented.

Maybe in 2.3 with the new all-singing-all-dancing allocator it is possible
to switch back, but for 2.2 just using the indirect pointer and switching
back to a 4K stack looks like the best solution for me. The alternative
would be some aggressive defragmenting pass in the swapper that throws random
pages away - not nice and very bad for performance.

I'll test a test patch for i386 shortly, but currently I'm fighting with
the vger tree (does not compile anymore, crashes on bootup)

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html