From: Dev Audsin <dev.devaqemu@gmail.com>
To: qemu-devel@nongnu.org
Cc: alex.williamson@redhat.com, dgilbert@redhat.com
Subject: Re: [PATCH] make vfio and DAX cache work together
Date: Mon, 26 Apr 2021 21:50:38 +0100 [thread overview]
Message-ID: <CANsN3OTN5Q1DfhC01UGwh4nBEDXxb6=gLtWozh_oFUcc=Fd8DA@mail.gmail.com> (raw)
Hi Alex and David
@Alex:
Justification on why this region cannot be a DMA target for the device,
virtio-fs with DAX is currently not compatible with NIC Pass through.
When a SR-IOV VF attaches to a qemu process, vfio will try to pin the
entire DAX Window but it is empty when the guest boots and will fail.
A method to make VFIO and DAX to work together is to make vfio skip
DAX cache.
Currently DAX cache need to be set to 0, for the SR-IOV VF to be
attached to Kata containers. Enabling both SR-IOV VF and DAX work
together will potentially improve performance for workloads which are
I/O and network intensive.
@David
1. If DAX mode of virtiofs isn't yet in qemu, what is the best project
that this could be discussed?
2a. Regarding your comment on hard coding the name, I am referring to
the device by its name, which has been initialised in
hw/virtio/vhost-user-fs.c. I downloaded the source code of qemu with
virtiofs support which I obtained in reference to the Kata container
project and analysed it. I see the following code snippet in
hw/virtio/vhost-user-fs
if (fs->conf.cache_size) {
/* Anonymous, private memory is not counted as overcommit */
cache_ptr = mmap(NULL, fs->conf.cache_size, DAX_WINDOW_PROT,
MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
if (cache_ptr == MAP_FAILED) {
error_setg(errp, "Unable to mmap blank cache");
return;
}
memory_region_init_ram_ptr(&fs->cache, OBJECT(vdev),
"virtio-fs-cache",
fs->conf.cache_size, cache_ptr);
}
In the above code snippet, the memory region is initialised with
device name "virtio-fs-cache",which I am referring to in my source
code.
2b. Regarding, needing a way for the cache to declare it wants to be
omitted, I am not sure thats what is needed. Currently virtio-fs with
DAX is currently not compatible with vfio. I want to overcome this
problem by making vfio not using the cache.
What I want is cache to be used for purposes other than the VFIO
device. For example, in my deployment scenario, I want DAX cache to be
not used by SR-IOV VF (which is a VFIO device) but used by all other
system.
3. Moved to vfio_listener_skip_section () and patch resubmitted.
Best
Dev
next reply other threads:[~2021-04-27 0:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 20:50 Dev Audsin [this message]
2021-04-26 21:22 ` [PATCH] make vfio and DAX cache work together Alex Williamson
2021-04-27 16:29 ` Dev Audsin
2021-04-27 18:18 ` Alex Williamson
2021-04-27 19:00 ` Dr. David Alan Gilbert
2021-04-28 12:04 ` Dev Audsin
2021-04-28 19:17 ` Dr. David Alan Gilbert
2021-04-28 19:37 ` Alex Williamson
2021-04-29 8:44 ` Dr. David Alan Gilbert
2021-04-29 13:09 ` Alex Williamson
2021-04-29 17:55 ` Dr. David Alan Gilbert
2021-04-30 17:41 ` Dev Audsin
2021-05-04 9:58 ` Dr. David Alan Gilbert
-- strict thread matches above, loose matches on Subject: below --
2021-04-26 9:50 Edge NFV
2021-04-26 12:19 ` Dr. David Alan Gilbert
2021-04-26 14:56 ` Alex Williamson
2021-04-26 5:45 Edge NFV
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANsN3OTN5Q1DfhC01UGwh4nBEDXxb6=gLtWozh_oFUcc=Fd8DA@mail.gmail.com' \
--to=dev.devaqemu@gmail.com \
--cc=alex.williamson@redhat.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).