All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Shirley Ma <mashirle@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Avi Kivity <avi@redhat.com>,
	"Xin, Xiaohui" <xiaohui.xin@intel.com>,
	David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/2] macvtap: TX zero copy between guest and host kernel
Date: Tue, 14 Sep 2010 21:01:56 +0200	[thread overview]
Message-ID: <20100914190156.GA16037@redhat.com> (raw)
In-Reply-To: <1284490143.13351.82.camel@localhost.localdomain>

On Tue, Sep 14, 2010 at 11:49:03AM -0700, Shirley Ma wrote:
> On Tue, 2010-09-14 at 20:27 +0200, Michael S. Tsirkin wrote:
> > As others said, the harder issues for TX are in determining that it's
> > safe
> > to unpin the memory, and how much memory is it safe to pin to beging
> > with.  For RX we have some more complexity.
> 
> I think unpin the memory is in kfree_skb() whenever the last reference
> is gone for TX. What we discussed about here is when/how vhost get
> notified to update ring buffer descriptors. Do I misunderstand something
> here? 

Right, that's a better way to put it.

> > Well it's up to you of course, but this is not what I would try:
> > if you look at the
> > patchset vhost changes is not the largest part of it,
> > so this sounds a bit like effort duplication.
> > 
> > TX only is also much less interesting than full zero copy.
> 
> It's not true. From the performance, TX only has gained big improvement.
> We need to identify how much gain from TX zero copy, and how much gain
> from RX zero copy.

I was speaking from the code point of view:
since we'll want both TX and RX eventually it's nice to
see that some thought was given to RX even if we only merge
TX as a first step.

>From the product POV, RX is already slower (more interrupts, etc)
than TX so speeding it up might be more important,
but I agree, every bit helps.

> > I think that you should be able to simply combine
> > the two drivers together, add an ioctl to
> > enable/disable zero copy mode of operation. 
> 
> That could work. But what's the purpose to have two drivers if one
> driver can handle it?
> 
> Thanks
> Shirley

This was just an idea: I thought it's a good way for people interested
in this zero copy thing to combine forces and avoid making
the same mistakes, but it's not a must of course.

-- 
MST

  reply	other threads:[~2010-09-14 19:08 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 20:43 [RFC PATCH 0/1] macvtap TX zero copy between guest and host kernel Shirley Ma
2010-09-13 20:47 ` RFC PATCH 1/2] macvtap: A new sock zero copy flag Shirley Ma
2010-09-13 20:48 ` [RFC PATCH 2/2] macvtap: TX zero copy between guest and host kernel Shirley Ma
2010-09-14  3:17   ` David Miller
2010-09-14  9:12     ` Avi Kivity
2010-09-14 15:05       ` Shirley Ma
2010-09-14 15:21         ` Arnd Bergmann
2010-09-14 15:22           ` Michael S. Tsirkin
2010-09-14 16:00             ` Shirley Ma
2010-09-14 16:29               ` Michael S. Tsirkin
2010-09-14 17:02                 ` Shirley Ma
2010-09-14 18:27                   ` Michael S. Tsirkin
2010-09-14 18:49                     ` Shirley Ma
2010-09-14 19:01                       ` Michael S. Tsirkin [this message]
2010-09-14 19:20                         ` Shirley Ma
2010-09-15  5:31                           ` Michael S. Tsirkin
2010-09-14 19:36                         ` Shirley Ma
2010-09-15  5:12                           ` Michael S. Tsirkin
2010-09-15  6:21                             ` Shirley Ma
2010-09-15 10:10                               ` Michael S. Tsirkin
2010-09-15 14:52                                 ` Shirley Ma
2010-09-15 15:04                                   ` Michael S. Tsirkin
2010-09-15 15:39                                     ` Michael S. Tsirkin
2010-09-15 17:00                                       ` Shirley Ma
2010-09-15 17:30                                         ` Michael S. Tsirkin
2010-09-15 18:48                                           ` Shirley Ma
2010-09-29  3:24                                   ` Shirley Ma
2010-09-29  8:16                                     ` Michael S. Tsirkin
2010-09-29  8:28                                       ` Michael S. Tsirkin
2010-09-29 14:33                                         ` Shirley Ma
2010-09-29 14:56                                         ` Shirley Ma
2010-09-29 14:31                                       ` Shirley Ma
2010-09-29 14:37                                       ` Shirley Ma
2010-09-29 15:14                                     ` Michael S. Tsirkin
2010-09-29 15:23                                       ` Shirley Ma
2010-09-15  2:46                 ` Xin, Xiaohui
2010-09-15  9:58                   ` Michael S. Tsirkin
2010-09-16  8:18                     ` Xin, Xiaohui
2010-09-16 10:02                       ` Michael S. Tsirkin
2010-09-15  1:56           ` Xin, Xiaohui
2010-09-15  1:50         ` Xin, Xiaohui
2010-09-15  2:40           ` Shirley Ma
2010-09-15  2:55             ` Xin, Xiaohui
2010-09-15  5:27             ` Michael S. Tsirkin
2010-09-15  6:17               ` Shirley Ma
2010-09-14 12:05 ` [RFC PATCH 0/1] macvtap " Michael S. Tsirkin
2010-09-14 15:15   ` Shirley Ma

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=20100914190156.GA16037@redhat.com \
    --to=mst@redhat.com \
    --cc=arnd@arndb.de \
    --cc=avi@redhat.com \
    --cc=davem@davemloft.net \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mashirle@us.ibm.com \
    --cc=netdev@vger.kernel.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 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.