[PATCH v5 6/6] loongarch: Enable THP-aligned load segments by default on 64-bit
WANG Rui
wangrui@loongson.cn
Sun Mar 8 13:17:47 GMT 2026
On Sun, Mar 8, 2026 at 5:46 PM Xi Ruoyao <xry111@xry111.site> wrote:
>
> I suggest to translate the experiment results at
> https://github.com/loongson-community/discussions/issues/115 into
> English and include it in the commit message here.
Thanks for the suggestion, that makes sense. I’ll translate the
experiment results and include them in the commit message.
The results look like this:
Machine: Loongson 3A6000 (LoongArch64)
Kernel: 6.18.13
CONFIG_READ_ONLY_THP_FOR_FS=y
CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
Workload 1: building Cargo 1.93.0
Rustc: nightly-2026-02-26
Without patch With patch
instructions 3,690,358,948,176 3,690,301,774,568
cpu-cycles 4,233,025,766,760 4,035,866,635,741
itlb-misses 9,708,829,532 2,700,014,717
time elapsed 302.40 s 289.68 s
Instructions remain essentially unchanged. iTLB misses drop by about
72%, reducing CPU cycles by about 4.7% and wall time by about 4.2%.
Workload 2: building Linux kernel v7.0-rc1
LLVM: 21.1.8
Without patch With patch
instructions 14,163,739,876,387 14,169,418,598,675
cpu-cycles 19,231,890,317,741 16,851,494,928,181
itlb-misses 91,142,010,440 90,779,245
time elapsed 1022.09 s 893.22 s
Instructions remain roughly the same. iTLB misses drop from about 91B
to about 90M (roughly 99.9% reduction), reducing CPU cycles by about
12% and wall time by about 12.6%.
Cheers,
Rui
More information about the Libc-alpha
mailing list