diff options
| author | Bibo Mao <maobibo@loongson.cn> | 2026-04-09 18:56:36 +0800 |
|---|---|---|
| committer | Huacai Chen <chenhuacai@loongson.cn> | 2026-04-09 18:56:36 +0800 |
| commit | c43dce6f13fb12144571c168c7a593e5e546f3b5 (patch) | |
| tree | af24b8f8d1576f5b77116b75181bcdc4df68c264 /rust/kernel/interop/git@git.tavy.me:linux-stable.git | |
| parent | aac656857e9f008a014ac9d58aab66e8fc803604 (diff) | |
LoongArch: KVM: Make vcpu_is_preempted() as a macro rather than function
vcpu_is_preempted() is performance sensitive that called in function
osq_lock(), here make it as a macro. So that parameter is not parsed
at most time, it can avoid cache line thrashing across numa nodes.
Here is part of UnixBench result on Loongson-3C5000 DualWay machine with
32 cores and 2 numa nodes.
original inline macro
execl 7025.7 6991.2 7242.3
fstime 474.6 703.1 1071
From the test result, making vcpu_is_preempted() as a macro is the best,
and there is some improvment compared with the original function method.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'rust/kernel/interop/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
