riscv: mremap speedup - enable HAVE_MOVE_PUD and HAVE_MOVE_PMD
authorJisheng Zhang <jszhang@kernel.org>
Fri, 16 Apr 2021 16:37:22 +0000 (00:37 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Wed, 26 May 2021 05:50:47 +0000 (22:50 -0700)
commit3332f4190674114e08daaf6859c11a7e464bceff
tree1cc6c4dac63d80494f602016964b91833353b992
parente88b333142e4aba7410d6d3292ad97b3a8588bfe
riscv: mremap speedup - enable HAVE_MOVE_PUD and HAVE_MOVE_PMD

HAVE_MOVE_PUD enables remapping pages at the PUD level if both the source
and destination addresses are PUD-aligned.
HAVE_MOVE_PMD does similar speedup on the PMD level.

With HAVE_MOVE_PUD enabled, there is about a 143x improvement on qemu
With HAVE_MOVE_PMD enabled, there is about a 5x improvement on qemu

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/Kconfig
arch/riscv/include/asm/pgtable.h