linux/arch/riscv
Guo Ren a3c7d6b642
riscv: mm: hugetlb: Enable ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
Add HVO support for RISC-V; see commit 6be24bed9d ("mm: hugetlb:
introduce a new config HUGETLB_PAGE_FREE_VMEMMAP"). This patch is
similar to commit 1e63ac088f ("arm64: mm: hugetlb: enable
HUGETLB_PAGE_FREE_VMEMMAP for arm64"), and riscv's motivation is the
same as arm64. The current riscv was ready to enable HVO after fixup,
ref commit d33deda095 ("riscv/mm: hugepage's PG_dcache_clean flag
is only set in head page").

See Documentation/mm/vmemmap_dedup.rst for more details.

The HugeTLB VmemmapvOptimization (HVO) defaults to off in Kconfig.

Here is the riscv test log:
cat /proc/sys/vm/hugetlb_optimize_vmemmap
echo 8 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
mount -t hugetlbfs none test/ -o pagesize=2048k
<Try some simple hugetlb test in test dir, no problem found.>

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Link: https://lore.kernel.org/linux-riscv/1F5AF29D-708A-483B-A29F-CAEE6F554866@linux.dev/
Acked-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20230201015259.3222524-1-guoren@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2023-02-21 17:28:12 -08:00
..
boot RISC-V: kbuild: convert all use of SOC_FOO to ARCH_FOO 2022-12-27 18:01:40 +00:00
configs RISC-V Patches for the 6.2 Merge Window, Part 1 2022-12-14 15:23:49 -08:00
errata RISC-V: take text_mutex during alternative patching 2023-02-21 17:21:33 -08:00
include riscv: Add header include guards to insn.h 2023-02-21 17:22:54 -08:00
kernel Merge patch series "riscv: Dump faulting instructions in oops handler" 2023-02-21 17:21:51 -08:00
kvm riscv: KVM: Switch has_svinval() to riscv_has_extension_unlikely() 2023-01-31 23:29:44 -08:00
lib riscv: Fix Zbb alternative IDs 2023-02-14 16:10:36 -08:00
mm riscv, mm: Perform BPF exhandler fixup on page fault 2023-02-21 17:21:39 -08:00
net riscv, bpf: Emit fixed-length instructions for BPF_PSEUDO_FUNC 2022-12-06 20:59:27 +01:00
purgatory RISC-V: add infrastructure to allow different str* implementations 2023-01-31 11:43:23 -08:00
Kbuild riscv: move errata/ and kvm/ builds to arch/riscv/Kbuild 2022-06-01 22:26:32 -07:00
Kconfig riscv: mm: hugetlb: Enable ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP 2023-02-21 17:28:12 -08:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.erratas drivers/perf: riscv_pmu_sbi: add support for PMU variant on T-Head C9xx cores 2022-10-27 14:35:20 -07:00
Kconfig.socs RISC-V: Kconfig: Remove trailing whitespace 2023-01-24 18:09:12 -08:00
Makefile Merge patch series "riscv: Optimize function trace" 2023-02-15 10:59:54 -08:00