[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30bdd995-ef1c-f869-388c-76434dd2499f@redhat.com>
Date: Tue, 6 Nov 2018 11:22:20 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Dan Williams <dan.j.williams@...el.com>
Cc: Barret Rhoden <brho@...gle.com>, Dave Jiang <dave.jiang@...el.com>,
zwisler@...nel.org, Vishal L Verma <vishal.l.verma@...el.com>,
rkrcmar@...hat.com, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
linux-nvdimm <linux-nvdimm@...ts.01.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"H. Peter Anvin" <hpa@...or.com>, X86 ML <x86@...nel.org>,
KVM list <kvm@...r.kernel.org>,
"Zhang, Yu C" <yu.c.zhang@...el.com>,
"Zhang, Yi Z" <yi.z.zhang@...el.com>
Subject: Re: [RFC PATCH] kvm: Use huge pages for DAX-backed files
On 31/10/2018 22:16, Dan Williams wrote:
>> 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.
Oh indeed. And in general it's okay for me to add more ZONE_DEVICE
checks to complement the existing PageReserved checks, if DAX pages are
not going to be reserved anymore.
In some cases, such as the "if (!PageReserved(page)) SetPageDirty(page)"
that Barret noted, it may even be more correct for KVM if DAX pages stop
being reserved. All this given my very limited knowledge of MM though...
Paolo
Powered by blists - more mailing lists