Skip to content

Commit 87f81e6

Browse files
xhackerustcpalmer-dabbelt
authored andcommitted
riscv: enable THP_SWAP for RV64
I have a Sipeed Lichee RV dock board which only has 512MB DDR, so memory optimizations such as swap on zram are helpful. As is seen in commit d0637c5 ("arm64: enable THP_SWAP for arm64") and commit bd4c82c ("mm, THP, swap: delay splitting THP after swapped out"), THP_SWAP can improve the swap throughput significantly. Enable THP_SWAP for RV64, testing the micro-benchmark which is introduced by commit d0637c5 ("arm64: enable THP_SWAP for arm64") shows below numbers on the Lichee RV dock board: swp out bandwidth w/o patch: 66908 bytes/ms (mean of 10 tests) swp out bandwidth w/ patch: 322638 bytes/ms (mean of 10 tests) Improved by 382%! Signed-off-by: Jisheng Zhang <[email protected]> Reviewed-by: Andrew Jones <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 61a41d1 commit 87f81e6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ config RISCV
4545
select ARCH_WANT_FRAME_POINTERS
4646
select ARCH_WANT_GENERAL_HUGETLB
4747
select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
48+
select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
4849
select BINFMT_FLAT_NO_DATA_START_OFFSET if !MMU
4950
select BUILDTIME_TABLE_SORT if MMU
5051
select CLONE_BACKWARDS

0 commit comments

Comments
 (0)