Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759595Ab2J2PrW (ORCPT ); Mon, 29 Oct 2012 11:47:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41545 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753743Ab2J2PrU (ORCPT ); Mon, 29 Oct 2012 11:47:20 -0400 Date: Mon, 29 Oct 2012 17:49:32 +0200 From: "Michael S. Tsirkin" Cc: "Michael S. Tsirkin" , "David S. Miller" , Eric Dumazet , Andrew Morton , Alexander Duyck , Ian Campbell , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 0/8] enable/disable zero copy tx dynamically Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mutt-Fcc: =sent To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1712 Lines: 40 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. 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 | 109 +++++++++++++++++++++++++++++++++++++++++++--- 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 | 23 +++++++++- 7 files changed, 141 insertions(+), 61 deletions(-) -- MST -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/