Commit b90f228
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>
[Tested in 3A6000,seem not improved, but improved in 3C5000]
Before:
for((i=10;i>=1;i--)); do ./a.out; done;
swp out bandwidth: 3153612 bytes/ms
swp out bandwidth: 3153612 bytes/ms
swp out bandwidth: 3153612 bytes/ms
swp out bandwidth: 3106891 bytes/ms
swp out bandwidth: 3153612 bytes/ms
swp out bandwidth: 3153612 bytes/ms
swp out bandwidth: 3153612 bytes/ms
swp out bandwidth: 3084047 bytes/ms
swp out bandwidth: 3647220 bytes/ms
swp out bandwidth: 3647220 bytes/ms
After:
swp out bandwidth: 1997287 bytes/ms
swp out bandwidth: 3017484 bytes/ms
swp out bandwidth: 9118052 bytes/ms
swp out bandwidth: 10485760 bytes/ms
swp out bandwidth: 10754625 bytes/ms
swp out bandwidth: 9320675 bytes/ms
swp out bandwidth: 10485760 bytes/ms
swp out bandwidth: 10485760 bytes/ms
swp out bandwidth: 10754625 bytes/ms
swp out bandwidth: 9118052 bytes/ms
(cherry picked from commit ff4a244)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>1 parent 7795e63 commit b90f228
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
0 commit comments