Commit 28cb7442 authored by Jialin Zhang's avatar Jialin Zhang Committed by Zheng Zengkai
Browse files

timekeeping: Adding a padding before timekeeper in tk_core

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I47W8L


CVE: NA

---------------------------

Adding a padding before timekeeper in tk_core can futhor fix
the false sharing problem discovered by commit 60527666
("timekeeping: Avoiding false sharing in field access of tk_core")

context1 of unixbench is tested on Huawei Kunpeng920.
before this patch
0 CPUs in system; running 96 parallel copies of tests

Pipe-based Context Switching               17213571.7 lps   (10.0 s, 1 samples)

System Benchmarks Partial Index              BASELINE       RESULT    INDEX
Pipe-based Context Switching                   4000.0   17213571.7  43033.9
                                                                   ========
System Benchmarks Index Score (Partial Only)                        43033.9

after this patch
0 CPUs in system; running 96 parallel copies of tests

Pipe-based Context Switching               20321268.3 lps   (10.0 s, 1 samples)

System Benchmarks Partial Index              BASELINE       RESULT    INDEX
Pipe-based Context Switching                   4000.0   20321268.3  50803.2
                                                                   ========
System Benchmarks Index Score (Partial Only)                        50803.2

Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 45f30608
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -52,6 +52,9 @@ static struct {
	u64		padding[8];
#endif
	seqcount_raw_spinlock_t	seq;
#ifdef CONFIG_ARCH_LLC_128_LINE_SIZE
	u64		padding2[2];
#endif
	struct timekeeper	timekeeper;
#ifdef CONFIG_ARCH_LLC_128_LINE_SIZE
} tk_core ____cacheline_aligned_128 = {