From: Avi Kivity <avi@qumranet.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Mark McLoughlin <markmc@redhat.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH 4/5] kvm: qemu: Use vringfd to eliminate copies
Date: Mon, 16 Jun 2008 07:58:09 -0700 [thread overview]
Message-ID: <48567F81.4070801@qumranet.com> (raw)
In-Reply-To: <4856728F.4020501@us.ibm.com>
Anthony Liguori wrote:
>>
>> In theory vringfd will get us zero copy from guest sendfile out to
>> external machines. For anything else we're doing a copy anyway, so
>> avoiding copying has no great benefit.
>>
>
> There's nothing that prevents zero-copy to be implemented for tun
> without vringfd. In fact, I seem to recall that your earlier patches
> implemented zero-copy :-)
>
> I like the vringfd model and I think it's a good way to move forward.
> My concern is that it introduces an extra syscall in the TX path.
> Right now, we do a single write call whereas with vringfd we need to
> insert the TX packet into the queue, do a notify, and then wait for
> indication that the TX has succeeded.
>
> I know we'll win with TSO but we don't need vringfd for TSO. The
> jury's still out IMHO as to whether we should do vringfd or just try
> to merge TSO tun patches.
tun+tso still doesn't give you zerocopy (unless you change it to use
aio, which re-introduces the syscall).
btw, the two vringfd syscalls are amortized over a potentially large
number of packets, whereas the single tun syscall is per-packet.
(note: we can get rid of the two syscalls as well by having each side
opportunistically pick up ring entries, like Xen does)
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
next prev parent reply other threads:[~2008-06-16 14:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-13 13:57 [PATCH 0/0][RFC] KVM use of vringfd Mark McLoughlin
2008-06-13 13:57 ` [PATCH 1/5] vring: Replace mmap() interface with ioctl() Mark McLoughlin
2008-06-13 13:57 ` [PATCH 2/5] lguest: Use VRINGSETINFO ioctl() instead of mmap() Mark McLoughlin
2008-06-13 13:57 ` [PATCH 3/5] kvm: qemu: Publish last_avail index in the ring Mark McLoughlin
2008-06-13 13:58 ` [PATCH 4/5] kvm: qemu: Use vringfd to eliminate copies Mark McLoughlin
2008-06-13 13:58 ` [PATCH 5/5] kvm: qemu: Add support for partial csums and GSO Mark McLoughlin
2008-06-14 23:28 ` [PATCH 4/5] kvm: qemu: Use vringfd to eliminate copies Anthony Liguori
2008-06-16 2:10 ` Rusty Russell
2008-06-16 14:02 ` Anthony Liguori
2008-06-16 14:58 ` Avi Kivity [this message]
2008-06-18 5:43 ` Rusty Russell
2008-06-18 14:01 ` Avi Kivity
2008-06-17 14:08 ` Mark McLoughlin
2008-06-17 14:54 ` Anthony Liguori
2008-06-17 15:45 ` Mark McLoughlin
2008-06-13 14:09 ` [PATCH 1/5] vring: Replace mmap() interface with ioctl() Avi Kivity
2008-06-17 12:19 ` Mark McLoughlin
2008-06-18 14:05 ` Avi Kivity
2008-06-14 9:02 ` Rusty Russell
2008-06-14 14:20 ` Avi Kivity
2008-06-14 23:23 ` Anthony Liguori
2008-06-15 15:24 ` Avi Kivity
2008-06-15 19:13 ` Anthony Liguori
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=48567F81.4070801@qumranet.com \
--to=avi@qumranet.com \
--cc=aliguori@us.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=markmc@redhat.com \
--cc=rusty@rustcorp.com.au \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.