提交 28cb7442 编写于 作者: J Jialin Zhang 提交者: Zheng Zengkai

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: NJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 45f30608
...@@ -52,6 +52,9 @@ static struct { ...@@ -52,6 +52,9 @@ static struct {
u64 padding[8]; u64 padding[8];
#endif #endif
seqcount_raw_spinlock_t seq; seqcount_raw_spinlock_t seq;
#ifdef CONFIG_ARCH_LLC_128_LINE_SIZE
u64 padding2[2];
#endif
struct timekeeper timekeeper; struct timekeeper timekeeper;
#ifdef CONFIG_ARCH_LLC_128_LINE_SIZE #ifdef CONFIG_ARCH_LLC_128_LINE_SIZE
} tk_core ____cacheline_aligned_128 = { } tk_core ____cacheline_aligned_128 = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册