Re: [PATCH 01/14] x86, boot: align the .bss section in the decompressor

From: H. Peter Anvin
Date: Fri May 08 2009 - 12:59:11 EST


Sam Ravnborg wrote:
>> }
>> + . = 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..
>

I picked 32 as being larger than the maximum known size that affects rep
performance, but L1_CACHE_BYTES really would make more sense, you're right.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

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