[pve-devel] applied: [PATCH kernel] backport vhost_net: disable zerocopy by default

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Aug 21 09:57:11 CEST 2019


It seems to make general problems[0], and upstream changed the
default back to 0 again[1] (was enabled long ago, ca. 2012).

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-August/038571.html
[1]: https://git.kernel.org/torvalds/c/098eadce3c622c07b328d0a43dda379b38cf7c5e

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 ...host_net-disable-zerocopy-by-default.patch | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 patches/kernel/0007-vhost_net-disable-zerocopy-by-default.patch

diff --git a/patches/kernel/0007-vhost_net-disable-zerocopy-by-default.patch b/patches/kernel/0007-vhost_net-disable-zerocopy-by-default.patch
new file mode 100644
index 0000000..e384d6a
--- /dev/null
+++ b/patches/kernel/0007-vhost_net-disable-zerocopy-by-default.patch
@@ -0,0 +1,40 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jason Wang <jasowang at redhat.com>
+Date: Mon, 17 Jun 2019 05:20:54 -0400
+Subject: [PATCH] vhost_net: disable zerocopy by default
+
+[ Upstream commit 098eadce3c622c07b328d0a43dda379b38cf7c5e ]
+
+Vhost_net was known to suffer from HOL[1] issues which is not easy to
+fix. Several downstream disable the feature by default. What's more,
+the datapath was split and datacopy path got the support of batching
+and XDP support recently which makes it faster than zerocopy part for
+small packets transmission.
+
+It looks to me that disable zerocopy by default is more
+appropriate. It cold be enabled by default again in the future if we
+fix the above issues.
+
+[1] https://patchwork.kernel.org/patch/3787671/
+
+Signed-off-by: Jason Wang <jasowang at redhat.com>
+Acked-by: Michael S. Tsirkin <mst at redhat.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+Signed-off-by: Sasha Levin <sashal at kernel.org>
+---
+ drivers/vhost/net.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
+index 2d9df786a9d3..21e0805e5e60 100644
+--- a/drivers/vhost/net.c
++++ b/drivers/vhost/net.c
+@@ -36,7 +36,7 @@
+ 
+ #include "vhost.h"
+ 
+-static int experimental_zcopytx = 1;
++static int experimental_zcopytx = 0;
+ module_param(experimental_zcopytx, int, 0444);
+ MODULE_PARM_DESC(experimental_zcopytx, "Enable Zero Copy TX;"
+ 		                       " 1 -Enable; 0 - Disable");
-- 
2.20.1





More information about the pve-devel mailing list