vhost: fix unnecessary dirty page logging
PATCH 1/1 vhost: fix unnecessary dirty page logging
From: Xuan Ding <[email protected]>
The dirty page logging is only required in vhost enqueue direction for live migration. This patch removes the unnecessary dirty page logging in vhost dequeue direction. Otherwise, it will result in a performance drop. Some if-else judgements are also optimized to improve performance.
--- lib/vhost/virtio_net.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-)
lib/vhost/virtio_net.c +13 -18
@@ -1113,27 +1113,27 @@ sync_fill_seg(struct virtio_net *dev, struct vhost_virtqueue *vq,rte_memcpy ((void *)((uintptr_t )(buf_addr)), rte_pktmbuf_mtod_offset(m, void *, mbuf_offset), cpy_len); +vhost_log_cache_write_iova (dev, vq, buf_iova, cpy_len); +PRINT_PACKET (dev, (uintptr_t )(buf_addr), cpy_len,0 ); }else { rte_memcpy(rte_pktmbuf_mtod_offset(m, void *, mbuf_offset), (void *)((uintptr_t)(buf_addr)), cpy_len); } -vhost_log_cache_write_iova (dev, vq, buf_iova, cpy_len); -PRINT_PACKET (dev, (uintptr_t )(buf_addr), cpy_len,0 ); }else {if (to_desc) { batch_copy[vq->batch_copy_nb_elems].dst = (void *)((uintptr_t )(buf_addr)); batch_copy[vq->batch_copy_nb_elems].src = rte_pktmbuf_mtod_offset(m, void *, mbuf_offset); + batch_copy[vq->batch_copy_nb_elems].log_addr = buf_iova; + batch_copy[vq->batch_copy_nb_elems].len = cpy_len; }else { batch_copy[vq->batch_copy_nb_elems].dst = rte_pktmbuf_mtod_offset(m, void *, mbuf_offset); batch_copy[vq->batch_copy_nb_elems].src = (void *)((uintptr_t )(buf_addr)); } - batch_copy[vq->batch_copy_nb_elems].log_addr = buf_iova; - batch_copy[vq->batch_copy_nb_elems].len = cpy_len; vq->batch_copy_nb_elems++; } }
@@ -2739,18 +2739,14 @@ desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,if (async_fill_seg (dev, vq, cur, mbuf_offset, buf_iova + buf_offset, cpy_len, false) <0 ) goto error; + }else if (likely (hdr && cur == m)) { + rte_memcpy(rte_pktmbuf_mtod_offset(cur, void *, mbuf_offset), + (void *)((uintptr_t)(buf_addr + buf_offset)), + cpy_len); }else { -if (hdr && cur == m) { - rte_memcpy(rte_pktmbuf_mtod_offset(cur, void *, mbuf_offset), - (void *)((uintptr_t)(buf_addr + buf_offset)), - cpy_len); -vhost_log_cache_write_iova (dev, vq, buf_iova + buf_offset, cpy_len); -PRINT_PACKET (dev, (uintptr_t )(buf_addr + buf_offset), cpy_len,0 ); - }else { -sync_fill_seg (dev, vq, cur, mbuf_offset, - buf_addr + buf_offset, - buf_iova + buf_offset, cpy_len, false); - } +sync_fill_seg (dev, vq, cur, mbuf_offset, + buf_addr + buf_offset, + buf_iova + buf_offset, cpy_len, false); } mbuf_avail -= cpy_len;
@@ -2804,9 +2800,8 @@ desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,async_iter_finalize (async);if (hdr) pkts_info[slot_idx].nethdr = *hdr; - }else { -if (hdr) -vhost_dequeue_offload (dev, hdr, m, legacy_ol_flags); + }else if (hdr) { +vhost_dequeue_offload (dev, hdr, m, legacy_ol_flags); }return 0 ;
Signature · 1 line
2.17.1
Quoted 118 lines
-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Thursday, July 7, 2022 2:55 PM
To: [email protected]; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang, Cheng1 <[email protected]>; Ding, Xuan <[email protected]>
Subject: [PATCH] vhost: fix unnecessary dirty page loggingFrom: Xuan Ding <[email protected]>
The dirty page logging is only required in vhost enqueue direction for live migration. This patch removes the unnecessary dirty page logging in vhost dequeue direction. Otherwise, it will result in a performance drop. Some if- else judgements are also optimized to improve performance.
Fixes 6d823bb302c7 ("vhost: prepare sync for descriptor to mbufrefactoring")
Fixes b6eee3e83402 ("vhost: fix sync dequeue offload")Signed-off-by Xuan Ding <[email protected]>--- lib/vhost/virtio_net.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-)lib/vhost/virtio_net.c index renamed from lib/vhost/virtio_net.c +0
-0
e842c35fef..12b7fbe7f9100644lib/vhost/virtio_net.c +4
-2@@ -1113,27 +1113,27 @@ sync_fill_seg(struct virtio_net *dev, struct vhost_virtqueue *vq,rte_memcpy ((void *)((uintptr_t )(buf_addr)), rte_pktmbuf_mtod_offset(m, void *, mbuf_offset), cpy_len); +vhost_log_cache_write_iova (dev, vq, buf_iova, cpy_len); +PRINT_PACKET (dev, (uintptr_t )(buf_addr), cpy_len,0 ); }else {rte_memcpy (rte_pktmbuf_mtod_offset (m ,void *, mbuf_offset), (void *)((uintptr_t)(buf_addr)), cpy_len); } -vhost_log_cache_write_iova (dev, vq, buf_iova, cpy_len); -PRINT_PACKET (dev, (uintptr_t )(buf_addr), cpy_len,0 ); }else {if (to_desc) { batch_copy[vq->batch_copy_nb_elems].dst = (void *)((uintptr_t )(buf_addr)); batch_copy[vq->batch_copy_nb_elems].src = rte_pktmbuf_mtod_offset(m, void *, mbuf_offset); + batch_copy[vq->batch_copy_nb_elems].log_addr = buf_iova; + batch_copy[vq->batch_copy_nb_elems].len = cpy_len; }else { batch_copy[vq->batch_copy_nb_elems].dst = rte_pktmbuf_mtod_offset(m, void *,
mbuf_offset);lib/vhost/virtio_net.c +0
-1batch_copy[vq->batch_copy_nb_elems].src = (void *)((uintptr_t )(buf_addr)); } - batch_copy[vq->batch_copy_nb_elems].log_addr =
buf_iova;lib/vhost/virtio_net.c +4
-7- batch_copy[vq->batch_copy_nb_elems].len = cpy_len; vq->batch_copy_nb_elems++; } }@@ -2739,18 +2739,14 @@ desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq, if (async_fill_seg(dev, vq, cur, mbuf_offset, buf_iova + buf_offset, cpy_len, false) < 0) goto error; + }else if (likely (hdr && cur == m)) { +rte_memcpy (rte_pktmbuf_mtod_offset (cur ,void *, mbuf_offset), + (void *)((uintptr_t)(buf_addr + buf_offset)), + cpy_len); }else { -if (hdr && cur == m) { -rte_memcpy (rte_pktmbuf_mtod_offset (cur , void *, mbuf_offset), - (void *)((uintptr_t)(buf_addr + buf_offset)), - cpy_len); -vhost_log_cache_write_iova (dev, vq, buf_iova + buf_offset, cpy_len); - PRINT_PACKET(dev, (uintptr_t)(buf_addr +
buf_offset),cpy_len, 0);lib/vhost/virtio_net.c +5
-8- }else { -sync_fill_seg (dev, vq, cur, mbuf_offset, - buf_addr + buf_offset, - buf_iova + buf_offset, cpy_len, false); - } +sync_fill_seg (dev, vq, cur, mbuf_offset, + buf_addr + buf_offset, + buf_iova + buf_offset, cpy_len, false); } mbuf_avail -= cpy_len;@@ -2804,9 +2800,8 @@ desc_to_mbuf(struct virtio_net *dev, structvhost_virtqueue *vq,async_iter_finalize (async );if (hdr) pkts_info[slot_idx].nethdr = *hdr; - }else { -if (hdr) -vhost_dequeue_offload (dev, hdr, m, legacy_ol_flags); + }else if (hdr) { +vhost_dequeue_offload (dev, hdr, m, legacy_ol_flags); }
Quoted 3 lines
return 0;
--
2.17.1
Thanks,
Jiayu
Quoted 16 lines
-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Thursday, July 7, 2022 2:55 PM
To: [email protected]; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang, Cheng1 <[email protected]>; Ding, Xuan <[email protected]>
Subject: [PATCH] vhost: fix unnecessary dirty page loggingFrom: Xuan Ding <[email protected]>
The dirty page logging is only required in vhost enqueue direction for live migration. This patch removes the unnecessary dirty page logging in vhost dequeue direction. Otherwise, it will result in a performance drop. Some if-else judgements are also optimized to improve performance.
Quoted 6 lines
Fixes 6d823bb302c7 ("vhost: prepare sync for descriptor to mbufrefactoring")
Fixes b6eee3e83402 ("vhost: fix sync dequeue offload")Signed-off-by Xuan Ding <[email protected]>---
Although it's late in release, we can consider to merge this as I see it impacts the performance by 5%:
http://inbox.dpdk.org/dev/BYAPR11MB2711F13CDA2B0A4535A6591EFE839@BYAPR11MB2711.namprd11.prod.outlook.com/T/#t
But also, it will be good to know the performance issue is solved by sharing the test results.
Thanks,
Chenbo
Quoted 20 lines · Chenbo
Quoted 20 lines
-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Thursday, July 7, 2022 2:55 PM
To: [email protected]; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang, Cheng1 <[email protected]>; Ding, Xuan <[email protected]>
Subject: [PATCH] vhost: fix unnecessary dirty page loggingFrom: Xuan Ding <[email protected]>
The dirty page logging is only required in vhost enqueue direction for live migration. This patch removes the unnecessary dirty page logging in vhost dequeue direction. Otherwise, it will result in a performance drop. Some if-else judgements are also optimized to improve performance.
Fixes 6d823bb302c7 ("vhost: prepare sync for descriptor to mbufrefactoring")
Fixes b6eee3e83402 ("vhost: fix sync dequeue offload")
Quoted 8 lines
Quoted 2 lines
Signed-off-by Xuan Ding <[email protected]>---
Reviewed-by Chenbo Xia <[email protected]>Although it's late in release, we can consider to merge this as I see it impacts the performance by 5%:
http://inbox.dpdk.org/dev/BYAPR11MB2711F13CDA2B0A4535A6591EFE839@BYAPR11MB2711.namprd11.prod.outlook.com/T/#t
Yes, I raised we need it in -rc4 at today's Release status meeting. I'll review it today.
Quoted 2 lines
But also, it will be good to know the performance issue is solved by sharing the test results.
Yes, Intel performance results would be appreciated.
Quoted 3 lines
Thanks,
Chenbo
Thanks,
Maxime
Hi,
Quoted 46 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: 2022年7月7日 19:31
To: Xia, Chenbo <[email protected]>; Ding, Xuan <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang, Cheng1 <[email protected]>
Subject: Re: [PATCH] vhost: fix unnecessary dirty page loggingQuoted 10 lines · Chenbo
Quoted 10 lines
-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Thursday, July 7, 2022 2:55 PM
To: [email protected]; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang,
Cheng1 <[email protected]>; Ding, Xuan <[email protected]>
Subject: [PATCH] vhost: fix unnecessary dirty page loggingQuoted 6 lines
Quoted 6 lines
From: Xuan Ding <[email protected]>
The dirty page logging is only required in vhost enqueue direction for live migration. This patch removes the unnecessary dirty page logging in vhost dequeue direction. Otherwise, it will result in a performance drop. Some if-else judgements are also optimized to improve
performance.
Quoted 5 lines
Quoted 5 lines
Fixes 6d823bb302c7 ("vhost: prepare sync for descriptor to mbufrefactoring")
Fixes b6eee3e83402 ("vhost: fix sync dequeue offload")Quoted 8 lines
Quoted 2 lines
Signed-off-by Xuan Ding <[email protected]>---
Reviewed-by Chenbo Xia <[email protected]>Although it's late in release, we can consider to merge this as I see it impacts the performance by 5%:
http://inbox.dpdk.org/dev/BYAPR11MB2711F13CDA2B0A4535A6591EFE839@B
YAPRQuoted 1 line
11MB2711.namprd11.prod.outlook.com/T/#t
Quoted 7 lines
Yes, I raised we need it in -rc4 at today's Release status meeting. I'll review it today.
Quoted 2 lines
But also, it will be good to know the performance issue is solved by sharing the test results.
Yes, Intel performance results would be appreciated.
This fix patch is for the issue reported at 22.07-rc3. The refactoring patch brings a 3%~5% perf drop in vhost sync path. With fix patch, the perf drop introduced by refactoring is solved.
However, the testing result shows there still exists ~5% packed ring perf drop compared with 22.03. We find the improving checksum offload patch series in 22.07 may contribute to the packed ring perf drop. Because we always do checksum checks in PMD.
Could you help to double check this patch series, is it as expected? Your assistance is really appreciated.
Regards,
Xuan
Quoted 7 lines
Quoted 4 lines
Thanks,
ChenboThanks,
Maxime
He, Xingguang
Tested-byQuoted 66 lines
-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Friday, July 8, 2022 3:04 PM
To: Maxime Coquelin <[email protected]>; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang, Cheng1 <[email protected]>
Subject: RE: [PATCH] vhost: fix unnecessary dirty page loggingHi,
Quoted 24 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: 2022年7月7日 19:31
To: Xia, Chenbo <[email protected]>; Ding, Xuan <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang,
Cheng1 <[email protected]>
Subject: Re: [PATCH] vhost: fix unnecessary dirty page loggingQuoted 10 lines · Chenbo
Quoted 10 lines
-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Thursday, July 7, 2022 2:55 PM
To: [email protected]; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang,
Cheng1 <[email protected]>; Ding, Xuan <[email protected]>
Subject: [PATCH] vhost: fix unnecessary dirty page loggingQuoted 22 lines
Quoted 7 lines
Quoted 7 lines
From: Xuan Ding <[email protected]>
The dirty page logging is only required in vhost enqueue direction for live migration. This patch removes the unnecessary dirty page logging in vhost dequeue direction. Otherwise, it will result in a performance drop. Some if-else judgements are also optimized to improve
performance.
Quoted 13 lines
Quoted 7 lines
Fixes 6d823bb302c7 ("vhost: prepare sync for descriptor to mbufrefactoring")
Fixes b6eee3e83402 ("vhost: fix sync dequeue offload")Signed-off-by Xuan Ding <[email protected]>---
Reviewed-by Chenbo Xia <[email protected]>Although it's late in release, we can consider to merge this as I see it impacts the performance by 5%:
http://inbox.dpdk.org/dev/BYAPR11MB2711F13CDA2B0A4535A6591EFE839
@BQuoted 6 lines
YAPR
Quoted 1 line
11MB2711.namprd11.prod.outlook.com/T/#t
Yes, I raised we need it in -rc4 at today's Release status meeting. I'll review it today.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
But also, it will be good to know the performance issue is solved by sharing the test results.
Yes, Intel performance results would be appreciated.
This fix patch is for the issue reported at 22.07-rc3. The refactoring patch brings a 3%~5% perf drop in vhost sync path.
With fix patch, the perf drop introduced by refactoring is solved.
The fix is for a critical issue, I tested dpdk22.07-rc3 with the patch, the performance drop introduced by refactoring have been fixed and no other regressions were seen as a result of the patch, but the packed ring still exist drop around 5%.
Quoted 6 lines
However, the testing result shows there still exists ~5% packed ring perf drop compared with 22.03.
We find the improving checksum offload patch series in 22.07 may contribute to the packed ring perf drop.
Because we always do checksum checks in PMD.
I tested the performance of Vhost before and after checksum offload patch series, there exist ~5% performance drop.
Quoted 14 lines
Could you help to double check this patch series, is it as expected? Your assistance is really appreciated.
Regards,
XuanQuoted 7 lines
Quoted 4 lines
Thanks,
ChenboThanks,
Maxime
Quoted 97 lines
-----Original Message-----
From: He, Xingguang <[email protected]>
Sent: Friday, July 8, 2022 3:53 PM
To: Ding, Xuan <[email protected]>; Maxime Coquelin <[email protected]>; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; Yang, YvonneX <[email protected]>; Jiang, Cheng1 <[email protected]>
Subject: RE: [PATCH] vhost: fix unnecessary dirty page loggingQuoted 10 lines
-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Friday, July 8, 2022 3:04 PM
To: Maxime Coquelin <[email protected]>; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang, Cheng1 <[email protected]>
Subject: RE: [PATCH] vhost: fix unnecessary dirty page loggingQuoted 23 lines
Hi,
Quoted 21 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: 2022年7月7日 19:31
To: Xia, Chenbo <[email protected]>; Ding, Xuan <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang,
Cheng1 <[email protected]>
Subject: Re: [PATCH] vhost: fix unnecessary dirty page loggingQuoted 7 lines · Chenbo
Quoted 7 lines
-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Thursday, July 7, 2022 2:55 PM
To: [email protected]; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneXQuoted 20 lines
Quoted 20 lines
Quoted 11 lines
Quoted 11 lines
Jiang,
Cheng1 <[email protected]>; Ding, Xuan <[email protected]>
Subject: [PATCH] vhost: fix unnecessary dirty page loggingFrom: Xuan Ding <[email protected]>
The dirty page logging is only required in vhost enqueue direction for live migration. This patch removes the unnecessary dirty page logging in vhost dequeue direction. Otherwise, it will result in a performance drop. Some if-else judgements are also optimized to improve
performance.
Quoted 8 lines
Quoted 7 lines
Fixes 6d823bb302c7 ("vhost: prepare sync for descriptor to mbufrefactoring")
Fixes b6eee3e83402 ("vhost: fix sync dequeue offload")Signed-off-by Xuan Ding <[email protected]>---
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Reviewed-by Chenbo Xia <[email protected]>Although it's late in release, we can consider to merge this as I see it impacts the performance by 5%:
http://inbox.dpdk.org/dev/BYAPR11MB2711F13CDA2B0A4535A6591EFE839
Quoted 7 lines
@B
Quoted 6 lines
YAPR
Quoted 1 line
11MB2711.namprd11.prod.outlook.com/T/#t
Yes, I raised we need it in -rc4 at today's Release status meeting. I'll review it today.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
But also, it will be good to know the performance issue is solved by sharing the test results.
Yes, Intel performance results would be appreciated.
This fix patch is for the issue reported at 22.07-rc3. The refactoring patch brings a 3%~5% perf drop in vhost sync path.
With fix patch, the perf drop introduced by refactoring is solved.The fix is for a critical issue, I tested dpdk22.07-rc3 with the patch, the performance drop introduced by refactoring have been fixed and no other regressions were seen as a result of the patch, but the packed ring still exist drop around 5%.
Tested-by Xingguang He<[email protected]>Quoted 1 line
Quoted 8 lines
Quoted 5 lines
However, the testing result shows there still exists ~5% packed ring perf drop compared with 22.03.
We find the improving checksum offload patch series in 22.07 may contribute to the packed ring perf drop.
Because we always do checksum checks in PMD.I tested the performance of Vhost before and after checksum offload patch series, there exist ~5% performance drop.
Sorry, the drop of checksum offload patch series is ~3%. The drop between DPDK22.03 and DPDK22.07-rc3 is ~5%.
Quoted 15 lines
Quoted 15 lines
Could you help to double check this patch series, is it as expected? Your assistance is really appreciated.
Regards,
XuanQuoted 7 lines
Quoted 4 lines
Thanks,
ChenboThanks,
Maxime
Hi,
Quoted 51 lines · Xuan
Hi,
Quoted 49 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: 2022年7月7日 19:31
To: Xia, Chenbo <[email protected]>; Ding, Xuan <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang, Cheng1 <[email protected]>
Subject: Re: [PATCH] vhost: fix unnecessary dirty page loggingQuoted 10 lines · Chenbo
Quoted 10 lines
-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Thursday, July 7, 2022 2:55 PM
To: [email protected]; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang,
Cheng1 <[email protected]>; Ding, Xuan <[email protected]>
Subject: [PATCH] vhost: fix unnecessary dirty page loggingQuoted 6 lines
Quoted 6 lines
From: Xuan Ding <[email protected]>
The dirty page logging is only required in vhost enqueue direction for live migration. This patch removes the unnecessary dirty page logging in vhost dequeue direction. Otherwise, it will result in a performance drop. Some if-else judgements are also optimized to improve
performance.
Quoted 5 lines
Quoted 5 lines
Fixes 6d823bb302c7 ("vhost: prepare sync for descriptor to mbufrefactoring")
Fixes b6eee3e83402 ("vhost: fix sync dequeue offload")Quoted 8 lines
Quoted 2 lines
Signed-off-by Xuan Ding <[email protected]>---
Reviewed-by Chenbo Xia <[email protected]>Although it's late in release, we can consider to merge this as I see it impacts the performance by 5%:
http://inbox.dpdk.org/dev/BYAPR11MB2711F13CDA2B0A4535A6591EFE839@B
YAPRQuoted 1 line
11MB2711.namprd11.prod.outlook.com/T/#t
Yes, I raised we need it in -rc4 at today's Release status meeting. I'll review it today.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
But also, it will be good to know the performance issue is solved by sharing the test results.
Yes, Intel performance results would be appreciated.
This fix patch is for the issue reported at 22.07-rc3. The refactoring patch brings a 3%~5% perf drop in vhost sync path. With fix patch, the perf drop introduced by refactoring is solved.
Good.
Quoted 6 lines
However, the testing result shows there still exists ~5% packed ring perf drop compared with 22.03. We find the improving checksum offload patch series in 22.07 may contribute to the packed ring perf drop. Because we always do checksum checks in PMD.
Could you help to double check this patch series, is it as expected? Your assistance is really appreciated.
I will look again, but if your analysis is right, there's not much we can do. The series is filling gaps in the checksum offload support.
I will not have time to work on it for v22.07, we're too late in the cycle. What surprises me is that only packed ring is impacted.
Regards,
Maxime
Quoted 12 lines
Regards,
XuanQuoted 7 lines
Quoted 4 lines
Thanks,
ChenboThanks,
Maxime
Quoted 83 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: 2022年7月8日 15:58
To: Ding, Xuan <[email protected]>; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang, Cheng1 <[email protected]>
Subject: Re: [PATCH] vhost: fix unnecessary dirty page loggingHi,
Quoted 48 lines · Xuan
Hi,
Quoted 46 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: 2022年7月7日 19:31
To: Xia, Chenbo <[email protected]>; Ding, Xuan <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang,
Cheng1 <[email protected]>
Subject: Re: [PATCH] vhost: fix unnecessary dirty page loggingQuoted 10 lines · Chenbo
Quoted 10 lines
-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Thursday, July 7, 2022 2:55 PM
To: [email protected]; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang,
Cheng1 <[email protected]>; Ding, Xuan <[email protected]>
Subject: [PATCH] vhost: fix unnecessary dirty page loggingQuoted 7 lines
Quoted 7 lines
From: Xuan Ding <[email protected]>
The dirty page logging is only required in vhost enqueue direction for live migration. This patch removes the unnecessary dirty page logging in vhost dequeue direction. Otherwise, it will result in a performance drop. Some if-else judgements are also optimized to improve
performance.
Quoted 13 lines
Quoted 7 lines
Fixes 6d823bb302c7 ("vhost: prepare sync for descriptor to mbufrefactoring")
Fixes b6eee3e83402 ("vhost: fix sync dequeue offload")Signed-off-by Xuan Ding <[email protected]>---
Reviewed-by Chenbo Xia <[email protected]>Although it's late in release, we can consider to merge this as I see it impacts the performance by 5%:
http://inbox.dpdk.org/dev/BYAPR11MB2711F13CDA2B0A4535A6591EFE839@B
Quoted 6 lines
Quoted 6 lines
YAPR
Quoted 1 line
11MB2711.namprd11.prod.outlook.com/T/#t
Yes, I raised we need it in -rc4 at today's Release status meeting. I'll review it today.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
But also, it will be good to know the performance issue is solved by sharing the test results.
Yes, Intel performance results would be appreciated.
This fix patch is for the issue reported at 22.07-rc3. The refactoring patch
brings a 3%~5% perf drop in vhost sync path.
Quoted 1 line
With fix patch, the perf drop introduced by refactoring is solved.
Good.
Quoted 1 line
However, the testing result shows there still exists ~5% packed ring perf drop
compared with 22.03.
Quoted 1 line
We find the improving checksum offload patch series in 22.07 may contribute
Quoted 8 lines
to the packed ring perf drop.
Quoted 4 lines
Because we always do checksum checks in PMD.
Could you help to double check this patch series, is it as expected? Your assistance is really appreciated.
I will look again, but if your analysis is right, there's not much we can do. The series is filling gaps in the checksum offload support.
Yes, I think so.
Quoted 3 lines
I will not have time to work on it for v22.07, we're too late in the cycle. What surprises me is that only packed ring is impacted.
From the testing results, the packed ring is more sensitive to the patch series, while split ring shows a much lower drop in performance.
Thanks for your support!
Regards,
Xuan
Quoted 16 lines
Regards,
MaximeQuoted 12 lines
Regards,
XuanQuoted 7 lines
Quoted 4 lines
Thanks,
ChenboThanks,
Maxime
Hi,
Quoted 72 lines
-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Friday, July 8, 2022 4:09 PM
To: Maxime Coquelin <[email protected]>; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang, Cheng1 <[email protected]>
Subject: RE: [PATCH] vhost: fix unnecessary dirty page loggingQuoted 11 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: 2022年7月8日 15:58
To: Ding, Xuan <[email protected]>; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang,
Cheng1 <[email protected]>
Subject: Re: [PATCH] vhost: fix unnecessary dirty page loggingQuoted 26 lines
Hi,
Quoted 23 lines · Xuan
Hi,
Quoted 21 lines
-----Original Message-----
From: Maxime Coquelin <[email protected]>
Sent: 2022年7月7日 19:31
To: Xia, Chenbo <[email protected]>; Ding, Xuan <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneX <[email protected]>; Jiang,
Cheng1 <[email protected]>
Subject: Re: [PATCH] vhost: fix unnecessary dirty page loggingQuoted 7 lines · Chenbo
Quoted 7 lines
-----Original Message-----
From: Ding, Xuan <[email protected]>
Sent: Thursday, July 7, 2022 2:55 PM
To: [email protected]; Xia, Chenbo <[email protected]>
Cc: [email protected]; Hu, Jiayu <[email protected]>; He, Xingguang <[email protected]>; Yang, YvonneXQuoted 22 lines
Quoted 22 lines
Quoted 22 lines
Quoted 11 lines
Quoted 11 lines
Jiang,
Cheng1 <[email protected]>; Ding, Xuan <[email protected]>
Subject: [PATCH] vhost: fix unnecessary dirty page loggingFrom: Xuan Ding <[email protected]>
The dirty page logging is only required in vhost enqueue direction for live migration. This patch removes the unnecessary dirty page logging in vhost dequeue direction. Otherwise, it will result in a performance drop. Some if-else judgements are also optimized to improve
performance.
Quoted 10 lines
Quoted 7 lines
Fixes 6d823bb302c7 ("vhost: prepare sync for descriptor to mbufrefactoring")
Fixes b6eee3e83402 ("vhost: fix sync dequeue offload")Signed-off-by Xuan Ding <[email protected]>---
Reviewed-by Chenbo Xia <[email protected]>
Quoted 38 lines
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Although it's late in release, we can consider to merge this as I see it impacts the performance by 5%:
http://inbox.dpdk.org/dev/BYAPR11MB2711F13CDA2B0A4535A6591EFE839
@BQuoted 31 lines
Quoted 6 lines
Quoted 6 lines
YAPR
Quoted 1 line
11MB2711.namprd11.prod.outlook.com/T/#t
Yes, I raised we need it in -rc4 at today's Release status meeting. I'll review it today.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
But also, it will be good to know the performance issue is solved by sharing the test results.
Yes, Intel performance results would be appreciated.
This fix patch is for the issue reported at 22.07-rc3. The refactoring patch
brings a 3%~5% perf drop in vhost sync path.
Quoted 1 line
With fix patch, the perf drop introduced by refactoring is solved.
Good.
Quoted 2 lines
However, the testing result shows there still exists ~5% packed ring perf drop
compared with 22.03.
Quoted 2 lines
We find the improving checksum offload patch series in 22.07 may contribute
to the packed ring perf drop.
Quoted 4 lines
Because we always do checksum checks in PMD.
Could you help to double check this patch series, is it as expected? Your assistance is really appreciated.
I will look again, but if your analysis is right, there's not much we can do. The series is filling gaps in the checksum offload support.
What is the result of your investigation? As dpdk-22.07 will be released soon, I'd like to know your advice about this issue. Thanks.
Quoted 4 lines
Yes, I think so.
Quoted 1 line
Quoted 8 lines
Quoted 2 lines
I will not have time to work on it for v22.07, we're too late in the cycle. What surprises me is that only packed ring is impacted.
From the testing results, the packed ring is more sensitive to the patch series, while split ring shows a much lower drop in performance.
Thanks for your support!
Regards,
Xingguang
Quoted 19 lines
Regards,
XuanQuoted 16 lines
Regards,
MaximeQuoted 12 lines
Regards,
XuanQuoted 7 lines
Quoted 4 lines
Thanks,
ChenboThanks,
Maxime
Quoted 7 lines · On 7/7/22 08:55, [email protected] wrote:
From: Xuan Ding <[email protected]>
The dirty page logging is only required in vhost enqueue direction for live migration. This patch removes the unnecessary dirty page logging in vhost dequeue direction. Otherwise, it will result in a performance drop. Some if-else judgements are also optimized to improve performance.
Quoted 8 lines
Fixes 6d823bb302c7 ("vhost: prepare sync for descriptor to mbuf refactoring")Fixes b6eee3e83402 ("vhost: fix sync dequeue offload")Signed-off-by Xuan Ding <[email protected]>--- lib/vhost/virtio_net.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-)
Thanks,
Maxime
Maxime Coquelin
AppliedQuoted 7 lines · On 7/7/22 08:55, [email protected] wrote:
From: Xuan Ding <[email protected]>
The dirty page logging is only required in vhost enqueue direction for live migration. This patch removes the unnecessary dirty page logging in vhost dequeue direction. Otherwise, it will result in a performance drop. Some if-else judgements are also optimized to improve performance.
Quoted 8 lines
Fixes 6d823bb302c7 ("vhost: prepare sync for descriptor to mbuf refactoring")Fixes b6eee3e83402 ("vhost: fix sync dequeue offload")Signed-off-by Xuan Ding <[email protected]>--- lib/vhost/virtio_net.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-)
Applied to dpdk-next-virtio/main.
Thanks,
Maxime