Re: [PATCH v4 2/2] kvm: Use huge pages for DAX-backed files

From: Barret Rhoden
Date: Thu Dec 12 2019 - 15:08:10 EST

On 12/12/19 2:48 PM, Dan Williams wrote:
On Thu, Dec 12, 2019 at 11:16 AM Barret Rhoden <brho@xxxxxxxxxx> wrote:

On 12/12/19 12:37 PM, Dan Williams wrote:
Yeah, since device-dax is the only path to support longterm page
pinning for vfio device assignment, testing with device-dax + 1GB
pages would be a useful sanity check.

What are the issues with fs-dax and page pinning? Is that limitation
something that is permanent and unfixable (by me or anyone)?

It's a surprisingly painful point of contention...

Thanks for the info; I'll check out those threads.


I'd like to put a lot more in a DAX/pmem region than just a guest's
memory, and having a mountable filesystem would be extremely convenient.

Why would page pinning be involved in allowing the guest to mount a
filesystem on guest-pmem? That already works today, it's just the
device-passthrough that causes guest memory to be pinned indefinitely.

I'd like to mount the pmem filesystem on the *host* and use its files for the guest's memory. So far I've just been making an ext4 FS on /dev/pmem0 and creating a bunch of files in the FS. Some of the files are the guest memory: one file for each VM. Other files are just metadata that the host uses.

That all works right now, but I'd also like to use VFIO with the guests.