From: Matt Mackall <mpm@selenic.com>

This keeps the alignment of the init task matched with the stack size. 
Saves 4k for 4k stacks, keeps system from exploding with 16k.
DESC
From: Zwane Mwaikambo <zwane@linuxpower.ca>
Subject: Re: [patch] proper alignment of init task in kernel image
EDESC

On Sun, 14 Mar 2004, Matt Mackall wrote:

> This keeps the alignment of the init task matched with the stack size.
> Saves 4k for 4k stacks, keeps system from exploding with 16k. Please apply.

Don't forget the following minor patch;

Index: linux-2.6.4-mm1/arch/i386/kernel/init_task.c
===================================================================
RCS file: /home/cvsroot/linux-2.6.4-mm1/arch/i386/kernel/init_task.c,v
retrieving revision 1.1.1.1


---

 25-akpm/arch/i386/kernel/init_task.c   |    2 +-
 25-akpm/arch/i386/kernel/vmlinux.lds.S |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff -puN arch/i386/kernel/vmlinux.lds.S~init-task-alignment-fix arch/i386/kernel/vmlinux.lds.S
--- 25/arch/i386/kernel/vmlinux.lds.S~init-task-alignment-fix	2004-03-14 16:57:21.198762192 -0800
+++ 25-akpm/arch/i386/kernel/vmlinux.lds.S	2004-03-14 16:57:21.200761888 -0800
@@ -3,7 +3,8 @@
  */
 
 #include <asm-generic/vmlinux.lds.h>
-	
+#include <asm/thread_info.h>
+
 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
 OUTPUT_ARCH(i386)
 ENTRY(startup_32)
@@ -48,7 +49,7 @@ SECTIONS
 
   _edata = .;			/* End of data section */
 
-  . = ALIGN(8192);		/* init_task */
+  . = ALIGN(THREAD_SIZE);	/* init_task */
   .data.init_task : { *(.data.init_task) }
 
   /* will be freed after init */
diff -puN arch/i386/kernel/init_task.c~init-task-alignment-fix arch/i386/kernel/init_task.c
--- 25/arch/i386/kernel/init_task.c~init-task-alignment-fix	2004-03-14 16:57:26.262992312 -0800
+++ 25-akpm/arch/i386/kernel/init_task.c	2004-03-14 16:57:26.264992008 -0800
@@ -20,7 +20,7 @@ EXPORT_SYMBOL(init_mm);
 /*
  * Initial thread structure.
  *
- * We need to make sure that this is 8192-byte aligned due to the
+ * We need to make sure that this is THREAD_SIZE aligned due to the
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */

_