Re: [PATCH] fork failures on ix86

ak@muc.de
Fri, 10 Jul 1998 15:14:58 +0200


On Fri, Jul 10, 1998 at 01:42:45PM +0200, Bernd Schmidt wrote:
> > The main reason when I remember it right to extend the kernel stack was
> > not increased stack usage, but for putting the task structure at the
> > bottom of the stack to turn "current" into "sp & MASK". This is important
> > for good performance on SMP machines. Many non-x86 ports use a dedicated
> > register for that, but that is not possible for x86 because it has so few.
> >
> > It turned out that 4k-sizeof(struct task_struct) was too small, so it was
> > increased to 8k-sizeof(struct task_struct).
> >
> > If a better way could be found to solve this current problem then the
> > kernel stack could probably shrinked to a single page again on x86.
>
> 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.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu