lkml.org 
[lkml]   [2005]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [2.6 patch] i386: always use 4k stacks
Bodo Eggert a écrit :
> Horst von Brand <vonbrand@inf.utfsm.cl> wrote:
>
>> "With some drawbacks" is the point: It has been determined that the
>> drawbacks are heavy enough that the 8KiB stack option should go.
>
> Determined by voodoo and wild guessing.
>
> Let's detect the need for 4K stacks: (I hope I found the correct place)
>
> (Maybe the printk should be completely ifdefed, but I'm not sure)
>
>
> Signed-off-by: Bodo Eggert <7eggert@gmx.de>
>
> --- 2.6.14/kernel/fork.c.ori 2005-12-21 19:06:24.000000000 +0100
> +++ 2.6.14/kernel/fork.c 2005-12-21 19:15:23.000000000 +0100
> @@ -168,4 +168,9 @@ static struct task_struct *dup_task_stru
> if (!ti) {
> free_task_struct(tsk);
> + printk(KERN_WARNING, "Can't allocate new task structure"
> +#ifndef CONFIG_4KSTACKS
> + ". Maybe you could benefit from 4K stacks.\n"
> +#endif
> + "\n");
> return NULL;
> }
>

This patch is not OK but for i386 architecture.

For example, x86_64 cannot use a 4K stack, it needs a 8KB stack (so a order-1
allocation that may fail)

Eric

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-23 11:38    [W:0.340 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site