[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211123140638.3852400-1-sunnanyong@huawei.com>
Date: Tue, 23 Nov 2021 22:06:36 +0800
From: Nanyong Sun <sunnanyong@...wei.com>
To: <paul.walmsley@...ive.com>, <palmer@...belt.com>,
<aou@...s.berkeley.edu>
CC: <sunnanyong@...wei.com>, <palmerdabbelt@...gle.com>,
<wangkefeng.wang@...wei.com>, <anup@...infault.org>,
<alex@...ti.fr>, <jszhang@...nel.org>,
<linux-riscv@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH -next 0/2] riscv/mm: Enable THP migration
This series enables THP migration on riscv via ARCH_ENABLE_THP_MIGRATION.
But first this adjusts PAGE_PROT_NONE to satisfy generic memory semantics
like the behavior of pmd_present() and pmd_trans_huge() when in
THP splitting or migration.
This feature can reduce the time of THP migration by not splits THP
before migration and can guarantee the pages after migration are still
contiguous.[1]
I have tested the below test case on qemu based on riscv after
enabling this feature, the throughput of THP migration gains 13x
performance improvement:
https://github.com/x-y-z/thp-migration-bench
I also have tested and passed the test cases under
tools/testing/selftests/vm.
[1]: https://lwn.net/Articles/723764/
Nanyong Sun (2):
riscv/mm: Adjust PAGE_PROT_NONE to comply with THP semantics
riscv/mm: Enable THP migration
arch/riscv/Kconfig | 1 +
arch/riscv/include/asm/pgtable-bits.h | 2 +-
arch/riscv/include/asm/pgtable.h | 16 +++++++++++-----
3 files changed, 13 insertions(+), 6 deletions(-)
--
2.25.1
Powered by blists - more mailing lists