percpu: align percpu readmostly subsection to cacheline
Currently percpu readmostly subsection may share cachelines with other percpu subsections which may result in unnecessary cacheline bounce and performance degradation. This patch adds @cacheline parameter to PERCPU() and PERCPU_VADDR() linker macros, makes each arch linker scripts specify its cacheline size and use it to align percpu subsections. This is based on Shaohua's x86 only patch. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Shaohua Li <shaohua.li@intel.com>
This commit is contained in:
@@ -108,7 +108,7 @@ SECTIONS
|
||||
__sun4v_2insn_patch_end = .;
|
||||
}
|
||||
|
||||
PERCPU(PAGE_SIZE)
|
||||
PERCPU(SMP_CACHE_BYTES, PAGE_SIZE)
|
||||
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
__init_end = .;
|
||||
|
Reference in New Issue
Block a user