diff options
author | Tim Abbott <tabbott@ksplice.com> | 2009-09-24 10:36:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-24 20:16:21 -0400 |
commit | 1b2086227cd1a24f748398c22ea9652c383499cf (patch) | |
tree | e8c7a010d4900b9bd591d93cdf176c5e8f4237a2 | |
parent | e9ea0e2d1d00959b451dfc239df126d3c6a22043 (diff) |
Optimize the ordering of sections in RW_DATA_SECTION.
The old RW_DATA_SECTION had INIT_TASK_DATA (which was
more-than-PAGE_SIZE-aligned), followed by a bunch of small alignment
stuff, followed by more PAGE_SIZE-aligned stuff, so you wasted memory
in the middle of .data re-aligning back up to PAGE_SIZE.
This patch sorts the sections by alignment requirements, which should
pack them essentially optimally.
Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 29ca8f53ffbe..b6e818f4b247 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -721,12 +721,12 @@ | |||
721 | . = ALIGN(PAGE_SIZE); \ | 721 | . = ALIGN(PAGE_SIZE); \ |
722 | .data : AT(ADDR(.data) - LOAD_OFFSET) { \ | 722 | .data : AT(ADDR(.data) - LOAD_OFFSET) { \ |
723 | INIT_TASK_DATA(inittask) \ | 723 | INIT_TASK_DATA(inittask) \ |
724 | NOSAVE_DATA \ | ||
725 | PAGE_ALIGNED_DATA(pagealigned) \ | ||
724 | CACHELINE_ALIGNED_DATA(cacheline) \ | 726 | CACHELINE_ALIGNED_DATA(cacheline) \ |
725 | READ_MOSTLY_DATA(cacheline) \ | 727 | READ_MOSTLY_DATA(cacheline) \ |
726 | DATA_DATA \ | 728 | DATA_DATA \ |
727 | CONSTRUCTORS \ | 729 | CONSTRUCTORS \ |
728 | NOSAVE_DATA \ | ||
729 | PAGE_ALIGNED_DATA(pagealigned) \ | ||
730 | } | 730 | } |
731 | 731 | ||
732 | #define INIT_TEXT_SECTION(inittext_align) \ | 732 | #define INIT_TEXT_SECTION(inittext_align) \ |