Skip to content

Commit

Permalink
include/asm-generic/vmlinux.lds.h: make readmostly section correctly …
Browse files Browse the repository at this point in the history
…align

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 <shaohua.li@intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Shaohua Li authored and torvalds committed Jan 13, 2011
1 parent 1725310 commit 8369744
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/asm-generic/vmlinux.lds.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@

#define READ_MOSTLY_DATA(align) \
. = ALIGN(align); \
*(.data..read_mostly)
*(.data..read_mostly) \
. = ALIGN(align);

#define CACHELINE_ALIGNED_DATA(align) \
. = ALIGN(align); \
Expand Down

0 comments on commit 8369744

Please sign in to comment.