mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -next 0/2] riscv/mm: Enable THP migration
@ 2021-11-23 14:06 Nanyong Sun
  2021-11-23 14:06 ` [PATCH -next 1/2] riscv/mm: Adjust PAGE_PROT_NONE to comply with THP semantics Nanyong Sun
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nanyong Sun @ 2021-11-23 14:06 UTC (permalink / raw)
  To: paul.walmsley, palmer, aou
  Cc: sunnanyong, palmerdabbelt, wangkefeng.wang, anup, alex, jszhang,
	linux-riscv, linux-kernel

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-09 17:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 14:06 [PATCH -next 0/2] riscv/mm: Enable THP migration Nanyong Sun
2021-11-23 14:06 ` [PATCH -next 1/2] riscv/mm: Adjust PAGE_PROT_NONE to comply with THP semantics Nanyong Sun
2021-11-23 14:06 ` [PATCH -next 2/2] riscv/mm: Enable THP migration Nanyong Sun
2021-12-30  6:45 ` [PATCH -next 0/2] " Nanyong Sun
2022-01-09 17:49   ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®