Skip to content

Commit ff4a244

Browse files
committed
LoongArch: Select THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
THP_SWAP has been proven to improve the swap throughput significantly on x86_64 system according to commit bd4c82c ("mm, THP, swap: delay splitting THP after swapped out"), on ARM64 system according to commit d0637c5 ("arm64: enable THP_SWAP for arm64") and on RISC-V system according to commit 87f81e6 ("riscv: enable THP_SWAP for RV64"). Enable THP_SWAP for LoongArch, testing the micro-benchmark which is introduced by commit d0637c5 ("arm64: enable THP_SWAP for arm64") shows below numbers on the Loongson-3A5000 board: swp out bandwidth w/o patch: 1815716 bytes/ms (mean of 10 tests) swp out bandwidth w/ patch: 3410003 bytes/ms (mean of 10 tests) Improved by 46.75%! Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent d0b35b0 commit ff4a244

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/loongarch/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ config LOONGARCH
7070
select ARCH_WANT_LD_ORPHAN_WARN
7171
select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
7272
select ARCH_WANTS_NO_INSTR
73+
select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
7374
select BUILDTIME_TABLE_SORT
7475
select COMMON_CLK
7576
select CPU_PM

0 commit comments

Comments
 (0)