Question about ARM KVM stage2 contiguous bit support for contiguous hugetlb

Zhou Wang wangzhou1 at hisilicon.com
Thu Mar 19 05:54:51 PDT 2026


On 2026/3/13 15:49, Marc Zyngier wrote:
> On Fri, 13 Mar 2026 07:09:40 +0000,
> Zhou Wang <wangzhou1 at hisilicon.com> wrote:
>>
>> And do we have any plan to support this?
> 
> Not really.
> 
> Configurations that are looking at extracting the best possible
> performance use large mappings at S2 (hugetlbfs). I'm not convinced
> that there is a strong use-case for dealing with the contiguous hint
> at S2 when backed by anonymous memory. If you're not under memory

We want use 64KB basic page, in this case we have 2M cont PTE and 512M
block page. However, the latter may waste more memory.

> pressure, THP already gives you the uplift you want. If you are under
> memory pressure, you're unlikely to get the contiguity you want.
> 
> Additionally, dealing with the contiguous hint is a real pain.
> 
> If you are undertaking this work, please make sure to provide
> reproducible benchmarks and results that show a definite improvement
> on the majority of workloads.

We have a initial test in hardware emulator, for lmbench lat_mem_rd 1G
256 stride,the cost of virtualization will change from 17% -> 3%, we do
the test using a VM with 4 vCPU / 8GB memory in 64KB basic page / 2M
contiguous hugetlb system.

Will do more tests in the real chip.

Best,
Zhou

> 
> Thanks,
> 
> 	M.
> 



More information about the linux-arm-kernel mailing list