From: Huacai Chen <chenhuacai@loongson.cn>
To: Huacai Chen <chenhuacai@kernel.org>
Cc: loongarch@lists.linux.dev, Xuefeng Li <lixuefeng@loongson.cn>,
Guo Ren <guoren@kernel.org>, Xuerui Wang <kernel@xen0n.name>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn,
Huacai Chen <chenhuacai@loongson.cn>
Subject: [PATCH] LoongArch: Select THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
Date: Wed, 10 Apr 2024 21:12:56 +0800 [thread overview]
Message-ID: <20240410131256.2165746-1-chenhuacai@loongson.cn> (raw)
THP_SWAP has been proven to improve the swap throughput significantly on
x86_64 system according to commit bd4c82c22c367e0 ("mm, THP, swap: delay
splitting THP after swapped out"), on ARM64 system according to commit
d0637c505f8a1d ("arm64: enable THP_SWAP for arm64") and on RISC-V system
according to commit 87f81e66e2e84c7 ("riscv: enable THP_SWAP for RV64").
Enable THP_SWAP for LoongArch, testing the micro-benchmark which is
introduced by commit d0637c505f8a1d ("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>
---
arch/loongarch/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index d52a95195e7f..41ddc39e1fc8 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -69,6 +69,7 @@ config LOONGARCH
select ARCH_WANT_LD_ORPHAN_WARN
select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
select ARCH_WANTS_NO_INSTR
+ select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
select BUILDTIME_TABLE_SORT
select COMMON_CLK
select CPU_PM
--
2.43.0
reply other threads:[~2024-04-10 13:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240410131256.2165746-1-chenhuacai@loongson.cn \
--to=chenhuacai@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=guoren@kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=loongarch@lists.linux.dev \
--cc=loongson-kernel@lists.loongnix.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).