Re: [RFC PATCH] kvm: Use huge pages for DAX-backed files
From: Paolo Bonzini
Date: Wed Oct 31 2018 - 04:52:15 EST
On 29/10/2018 23:25, Dan Williams wrote:
> I'm wondering if we're adding an explicit is_zone_device_page() check
> in this path to determine the page mapping size if that can be a
> replacement for the kvm_is_reserved_pfn() check. In other words, the
> goal of fixing up PageReserved() was to preclude the need for DAX-page
> special casing in KVM, but if we already need add some special casing
> for page size determination, might as well bypass the
> kvm_is_reserved_pfn() dependency as well.
No, please don't. The kvm_is_reserved_pfn() check is for correctness,
the page-size check is for optimization. In theory you could have a
ZONE_DEVICE area that is smaller than 2MB and thus does not use huge pages.
Paolo