Re: [PATCH v3 07/19] hugetlb_vmemmap: Allow architectures to make HVO enablement boot-time only

From: Muchun Song

Date: Sun Nov 22 2026 - 22:13:52 EST




> On Nov 23, 2026, at 02:44, James Houghton <jthoughton@xxxxxxxxxx> wrote:
>
> Architectures may need to configure the system at boot depending on
> whether HVO is enabled. For example, arm64 needs all CPUs to support
> hardware updates of the access flag to safely update the vmemmap in
> place, and may want to refuse to online CPUs that lack it, but only if
> HVO may be used.
>
> Such configuration is only valid if HVO cannot be enabled later at
> runtime through the vm.hugetlb_optimize_vmemmap sysctl.
>
> Add CONFIG_ARCH_HUGETLB_VMEMMAP_OPTIMIZATION_SYSCTL_RO for architectures
> to select. When selected, the vm.hugetlb_optimize_vmemmap sysctl is
> read-only, so HVO can only be enabled or disabled with the
> hugetlb_free_vmemmap= kernel command line parameter.
>
> Signed-off-by: James Houghton <jthoughton@xxxxxxxxxx>

Reviewed-by: Muchun Song (ByteDance) <muchun.song@xxxxxxxxx>

Thanks.