Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Ma <lma@suse.com>2019-10-22 13:58:12 +0800
committerLin Ma <lma@suse.com>2019-10-22 13:58:12 +0800
commite6f0d8115bd91938a47eba4326e56ea90dfc8945 (patch)
treea0121dcd1a3d4f115000537dee1a812d391afbec
parent481da9ba3a36fa794f1b816fd4eca3b227ce7179 (diff)
vhost_net: conditionally enable tx polling (bsc#1145099).
-rw-r--r--patches.suse/vhost_net-conditionally-enable-tx-polling.patch44
-rw-r--r--series.conf3
2 files changed, 47 insertions, 0 deletions
diff --git a/patches.suse/vhost_net-conditionally-enable-tx-polling.patch b/patches.suse/vhost_net-conditionally-enable-tx-polling.patch
new file mode 100644
index 0000000000..0848fa6879
--- /dev/null
+++ b/patches.suse/vhost_net-conditionally-enable-tx-polling.patch
@@ -0,0 +1,44 @@
+From: Jason Wang <jasowang@redhat.com>
+Date: Mon, 13 Nov 2017 11:45:34 +0800
+Subject: vhost_net: conditionally enable tx polling
+Patch-mainline: v4.15-rc1
+Git-commit: feb8892cb441c742d4220cf7ced001e7fa070731
+References: bsc#1145099
+
+We always poll tx for socket, this is sub optimal since this will
+slightly increase the waitqueue traversing time and more important,
+vhost could not benefit from commit 9e641bdcfa4e ("net-tun:
+restructure tun_do_read for better sleep/wakeup efficiency") even if
+we've stopped rx polling during handle_rx(), tx poll were still left
+in the waitqueue.
+
+Pktgen from a remote host to VM over mlx4 on two 2.00GHz Xeon E5-2650
+shows 11.7% improvements on rx PPS. (from 1.28Mpps to 1.44Mpps)
+
+Cc: Wei Xu <wexu@redhat.com>
+Cc: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
+Signed-off-by: Jason Wang <jasowang@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Lin Ma <lma@suse.com>
+---
+ drivers/vhost/net.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/vhost/net.c
++++ b/drivers/vhost/net.c
+@@ -394,6 +394,7 @@ static void handle_tx(struct vhost_net *net)
+ goto out;
+
+ vhost_disable_notify(&net->dev, vq);
++ vhost_net_disable_vq(net, vq);
+
+ hdr_size = nvq->vhost_hlen;
+ zcopy = nvq->ubufs;
+@@ -484,6 +485,7 @@ static void handle_tx(struct vhost_net *net)
+ % UIO_MAXIOV;
+ }
+ vhost_discard_vq_desc(vq, 1);
++ vhost_net_enable_vq(net, vq);
+ break;
+ }
+ if (err != len)
diff --git a/series.conf b/series.conf
index f2f5b52f52..c1539e0827 100644
--- a/series.conf
+++ b/series.conf
@@ -25821,6 +25821,9 @@
patches.kabi/Fix-KVM-kABI-after-x86-mmu-backports.patch
patches.kabi/Fix-AMD-IOMMU-kABI.patch
+ # bsc#1145099
+ patches.suse/vhost_net-conditionally-enable-tx-polling.patch
+
########################################################
# You'd better have a good reason for adding a patch
# below here.