Skip to contentSkip to conversation

net/virtio: optimize virtio net header reset

PATCH In review Yuanhan Liu 5 participants 16 messages Jan 11, 2017 – Jan 30, 2017 4 messages not in the archive Network drivers

lore
Share & tools
lore
#0 lore raw

cover net/virtio: optimize virtio net header reset

This two patches optimized the virtio net header reset when TSO is not actually used (though it could be enabled). The basic idea is to not reset (assign 0) when it's already 0. This could avoid some severe cache issues. Micro benchmarking shows it could boost the performance up to 20+%.

---
Yuanhan Liu (2):
net/virtio: fix performance regression due to TSO enabling net/virtio: optimize header reset on any layout

 drivers/net/virtio/virtio_rxtx.c | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)
Signature · 1 line
1.9.0
#1 lore raw

PATCH 1/2 net/virtio: fix performance regression due to TSO enabling

TSO is now enabled, but it's not actually being used by default in a simple L2 forward mode. In such case, we have to zero the virtio net headers, to inform the vhost backend that no offload is being used:

    hdr->csum_start = 0;
    hdr->csum_offset = 0;
    hdr->flags = 0;

    hdr->gso_type = 0;
    hdr->gso_size = 0;
    hdr->hdr_len = 0;

Such writes could be very costly; it introduces severe cache issues:
The above operations introduce cache write for each packet, which stalls the read operation from the vhost backend.

The fact that virtio net header is initiated to zero in PMD driver init stage means that these costly writes are unnecessary and could be avoided:

    if (hdr->csum_start != 0)
        hdr->csum_start = 0;

And that's what the macro ASSIGN_UNLESS_EQUAL does. With this, the performance drop introduced by TSO enabling is recovered: it could be up to 20% in micro benchmarking.

Fixes 58169a9c8153 ("net/virtio: support Tx checksum offload")
Fixes 696573046e9e ("net/virtio: support TSO")
Cc Olivier Matz <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
---
 drivers/net/virtio/virtio_rxtx.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
drivers/net/virtio/virtio_rxtx.c +12 -6
index 1e5a6b9..8ec2f1a 100644
@@ -258,6 +258,12 @@
 		vtpci_with_feature(hw, VIRTIO_NET_F_HOST_TSO6);
 }
 
+/* avoid write operation when necessary, to lessen cache issues */
+#define ASSIGN_UNLESS_EQUAL(var, val) do {	\
+	if ((var) != (val))			\
+		(var) = (val);			\
+} while (0)
+
 static inline void
 virtqueue_enqueue_xmit(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
 		       uint16_t needed, int use_indirect, int can_push)
@@ -337,9 +343,9 @@
 			break;
 
 		default:
-			hdr->csum_start = 0;
-			hdr->csum_offset = 0;
-			hdr->flags = 0;
+			ASSIGN_UNLESS_EQUAL(hdr->csum_start, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->csum_offset, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->flags, 0);
 			break;
 		}
 
@@ -355,9 +361,9 @@
 				cookie->l3_len +
 				cookie->l4_len;
 		} else {
-			hdr->gso_type = 0;
-			hdr->gso_size = 0;
-			hdr->hdr_len = 0;
+			ASSIGN_UNLESS_EQUAL(hdr->gso_type, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->gso_size, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->hdr_len, 0);
 		}
 	}
 
Signature · 1 line
1.9.0
#18 lore raw

PATCH 2/2 net/virtio: optimize header reset on any layout

In reply to Yuanhan Liu

When any layout is used, the header is stored in the head room of mbuf. mbuf is allocated and filled by user, means there is no gurateen the header is all zero for non TSO case. Therefore, we have to do the reset by ourself:

    memest(hdr, 0, head_size);

The memset has two impacts on performance:

- memset could not be inlined, which is a bit costly.
- more importantly, it touches the mbuf, which could introduce severe cache issues as described by former patch.

Similiary, we could do the same trick: reset just when necessary, when the corresponding field is already 0, which is likely true for a simple l2 forward case. It could boost the performance up to 20+% in micro benchmarking.

Cc Maxime Coquelin <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
---
 drivers/net/virtio/virtio_rxtx.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/net/virtio/virtio_rxtx.c +8 -2
index 8ec2f1a..5ca3a88 100644
@@ -292,8 +292,14 @@
 		hdr = (struct virtio_net_hdr *)
 			rte_pktmbuf_prepend(cookie, head_size);
 		/* if offload disabled, it is not zeroed below, do it now */
-		if (offload == 0)
-			memset(hdr, 0, head_size);
+		if (offload == 0) {
+			ASSIGN_UNLESS_EQUAL(hdr->csum_start, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->csum_offset, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->flags, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->gso_type, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->gso_size, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->hdr_len, 0);
+		}
 	} else if (use_indirect) {
 		/* setup tx ring slot to point to indirect
 		 * descriptor list stored in reserved region.
Signature · 1 line
1.9.0
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] net/virtio: fix performance regression due to TSO enabling

In reply to Yuanhan Liu
Quoted 20 lines · Yuanhan Liu

TSO is now enabled, but it's not actually being used by default in a simple L2 forward mode. In such case, we have to zero the virtio net headers, to inform the vhost backend that no offload is being used:

    hdr->csum_start = 0;
    hdr->csum_offset = 0;
    hdr->flags = 0;

    hdr->gso_type = 0;
    hdr->gso_size = 0;
    hdr->hdr_len = 0;

Such writes could be very costly; it introduces severe cache issues:
The above operations introduce cache write for each packet, which stalls the read operation from the vhost backend.

The fact that virtio net header is initiated to zero in PMD driver init stage means that these costly writes are unnecessary and could be avoided:

Quoted 6 lines
    if (hdr->csum_start != 0)
        hdr->csum_start = 0;

And that's what the macro ASSIGN_UNLESS_EQUAL does. With this, the performance drop introduced by TSO enabling is recovered: it could be up to 20% in micro benchmarking.

Very nice!

Quoted 18 lines
Fixes 58169a9c8153 ("net/virtio: support Tx checksum offload")
Fixes 696573046e9e ("net/virtio: support TSO")
Cc Olivier Matz <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
---
 drivers/net/virtio/virtio_rxtx.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
drivers/net/virtio/virtio_rxtx.c +0 -0
index 1e5a6b9..8ec2f1a 100644

drivers/net/virtio/virtio_rxtx.c line 265

Quoted 8 lines
drivers/net/virtio/virtio_rxtx.c +5 -0
@@ -258,6 +258,12 @@
 		vtpci_with_feature(hw, VIRTIO_NET_F_HOST_TSO6);
 }
 
+/* avoid write operation when necessary, to lessen cache issues */
+#define ASSIGN_UNLESS_EQUAL(var, val) do {	\
+	if ((var) != (val))			\
+		(var) = (val);			\
+} while (0)

As it is intended to go in -stable, I think this is fine to have it
only in the driver, but for v17.02, maybe we should have another patch on top that declares it somewhere so that other libs and drivers can make use of it?

Quoted 21 lines
drivers/net/virtio/virtio_rxtx.c +4 -3
+
 static inline void
 virtqueue_enqueue_xmit(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
 		       uint16_t needed, int use_indirect, int can_push)
@@ -337,9 +343,9 @@
 			break;
 
 		default:
-			hdr->csum_start = 0;
-			hdr->csum_offset = 0;
-			hdr->flags = 0;
+			ASSIGN_UNLESS_EQUAL(hdr->csum_start, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->csum_offset, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->flags, 0);
 			break;
 		}
 
@@ -355,9 +361,9 @@
 				cookie->l3_len +
 				cookie->l4_len;

drivers/net/virtio/virtio_rxtx.c line 369

Quoted 10 lines
drivers/net/virtio/virtio_rxtx.c +3 -3
 		} else {
-			hdr->gso_type = 0;
-			hdr->gso_size = 0;
-			hdr->hdr_len = 0;
+			ASSIGN_UNLESS_EQUAL(hdr->gso_type, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->gso_size, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->hdr_len, 0);
 		}
 	}
 

Thanks!
Maxime

Reviewed-by on v1 2/2
#19 lore raw

Re: [PATCH 2/2] net/virtio: optimize header reset on any layout

In reply to Yuanhan Liu
Quoted 38 lines · Yuanhan Liu

When any layout is used, the header is stored in the head room of mbuf. mbuf is allocated and filled by user, means there is no gurateen the header is all zero for non TSO case. Therefore, we have to do the reset by ourself:

    memest(hdr, 0, head_size);

The memset has two impacts on performance:

- memset could not be inlined, which is a bit costly.
- more importantly, it touches the mbuf, which could introduce severe cache issues as described by former patch.

Similiary, we could do the same trick: reset just when necessary, when the corresponding field is already 0, which is likely true for a simple l2 forward case. It could boost the performance up to 20+% in micro benchmarking.

Cc Maxime Coquelin <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
---
 drivers/net/virtio/virtio_rxtx.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/net/virtio/virtio_rxtx.c +1 -2
index 8ec2f1a..5ca3a88 100644
@@ -292,8 +292,14 @@
 		hdr = (struct virtio_net_hdr *)
 			rte_pktmbuf_prepend(cookie, head_size);
 		/* if offload disabled, it is not zeroed below, do it now */
-		if (offload == 0)
-			memset(hdr, 0, head_size);
+		if (offload == 0) {

drivers/net/virtio/virtio_rxtx.c line 305

Quoted 10 lines
drivers/net/virtio/virtio_rxtx.c +7 -0
+			ASSIGN_UNLESS_EQUAL(hdr->csum_start, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->csum_offset, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->flags, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->gso_type, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->gso_size, 0);
+			ASSIGN_UNLESS_EQUAL(hdr->hdr_len, 0);
+		}
 	} else if (use_indirect) {
 		/* setup tx ring slot to point to indirect
 		 * descriptor list stored in reserved region.

Thanks!
Maxime

#3 lore raw

Re: [PATCH 1/2] net/virtio: fix performance regression due to TSO enabling

In reply to Maxime Coquelin
Quoted 9 lines · Maxime Coquelin

drivers/net/virtio/virtio_rxtx.c line 265

Quoted 5 lines
drivers/net/virtio/virtio_rxtx.c +5 -0
+/* avoid write operation when necessary, to lessen cache issues */
+#define ASSIGN_UNLESS_EQUAL(var, val) do {	\
+	if ((var) != (val))			\
+		(var) = (val);			\
+} while (0)

As it is intended to go in -stable, I think this is fine to have it only in the driver, but for v17.02, maybe we should have another patch on top that declares it somewhere so that other libs and drivers can make use of it?

Yes, if it has any other usages :)

	--yliu
Reviewed-by
#4 lore raw

Re: [PATCH 1/2] net/virtio: fix performance regression due to TSO enabling

In reply to Maxime Coquelin

Hi Yuanhan,

Thanks for the fix.

Quoted 21 lines · Maxime Coquelin
Quoted 20 lines · Yuanhan Liu

TSO is now enabled, but it's not actually being used by default in a simple L2 forward mode. In such case, we have to zero the virtio net headers, to inform the vhost backend that no offload is being used:

    hdr->csum_start = 0;
    hdr->csum_offset = 0;
    hdr->flags = 0;

    hdr->gso_type = 0;
    hdr->gso_size = 0;
    hdr->hdr_len = 0;

Such writes could be very costly; it introduces severe cache issues:
The above operations introduce cache write for each packet, which stalls the read operation from the vhost backend.

The fact that virtio net header is initiated to zero in PMD driver init stage means that these costly writes are unnecessary and could be avoided:

Quoted 7 lines
Quoted 6 lines
    if (hdr->csum_start != 0)
        hdr->csum_start = 0;

And that's what the macro ASSIGN_UNLESS_EQUAL does. With this, the performance drop introduced by TSO enabling is recovered: it could be up to 20% in micro benchmarking.

Very nice!

Yep, I'm also impressed by the result.
I would have think this is something already done by the hardware and transparent to the software.

Quoted 11 lines
Quoted 10 lines
Fixes 58169a9c8153 ("net/virtio: support Tx checksum offload")
Fixes 696573046e9e ("net/virtio: support TSO")
Cc Olivier Matz <[email protected]>
Cc Maxime Coquelin <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
Quoted 3 lines

[...]

#5 lore raw

Re: [dpdk-stable] [PATCH 1/2] net/virtio: fix performance regression due to TSO enabling

In reply to Yuanhan Liu

2017-01-11 12:27, Yuanhan Liu:

Quoted 10 lines

The fact that virtio net header is initiated to zero in PMD driver init stage means that these costly writes are unnecessary and could be avoided:

    if (hdr->csum_start != 0)
        hdr->csum_start = 0;

And that's what the macro ASSIGN_UNLESS_EQUAL does. With this, the performance drop introduced by TSO enabling is recovered: it could be up to 20% in micro benchmarking.

This patch is adding a condition to assignments.
We need a benchmark on other architectures like ARM. Please anyone?

[...]

Quoted 5 lines
drivers/net/virtio/virtio_rxtx.c +5 -0
+/* avoid write operation when necessary, to lessen cache issues */
+#define ASSIGN_UNLESS_EQUAL(var, val) do {	\
+	if ((var) != (val))			\
+		(var) = (val);			\
+} while (0)
#6 lore raw

Re: [dpdk-stable] [PATCH 1/2] net/virtio: fix performance regression due to TSO enabling

Quoted 8 lines · Thomas Monjalon

2017-01-11 12:27, Yuanhan Liu:

Quoted 7 lines

The fact that virtio net header is initiated to zero in PMD driver init stage means that these costly writes are unnecessary and could be avoided:

    if (hdr->csum_start != 0)
        hdr->csum_start = 0;
Quoted 6 lines
Quoted 3 lines

And that's what the macro ASSIGN_UNLESS_EQUAL does. With this, the performance drop introduced by TSO enabling is recovered: it could be up to 20% in micro benchmarking.

This patch is adding a condition to assignments.
We need a benchmark on other architectures like ARM. Please anyone?

I think the cost of condition should be way lower than the cost from the penalty introduced by the cache issue, that I don't see it would perform bad on other platforms.

But, of course, testing is always welcome!

	--yliu
Quoted 8 lines

[...]

Quoted 5 lines
drivers/net/virtio/virtio_rxtx.c +5 -0
+/* avoid write operation when necessary, to lessen cache issues */
+#define ASSIGN_UNLESS_EQUAL(var, val) do {	\
+	if ((var) != (val))			\
+		(var) = (val);			\
+} while (0)
#7 lore raw

Re: [dpdk-stable] [PATCH 1/2] net/virtio: fix performance regression due to TSO enabling

Quoted 16 lines · On Thu, 12 Jan 2017 10:30:58 +0800 Yuanhan Liu <[email protected]>…
Quoted 8 lines · Thomas Monjalon

2017-01-11 12:27, Yuanhan Liu:

Quoted 7 lines

The fact that virtio net header is initiated to zero in PMD driver init stage means that these costly writes are unnecessary and could be avoided:

    if (hdr->csum_start != 0)
        hdr->csum_start = 0;
Quoted 6 lines
Quoted 3 lines

And that's what the macro ASSIGN_UNLESS_EQUAL does. With this, the performance drop introduced by TSO enabling is recovered: it could be up to 20% in micro benchmarking.

This patch is adding a condition to assignments.
We need a benchmark on other architectures like ARM. Please anyone?

Quoted 7 lines

I think the cost of condition should be way lower than the cost from the penalty introduced by the cache issue, that I don't see it would perform bad on other platforms.

But, of course, testing is always welcome!

	--yliu

Hello,

we've done a synthetic measurement, principle briefly:

== Without condition check ==

start = gettimeofday();

for (i = 0; i < 1024*1024*128; ++i) {
	hdr->csum_start = 0;
	hdr->csum_offset = 0;
	hdr->flags = 0;
}

end = gettimeofday();

== With condition check ==

start = gettimeofday();

for (i = 0; i < 1024*1024*128; ++i) {
	ASSIGN_UNLESS_EQUAL(hdr->csum_start, 0);
	ASSIGN_UNLESS_EQUAL(hdr->csum_offset, 0);
	ASSIGN_UNLESS_EQUAL(hdr->flags, 0);
}

end = gettimeofday();

== Results ==

Computed as total time of all threads:

for i = 1..THREAD_COUNT:

	result += end[i] - start[i]

cpu threads without-check (ms) with-check

Xeon E5-2670        1            516              529
Xeon E5-2670        2           1155              953
Xeon E5-2670        8           8947             5044

Xeon E5-2670 16 23335 16836
Zynq-7020 (armv7) 1 6735 7205
Zynq-7020 (armv7) 2 13753 14418

The advantage for Intel is evident when increasing the number of threads.

However, on 32-bit ARMs we might expect some performance drop.

Regards
Jan

Quoted 8 lines
Quoted 8 lines

[...]

Quoted 5 lines
drivers/net/virtio/virtio_rxtx.c +5 -0
+/* avoid write operation when necessary, to lessen cache issues */
+#define ASSIGN_UNLESS_EQUAL(var, val) do {	\
+	if ((var) != (val))			\
+		(var) = (val);			\
+} while (0)  
#8 lore raw

Re: [dpdk-stable] [PATCH 1/2] net/virtio: fix performance regression due to TSO enabling

Quoted 23 lines · Jan Viktorin
Quoted 20 lines · On Thu, 12 Jan 2017 10:30:58 +0800 Yuanhan Liu <[email protected]>…
Quoted 8 lines · Thomas Monjalon

2017-01-11 12:27, Yuanhan Liu:

Quoted 7 lines

The fact that virtio net header is initiated to zero in PMD driver init stage means that these costly writes are unnecessary and could be avoided:

    if (hdr->csum_start != 0)
        hdr->csum_start = 0;
Quoted 6 lines
Quoted 3 lines

And that's what the macro ASSIGN_UNLESS_EQUAL does. With this, the performance drop introduced by TSO enabling is recovered: it could be up to 20% in micro benchmarking.

This patch is adding a condition to assignments.
We need a benchmark on other architectures like ARM. Please anyone?

I think the cost of condition should be way lower than the cost from the penalty introduced by the cache issue, that I don't see it would perform bad on other platforms.

Quoted 7 lines
Quoted 3 lines

But, of course, testing is always welcome!

	--yliu

Hello,

we've done a synthetic measurement, principle briefly:

Thanks!

Quoted 18 lines

== Without condition check ==

start = gettimeofday();

for (i = 0; i < 1024*1024*128; ++i) {
	hdr->csum_start = 0;
	hdr->csum_offset = 0;
	hdr->flags = 0;
}

end = gettimeofday();

== With condition check ==

start = gettimeofday();

Quoted 7 lines
for (i = 0; i < 1024*1024*128; ++i) {
	ASSIGN_UNLESS_EQUAL(hdr->csum_start, 0);
	ASSIGN_UNLESS_EQUAL(hdr->csum_offset, 0);
	ASSIGN_UNLESS_EQUAL(hdr->flags, 0);
}

end = gettimeofday();

But it's not the test methodology I'd expect. You are purely testing the instruction cycles. The drop on ARM is something more like "the if instruction takes more cycles than the simple assignment".

This macro is used in the case that one process is heavily writing same value (0 here) again and again while another process is heavily read it also again and again. That means cache violation always happen. With this macro, however, this cache issue could be avoided, since no write happens.

For such workload, I don't think it would behaviour worse on ARM.

	--yliu
Quoted 31 lines

== Results ==

Computed as total time of all threads:

for i = 1..THREAD_COUNT:

	result += end[i] - start[i]

cpu threads without-check (ms) with-check

Xeon E5-2670        1            516              529
Xeon E5-2670        2           1155              953
Xeon E5-2670        8           8947             5044

Xeon E5-2670 16 23335 16836
Zynq-7020 (armv7) 1 6735 7205
Zynq-7020 (armv7) 2 13753 14418

The advantage for Intel is evident when increasing the number of threads.

However, on 32-bit ARMs we might expect some performance drop.

Regards
Jan

Quoted 8 lines
Quoted 8 lines

[...]

Quoted 5 lines
drivers/net/virtio/virtio_rxtx.c +5 -0
+/* avoid write operation when necessary, to lessen cache issues */
+#define ASSIGN_UNLESS_EQUAL(var, val) do {	\
+	if ((var) != (val))			\
+		(var) = (val);			\
+} while (0)  
#9 lore raw

Re: [dpdk-stable] [PATCH 1/2] net/virtio: fix performance regression due to TSO enabling

Quoted 11 lines · Yuanhan Liu

But it's not the test methodology I'd expect. You are purely testing the instruction cycles. The drop on ARM is something more like "the if instruction takes more cycles than the simple assignment".

This macro is used in the case that one process is heavily writing same value (0 here) again and again while another process is heavily read it also again and again. That means cache violation always happen. With this macro, however, this cache issue could be avoided, since no write happens.

For such workload, I don't think it would behaviour worse on ARM.

No reply yet; I will treat it as no objections, and please shout out if any.

Both applied to dpdk-next-virtio.

	--yliu
#13 lore raw

Re: [dpdk-stable] [PATCH 1/2] net/virtio: fix performance regression due to TSO enabling

In reply to a message not in the archive
Quoted 29 lines · Michal Orsák
Quoted 28 lines · Yuanhan Liu
Quoted 15 lines · Michal Orsák
Quoted 14 lines · Yuanhan Liu
Quoted 11 lines · Yuanhan Liu

But it's not the test methodology I'd expect. You are purely testing the instruction cycles. The drop on ARM is something more like "the if instruction takes more cycles than the simple assignment".

This macro is used in the case that one process is heavily writing same value (0 here) again and again while another process is heavily read it also again and again. That means cache violation always happen. With this macro, however, this cache issue could be avoided, since no write happens.

For such workload, I don't think it would behaviour worse on ARM.

No reply yet; I will treat it as no objections, and please shout out if any.

Quoted 8 lines
Quoted 3 lines

Both applied to dpdk-next-virtio.

	--yliu

Hello,

currently I am running short of time. If you have any test prepared which i can just ran, please send me a link.

No link, but you could try:

- a typical PVP test

Quoted 7 lines
Quoted 6 lines

- a txonly test: running txonly fwd mode in guest PMD while running rxonly in fwd mode.

The second is a micro test, thus I saw way bigger boost.

When are you available for the testing, btw?

25.1.2017+

Okay, I will hold on a while to apply them.

	--yliu
#15 lore raw

Re: [dpdk-stable] [PATCH 1/2] net/virtio: fix performance regression due to TSO enabling

In reply to a message not in the archive
Quoted 18 lines · Michal Orsák
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 11 lines
Quoted 6 lines
Quoted 1 line

For such workload, I don't think it would behaviour worse on ARM.

No reply yet; I will treat it as no objections, and please shout out if any.

Both applied to dpdk-next-virtio.

	--yliu

Hello,

currently I am running short of time. If you have any test prepared which i can just ran, please send me a link.

No link, but you could try:

- a typical PVP test

- a txonly test: running txonly fwd mode in guest PMD while running rxonly in fwd mode.

Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines

The second is a micro test, thus I saw way bigger boost.

When are you available for the testing, btw?

25.1.2017+

Okay, I will hold on a while to apply them.

Ok, I will send you results when I have them.

Again, no reply yet. I'm appying them to dpdk-next-virtio. I really don't think it could perform worse in ARM, as it removes a costly cache invalidation operation (which should be more expensive than the instruction cycles).

OTOH, again, testing is welcome, if it's later proved to be worse on ARM (which I highly doubt), I could revert them.

	--yliu
#16 lore raw

Re: [dpdk-stable] [PATCH 1/2] net/virtio: fix performance regression due to TSO enabling

Quoted 26 lines · Yuanhan Liu
Quoted 18 lines · Michal Orsák
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 11 lines
Quoted 6 lines
Quoted 1 line

For such workload, I don't think it would behaviour worse on ARM.

No reply yet; I will treat it as no objections, and please shout out if any.

Both applied to dpdk-next-virtio.

	--yliu

Hello,

currently I am running short of time. If you have any test prepared which i can just ran, please send me a link.

No link, but you could try:

- a typical PVP test

- a txonly test: running txonly fwd mode in guest PMD while running rxonly in fwd mode.

Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines

The second is a micro test, thus I saw way bigger boost.

When are you available for the testing, btw?

25.1.2017+

Okay, I will hold on a while to apply them.

Ok, I will send you results when I have them.

Quoted 7 lines

Again, no reply yet. I'm appying them to dpdk-next-virtio. I really don't think it could perform worse in ARM, as it removes a costly cache invalidation operation (which should be more expensive than the instruction cycles).

OTOH, again, testing is welcome, if it's later proved to be worse on ARM (which I highly doubt), I could revert them.

Or have a per-architecture definition of ASSIGN_UNLESS_EQUAL if it proved to regress on ARM?

Maxime

Quoted 3 lines
	--yliu
#17 lore raw

Re: [dpdk-stable] [PATCH 1/2] net/virtio: fix performance regression due to TSO enabling

Quoted 4 lines · Maxime Coquelin
Quoted 2 lines

OTOH, again, testing is welcome, if it's later proved to be worse on ARM (which I highly doubt), I could revert them.

Or have a per-architecture definition of ASSIGN_UNLESS_EQUAL if it proved to regress on ARM?

Yes, we could try that.

	--yliu