virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Robert Vineyard <vineyard@tuffmail.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: xiaohui.xin@intel.com, kvm@vger.kernel.org,
	netdev@vger.kernel.org,
	"Peter Huang(Peng)" <peter.huangpeng@huawei.com>,
	virtualization@lists.linux-foundation.org, avi@redhat.com,
	Stephen Hemminger <shemminger@vyatta.com>
Subject: Re: [Question]About KVM network zero-copy  feature!
Date: Sun, 12 Aug 2012 23:45:27 -0400	[thread overview]
Message-ID: <50287857.2060305@tuffmail.com> (raw)
In-Reply-To: <20120812093730.GD1421@redhat.com>

On 08/12/2012 05:37 AM, Michael S. Tsirkin wrote:
> AFAIK Xin left Intel and is not working on it.
> Contributions are welcome.

That's too bad... do you know of anyone else (at Intel or otherwise) who 
might be familiar enough with the existing codebase to get me started?

 From the code I've looked at, it appears that among other things 
they're using the splice(2) / vmsplice(2) system calls to effect 
"copying" without actually copying data. If I understand the semantics 
correctly, these calls are basically shuffling pointers around to avoid 
unnecessary memcpy(3) / mmap(2) calls. I've even seen a "zero-copy" 
version of sendfile(2) that essentially wraps it around a call to splice(2).

I may be able to hack something together based on the current zero-copy 
TX implementation, but as I'm still wrapping my head around several of 
the concepts I just described, it may be awhile before I can produce 
anything useful. I have quite a bit of experience developing for Linux 
in C, but this would be my first attempt at writing kernel/device-driver 
code.

>> The Release Notes for RHEL 6.2 (originally published on 12/06/2011)
>> also specifically mention macvtap/vhost zero-copy capabilities as
>> being included as a Technology Preview:
>>
>> http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/6.2_Release_Notes/virtualization.html
>
> I think this means TX.

It does. I meant to clarify that point in my original email... yes, only 
TX zero-copy is currently implemented, and it is still marked as 
"experimental". Outside of the custom solutions like PF_RING that I 
mentioned, I don't know that I've seen zero-copy for RX.

-- Robert Vineyard

  parent reply	other threads:[~2012-08-13  3:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <50248148.4070204@huawei.com>
2012-08-11 20:55 ` [Question]About KVM network zero-copy feature! Stephen Hemminger
2012-08-11 21:54   ` Robert Vineyard
     [not found]   ` <5026D49B.10305@tuffmail.com>
2012-08-12  0:42     ` Robert Vineyard
2012-08-12  9:37       ` Michael S. Tsirkin
2012-08-13  1:24         ` Peter Huang(Peng)
2012-08-13  7:18           ` Michael S. Tsirkin
2012-08-13  3:45         ` Robert Vineyard [this message]
2012-08-13  5:59           ` Robert Vineyard
2012-08-10  3:34 Peter Huang(Peng)

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=50287857.2060305@tuffmail.com \
    --to=vineyard@tuffmail.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=peter.huangpeng@huawei.com \
    --cc=shemminger@vyatta.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xiaohui.xin@intel.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).