From: Rusty Russell <rusty@rustcorp.com.au>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: target-devel@vger.kernel.org, kvm@vger.kernel.org,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 0/3] vhost cleanups and separate module
Date: Mon, 13 May 2013 10:35:01 +0930 [thread overview]
Message-ID: <87r4hb3d1e.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20130507124433.GD21361@redhat.com>
"Michael S. Tsirkin" <mst@redhat.com> writes:
> On Tue, May 07, 2013 at 02:13:44PM +0930, Rusty Russell wrote:
>> AFAICT we should always do zero copy.
>
> It seems not to be a win for small packets.
> I speculate the issue is that ring space isn't released as promptly.
> Further, we can't do it safely for guest to guest and guest to host.
> And if we try, net core just does a packet copy later (which is less
> efficient). So there's a hack in place to detect that and suppress zero
> copy.
AFAICT there are two places we should copy. One is small packets:
latency plus refcount/callbacks aren't a win. The other is weird
packets (eg. more than 1000 segements), which we currently drop.
>> Though I do wonder if we should
>> use a dedicated hook to get an skb into the tun driver and generate it
>> ourselves, rather than going sg -> iov -> skb.
>>
>> Cheers,
>> Rusty.
>
> I think we'd have to export two interfaces:
> - alloc_skb()
> .... add frags ...
> - send_skb
>
> the code to add frags could maybe use some
> library functions ...
I think we just need send_skb for the socket. We can build the skb
ourselves. But yes that frag-handling code should be factored out.
I'll see how I go.
Cheers,
Rusty.
next prev parent reply other threads:[~2013-05-13 1:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-03 5:34 [PATCH 0/3] vhost cleanups and separate module Asias He
2013-05-03 5:34 ` [PATCH 1/3] vhost: Remove vhost_enable_zcopy in vhost.h Asias He
2013-05-03 5:34 ` [PATCH 2/3] vhost: Move VHOST_NET_FEATURES to net.c Asias He
2013-05-03 5:34 ` [PATCH 3/3] vhost: Make vhost a separate module Asias He
2013-05-06 6:11 ` [PATCH 0/3] vhost cleanups and " Rusty Russell
2013-05-06 8:15 ` Asias He
2013-05-06 9:19 ` Michael S. Tsirkin
2013-05-07 4:43 ` Rusty Russell
2013-05-07 12:44 ` Michael S. Tsirkin
2013-05-13 1:05 ` Rusty Russell [this message]
2013-05-13 3:39 ` Jason Wang
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=87r4hb3d1e.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=target-devel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.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