* [patch] proper alignment of init task in kernel image
@ 2004-03-15 0:03 Matt Mackall
2004-03-15 0:52 ` Zwane Mwaikambo
0 siblings, 1 reply; 2+ messages in thread
From: Matt Mackall @ 2004-03-15 0:03 UTC (permalink / raw)
To: linux-kernel, Andrew Morton, Linus Torvalds, Arjan van de Ven
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.
test-mpm/arch/i386/kernel/vmlinux.lds.S | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff -puN arch/i386/kernel/vmlinux.lds.S~init-task-align arch/i386/kernel/vmlinux.lds.S
--- test/arch/i386/kernel/vmlinux.lds.S~init-task-align 2004-03-14 17:57:42.000000000 -0600
+++ test-mpm/arch/i386/kernel/vmlinux.lds.S 2004-03-14 18:00:02.000000000 -0600
@@ -6,7 +6,8 @@
#include <linux/config.h>
#include <asm/page.h>
#include <asm/asm_offsets.h>
-
+#include <asm/thread_info.h>
+
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(startup_32)
@@ -61,7 +62,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 */
_
--
Matt Mackall : http://www.selenic.com : Linux development and consulting
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [patch] proper alignment of init task in kernel image
2004-03-15 0:03 [patch] proper alignment of init task in kernel image Matt Mackall
@ 2004-03-15 0:52 ` Zwane Mwaikambo
0 siblings, 0 replies; 2+ messages in thread
From: Zwane Mwaikambo @ 2004-03-15 0:52 UTC (permalink / raw)
To: Matt Mackall
Cc: linux-kernel, Andrew Morton, Linus Torvalds, Arjan van de Ven
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
diff -u -p -B -r1.1.1.1 init_task.c
--- linux-2.6.4-mm1/arch/i386/kernel/init_task.c 11 Mar 2004 15:26:38 -0000 1.1.1.1
+++ linux-2.6.4-mm1/arch/i386/kernel/init_task.c 15 Mar 2004 00:51:14 -0000
@@ -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..
*/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-15 0:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-15 0:03 [patch] proper alignment of init task in kernel image Matt Mackall
2004-03-15 0:52 ` Zwane Mwaikambo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®