Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-06-18 12:05:04 +0200
committerTakashi Iwai <tiwai@suse.de>2018-06-18 12:05:04 +0200
commitd0f4e08f1b6e58984e9b2b451a8f240fcc44acec (patch)
treeca04b53aa29cd5b7e72c2c482e139b16fe7a570b
parent29b4aac9e5be0d19054cf69d4de746b6d6729939 (diff)
parent89e0bfe4ff2f0ccaa692c435c726d5a50b74027b (diff)
Merge branch 'users/jgross/SLE12-SP3/for-next' into SLE12-SP3
Pull xen fix from Juergen Gross (bsc#1076049).
-rw-r--r--patches.fixes/xen-netfront-raise-max-number-of-slots-in-xennet_get_responses.patch56
-rw-r--r--series.conf1
2 files changed, 57 insertions, 0 deletions
diff --git a/patches.fixes/xen-netfront-raise-max-number-of-slots-in-xennet_get_responses.patch b/patches.fixes/xen-netfront-raise-max-number-of-slots-in-xennet_get_responses.patch
new file mode 100644
index 0000000000..afdf67d992
--- /dev/null
+++ b/patches.fixes/xen-netfront-raise-max-number-of-slots-in-xennet_get_responses.patch
@@ -0,0 +1,56 @@
+From: Juergen Gross <jgross@suse.com>
+Date: Tue, 12 Jun 2018 08:57:53 +0200
+Patch-mainline: v4.18-rc1
+Git-commit: 57f230ab04d2910a06d17d988f1c4d7586a59113
+References: bnc#1076049
+Subject: xen/netfront: raise max number of slots in xennet_get_responses()
+
+The max number of slots used in xennet_get_responses() is set to
+MAX_SKB_FRAGS + (rx->status <= RX_COPY_THRESHOLD).
+
+In old kernel-xen MAX_SKB_FRAGS was 18, while nowadays it is 17. This
+difference is resulting in frequent messages "too many slots" and a
+reduced network throughput for some workloads (factor 10 below that of
+a kernel-xen based guest).
+
+Replacing MAX_SKB_FRAGS by XEN_NETIF_NR_SLOTS_MIN for calculation of
+the max number of slots to use solves that problem (tests showed no
+more messages "too many slots" and throughput was as high as with the
+kernel-xen based guest system).
+
+Replace MAX_SKB_FRAGS-2 by XEN_NETIF_NR_SLOTS_MIN-1 in
+netfront_tx_slot_available() for making it clearer what is really being
+tested without actually modifying the tested value.
+
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/xen-netfront.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
+index 679da1a..922ce0a 100644
+--- a/drivers/net/xen-netfront.c
++++ b/drivers/net/xen-netfront.c
+@@ -239,7 +239,7 @@ static void rx_refill_timeout(struct timer_list *t)
+ static int netfront_tx_slot_available(struct netfront_queue *queue)
+ {
+ return (queue->tx.req_prod_pvt - queue->tx.rsp_cons) <
+- (NET_TX_RING_SIZE - MAX_SKB_FRAGS - 2);
++ (NET_TX_RING_SIZE - XEN_NETIF_NR_SLOTS_MIN - 1);
+ }
+
+ static void xennet_maybe_wake_tx(struct netfront_queue *queue)
+@@ -790,7 +790,7 @@ static int xennet_get_responses(struct netfront_queue *queue,
+ RING_IDX cons = queue->rx.rsp_cons;
+ struct sk_buff *skb = xennet_get_rx_skb(queue, cons);
+ grant_ref_t ref = xennet_get_rx_ref(queue, cons);
+- int max = MAX_SKB_FRAGS + (rx->status <= RX_COPY_THRESHOLD);
++ int max = XEN_NETIF_NR_SLOTS_MIN + (rx->status <= RX_COPY_THRESHOLD);
+ int slots = 1;
+ int err = 0;
+ unsigned long ret;
+--
+cgit v1.1
+
diff --git a/series.conf b/series.conf
index a988081fbd..215912a74a 100644
--- a/series.conf
+++ b/series.conf
@@ -10344,6 +10344,7 @@
patches.fixes/xen-fix-booting-ballooned-down-hvm-guest.patch
patches.fixes/xen-events-fifo-dont-use-get-put-cpu.patch
patches.fixes/xen-x86-mark-xen_find_pt_base-as-init.patch
+ patches.fixes/xen-netfront-raise-max-number-of-slots-in-xennet_get_responses.patch
# bsc#1042422
patches.fixes/xen-hold-lock_device_hotplug-throughout-vcpu-hotplug.patch