include/asm-generic/vmlinux.lds.h: make readmostly section correctly align
authorShaohua Li <[email protected]>
Thu, 13 Jan 2011 00:59:38 +0000 (16:59 -0800)
committerLinus Torvalds <[email protected]>
Thu, 13 Jan 2011 16:03:08 +0000 (08:03 -0800)
The readmostly section should end at a cacheline aligned address,
otherwise the last several data might share cachline with other data and
make the readmostly data still have cache bounce.

For example, in ia64, secpath_cachep is the last readmostly data, and it
shares cacheline with init_uts_ns.

a000000100e80480 d secpath_cachep
a000000100e80488 D init_uts_ns

Signed-off-by: Shaohua Li <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Eric Dumazet <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/asm-generic/vmlinux.lds.h

index 05cbad03c5abeba469c5f025cba8991fbe397719..68649336c4adf98618ff4d4fd8d9f1d6b2867062 100644 (file)
 
 #define READ_MOSTLY_DATA(align)                                                \
        . = ALIGN(align);                                               \
-       *(.data..read_mostly)
+       *(.data..read_mostly)                                           \
+       . = ALIGN(align);
 
 #define CACHELINE_ALIGNED_DATA(align)                                  \
        . = ALIGN(align);                                               \