Messages in this thread | | | From | Dan Williams <> | Date | Wed, 31 Oct 2018 14:16:01 -0700 | Subject | Re: [RFC PATCH] kvm: Use huge pages for DAX-backed files |
| |
On Wed, Oct 31, 2018 at 1:52 AM Paolo Bonzini <pbonzini@redhat.com> wrote: > > 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.
To be clear, I was not suggesting that a ZONE_DEVICE check would be sufficient to determine a 2MB page. I was suggesting that given there is a debate about removing the "reserved" designation for dax pages that debate is moot if kvm is going to add interrogation code to figure out the size of dax mappings.
| |