From: Liu Bo <bo.liu@linux.alibaba.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: virtio-fs@redhat.com,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Vivek Goyal <vgoyal@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Virtio-fs] [PATCH 0/4] virtiofsd: multithreading preparation part 3
Date: Sat, 10 Aug 2019 14:34:00 -0700 [thread overview]
Message-ID: <20190810213400.rpzxazwfrbxxkneq@US-160370MP2.local> (raw)
In-Reply-To: <20190809082102.GB25286@stefanha-x1.localdomain>
On Fri, Aug 09, 2019 at 09:21:02AM +0100, Stefan Hajnoczi wrote:
> On Thu, Aug 08, 2019 at 10:53:16AM +0100, Dr. David Alan Gilbert wrote:
> > * Stefan Hajnoczi (stefanha@redhat.com) wrote:
> > > On Wed, Aug 07, 2019 at 04:57:15PM -0400, Vivek Goyal wrote:
> > > 2. Can MAP/UNMAP be performed directly in QEMU via a separate virtqueue?
> >
> > I think there's two things to solve here that I don't currently know the
> > answer to:
> > 2a) We'd need to get the fd to qemu for the thing to mmap;
> > we might be able to cache the fd on the qemu side for existing
> > mappings, so when asking for a new mapping for an existing file then
> > it would already have the fd.
> >
> > 2b) Running a device with a mix of queues inside QEMU and on
> > vhost-user; I don't think we have anything with that mix
>
> vhost-user-net works in the same way. The ctrl queue is handled by QEMU
> and the rx/tx queues by the vhost device. This is in fact how vhost was
> initially designed: the vhost device is not a full virtio device, only
> the dataplane.
> > > 3. Can READ/WRITE be performed directly in QEMU via a separate virtqueue
> > > to eliminate the bad address problem?
> >
> > Are you thinking of doing all read/writes that way, or just the corner
> > cases? It doesn't seem worth it for the corner cases unless you're
> > finding them cropping up in real work loads.
>
> Send all READ/WRITE requests to QEMU instead of virtiofsd.
>
> Only handle metadata requests in virtiofsd (OPEN, RELEASE, READDIR,
> MKDIR, etc).
For now qemu is not aware of virtio-fs's fd info, but I think it's
doable, I like the idea.
thanks,
-liubo
>
> > > I'm not going to tackle DAX optimization myself right now but wanted to
> > > share these ideas.
> >
> > One I was thinking about that feels easier than (2) was to change the
> > vhost slave protocol to be split transaction; it wouldn't do anything
> > for the latency but it would be able to do some in parallel if we can
> > get the kernel to feed it.
>
> There are two cases:
> 1. mmapping multiple inode. This should benefit from parallelism,
> although mmap is still expensive because it involves TLB shootdown
> for all other threads running this process.
> 2. mmapping the same inode. Here the host kernel is likely to serialize
> mmaps even more, making it hard to gain performance.
>
> It's probably worth writing a tiny benchmark first to evaluate the
> potential gains.
>
> Stefan
> _______________________________________________
> Virtio-fs mailing list
> Virtio-fs@redhat.com
> https://www.redhat.com/mailman/listinfo/virtio-fs
next prev parent reply other threads:[~2019-08-10 21:34 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-01 16:54 [Qemu-devel] [PATCH 0/4] virtiofsd: multithreading preparation part 3 Stefan Hajnoczi
2019-08-01 16:54 ` [Qemu-devel] [PATCH 1/4] virtiofsd: process requests in a thread pool Stefan Hajnoczi
2019-08-05 12:02 ` Dr. David Alan Gilbert
2019-08-07 9:35 ` Stefan Hajnoczi
2019-08-01 16:54 ` [Qemu-devel] [PATCH 2/4] virtiofsd: prevent FUSE_INIT/FUSE_DESTROY races Stefan Hajnoczi
2019-08-05 12:26 ` Dr. David Alan Gilbert
2019-08-01 16:54 ` [Qemu-devel] [PATCH 3/4] virtiofsd: fix lo_destroy() resource leaks Stefan Hajnoczi
2019-08-05 15:17 ` Dr. David Alan Gilbert
2019-08-05 18:57 ` Dr. David Alan Gilbert
2019-08-06 18:58 ` Dr. David Alan Gilbert
2019-08-07 9:41 ` Stefan Hajnoczi
2019-08-01 16:54 ` [Qemu-devel] [PATCH 4/4] virtiofsd: add --thread-pool-size=NUM option Stefan Hajnoczi
2019-08-05 2:52 ` [Qemu-devel] [Virtio-fs] [PATCH 0/4] virtiofsd: multithreading preparation part 3 piaojun
2019-08-05 8:01 ` Stefan Hajnoczi
2019-08-05 9:40 ` piaojun
2019-08-07 18:03 ` [Qemu-devel] " Stefan Hajnoczi
2019-08-07 20:57 ` [Qemu-devel] [Virtio-fs] " Vivek Goyal
2019-08-08 9:02 ` Stefan Hajnoczi
2019-08-08 9:53 ` Dr. David Alan Gilbert
2019-08-08 12:53 ` Vivek Goyal
2019-08-09 8:23 ` Stefan Hajnoczi
2019-08-10 21:35 ` Liu Bo
2019-08-09 8:21 ` Stefan Hajnoczi
2019-08-10 21:34 ` Liu Bo [this message]
2019-08-11 2:26 ` piaojun
2019-08-12 10:05 ` Stefan Hajnoczi
2019-08-12 11:58 ` piaojun
2019-08-12 12:51 ` Dr. David Alan Gilbert
2019-08-08 8:10 ` piaojun
2019-08-08 9:53 ` Stefan Hajnoczi
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=20190810213400.rpzxazwfrbxxkneq@US-160370MP2.local \
--to=bo.liu@linux.alibaba.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vgoyal@redhat.com \
--cc=virtio-fs@redhat.com \
/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).