On Fri, 31 Jul 2009, Richard Henderson wrote: > On 07/31/2009 02:23 PM, Richard Henderson wrote: > > Similarly it is *not* a bug that the page_aligned sections were before > > data, because we already knew we had 2 page alignment from the end of > > init + 2 pages of init_thread. > > Indeed, I'll go further and say that the common definition of RW_DATA_SECTION > is buggy. [...] > Given that we align the entire .data section why have interior padding to > re-align for page-aligned data? Surely a better ordering would be [...] Agreed. I actually commented on this issue in one of the drafts of RW_DATA_SECTION, but forgot to check again whether Sam had addressed it when reviewing the final version. Fortunately we're talking about a small inefficiency, not something more serious. Below is your proposed change in patch form; I hope Sam will take a look at it. -Tim Abbott Optimize the ordering of sections in RW_DATA_SECTION. The current RW_DATA_SECTION macro doesn't place the various PAGE_SIZE-aligned sections next to each other. This could result in up to a page of memory being wasted realigning to PAGE_SIZE twice. Signed-off-by: Tim Abbott <tabbott@xxxxxxxxxxx> --- 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 6ad76bf..146815d 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -706,12 +706,12 @@ . = ALIGN(PAGE_SIZE); \ .data : AT(ADDR(.data) - LOAD_OFFSET) { \ INIT_TASK_DATA(inittask) \ + NOSAVE_DATA \ + PAGE_ALIGNED_DATA(pagealigned) \ CACHELINE_ALIGNED_DATA(cacheline) \ READ_MOSTLY_DATA(cacheline) \ DATA_DATA \ CONSTRUCTORS \ - NOSAVE_DATA \ - PAGE_ALIGNED_DATA(pagealigned) \ } #define INIT_TEXT_SECTION(inittext_align) \ -- 1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-alpha" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html