[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090508071759.GA12808@uranus.ravnborg.org>
Date: Fri, 8 May 2009 09:17:59 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: "H. Peter Anvin" <hpa@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, vgoyal@...hat.com, hbabu@...ibm.com,
kexec@...ts.infradead.org, ying.huang@...el.com, mingo@...e.hu,
tglx@...utronix.de, ebiederm@...ssion.com,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor
On Thu, May 07, 2009 at 03:26:49PM -0700, H. Peter Anvin wrote:
> From: H. Peter Anvin <hpa@...or.com>
>
> Aligning the .bss section makes it trivially faster, and makes using
> larger transfers for the clear slightly easier.
>
> [ Impact: trivial performance enhancement, future patch prep ]
>
> Signed-off-by: H. Peter Anvin <hpa@...or.com>
> ---
> arch/x86/boot/compressed/vmlinux.lds.S | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
> index 0d26c92..27c168d 100644
> --- a/arch/x86/boot/compressed/vmlinux.lds.S
> +++ b/arch/x86/boot/compressed/vmlinux.lds.S
> @@ -42,6 +42,7 @@ SECTIONS
> *(.data.*)
> _edata = . ;
> }
> + . = ALIGN(32);
Where does this magic 32 comes from?
I would assume the better choice would be:
. = ALIGN(L1_CACHE_BYTES);
So we match the relevant CPU.
In general for alignmnet of output sections I see the need for:
1) Function call
2) L1_CACHE_BYTES
3) PAGE_SIZE
4) 2*PAGE_SIZE
But I see magic constant used here and there that does not match
the above (when looking at all archs).
So I act when I see a new 'magic' number..
Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists