Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: Increase the max granular size

Increase the standard cacheline size to avoid having locks in the same
cacheline.

Cavium's ThunderX core implements cache lines of 128 byte size. With
current granulare size of 64 bytes (L1_CACHE_SHIFT=6) two locks could
share the same cache line leading a performance degradation.
Increasing the size fixes that.

Increasing the size has no negative impact to cache invalidation on
systems with a smaller cache line. There is an impact on memory usage,
but that's not too important for arm64 use cases.

Signed-off-by: Tirumalesh Chalamarla <tchalamarla@cavium.com>
Signed-off-by: Robert Richter <rrichter@cavium.com>
Acked-by: Timur Tabi <timur@codeaurora.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>

authored by

Tirumalesh Chalamarla and committed by
Catalin Marinas
97303480 6e4a0f2b

+1 -1
+1 -1
arch/arm64/include/asm/cache.h
··· 18 18 19 19 #include <asm/cachetype.h> 20 20 21 - #define L1_CACHE_SHIFT 6 21 + #define L1_CACHE_SHIFT 7 22 22 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 23 23 24 24 /*