virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Vlad Yasevich <vyasevic@redhat.com>,
	Alexander Duyck <alexander.h.duyck@intel.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	kvm@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	Eric Dumazet <edumazet@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: [PATCHv2 net-next 0/8] enable/disable zero copy tx dynamically
Date: Wed, 31 Oct 2012 12:31:00 +0200	[thread overview]
Message-ID: <cover.1351679008.git.mst@redhat.com> (raw)


tun supports zero copy transmit since 0690899b4d4501b3505be069b9a687e68ccbe15b,
however you can only enable this mode if you know your workload does not
trigger heavy guest to host/host to guest traffic - otherwise you
get a (minor) performance regression.
This patchset addresses this problem by notifying the owner
device when callback is invoked because of a data copy.
This makes it possible to detect whether zero copy is appropriate
dynamically: we start in zero copy mode, when we detect
data copied we disable zero copy for a while.

With this patch applied, I get the same performance for
guest to host and guest to guest both with and without zero copy tx.

Changes from v1:
  Comment fixups in patches 2 and 8 suggested by Vlad Yasevich,
     no changes to other patches

Michael S. Tsirkin (8):
  skb: report completion status for zero copy skbs
  skb: api to report errors for zero copy skbs
  tun: report orphan frags errors to zero copy callback
  vhost-net: cleanup macros for DMA status tracking
  vhost: track zero copy failures using DMA length
  vhost: move -net specific code out
  vhost-net: select tx zero copy dynamically
  vhost-net: reduce vq polling on tx zerocopy

 drivers/net/tun.c         |   1 +
 drivers/vhost/net.c       | 111 +++++++++++++++++++++++++++++++++++++++++++---
 drivers/vhost/tcm_vhost.c |   1 +
 drivers/vhost/vhost.c     |  52 +++-------------------
 drivers/vhost/vhost.h     |  11 ++---
 include/linux/skbuff.h    |   5 ++-
 net/core/skbuff.c         |  24 +++++++++-
 7 files changed, 144 insertions(+), 61 deletions(-)

-- 
MST

             reply	other threads:[~2012-10-31 10:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-31 10:31 Michael S. Tsirkin [this message]
2012-10-31 10:31 ` [PATCHv2 net-next 1/8] skb: report completion status for zero copy skbs Michael S. Tsirkin
2012-11-01 15:50   ` David Miller
     [not found]   ` <20121101.115024.1422610516561380154.davem@davemloft.net>
2012-11-01 16:16     ` Michael S. Tsirkin
2012-11-01 16:20       ` David Miller
2012-10-31 10:31 ` [PATCHv2 net-next 2/8] skb: api to report errors " Michael S. Tsirkin
2012-10-31 10:31 ` [PATCHv2 net-next 3/8] tun: report orphan frags errors to zero copy callback Michael S. Tsirkin
2012-10-31 10:31 ` [PATCHv2 net-next 8/8] vhost-net: reduce vq polling on tx zerocopy Michael S. Tsirkin
2012-10-31 10:31 ` [PATCHv2 net-next 4/8] vhost-net: cleanup macros for DMA status tracking Michael S. Tsirkin
2012-10-31 10:31 ` [PATCHv2 net-next 5/8] vhost: track zero copy failures using DMA length Michael S. Tsirkin
2012-10-31 10:31 ` [PATCHv2 net-next 6/8] vhost: move -net specific code out Michael S. Tsirkin
2012-10-31 10:31 ` [PATCHv2 net-next 7/8] vhost-net: select tx zero copy dynamically Michael S. Tsirkin

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=cover.1351679008.git.mst@redhat.com \
    --to=mst@redhat.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.h.duyck@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=vyasevic@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).