Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/49112/?format=api
https://patches.dpdk.org/api/patches/49112/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20181219092952.25728-1-maxime.coquelin@redhat.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20181219092952.25728-1-maxime.coquelin@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20181219092952.25728-1-maxime.coquelin@redhat.com", "date": "2018-12-19T09:29:52", "name": "[v2] vhost: batch used descs chains write-back with packed ring", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "fedb0f94e197abfaf014f31c26445be9ad41c77a", "submitter": { "id": 512, "url": "https://patches.dpdk.org/api/people/512/?format=api", "name": "Maxime Coquelin", "email": "maxime.coquelin@redhat.com" }, "delegate": { "id": 2642, "url": "https://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20181219092952.25728-1-maxime.coquelin@redhat.com/mbox/", "series": [ { "id": 2864, "url": "https://patches.dpdk.org/api/series/2864/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=2864", "date": "2018-12-19T09:29:52", "name": "[v2] vhost: batch used descs chains write-back with packed ring", "version": 2, "mbox": "https://patches.dpdk.org/series/2864/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/49112/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/49112/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 771BB1B618;\n\tWed, 19 Dec 2018 10:30:04 +0100 (CET)", "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id CA8EB1B5C2\n\tfor <dev@dpdk.org>; Wed, 19 Dec 2018 10:30:03 +0100 (CET)", "from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 0C7DA80E7B;\n\tWed, 19 Dec 2018 09:30:03 +0000 (UTC)", "from localhost.localdomain (ovpn-112-26.ams2.redhat.com\n\t[10.36.112.26])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 1EA6A17CDA;\n\tWed, 19 Dec 2018 09:29:55 +0000 (UTC)" ], "From": "Maxime Coquelin <maxime.coquelin@redhat.com>", "To": "dev@dpdk.org, i.maximets@samsung.com, tiwei.bie@intel.com,\n\tzhihong.wang@intel.com, jfreiman@redhat.com, mst@redhat.com", "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>", "Date": "Wed, 19 Dec 2018 10:29:52 +0100", "Message-Id": "<20181219092952.25728-1-maxime.coquelin@redhat.com>", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.14", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]); Wed, 19 Dec 2018 09:30:03 +0000 (UTC)", "Subject": "[dpdk-dev] [PATCH v2] vhost: batch used descs chains write-back\n\twith packed ring", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Instead of writing back descriptors chains in order, let's\nwrite the first chain flags last in order to improve batching.\n\nWith Kernel's pktgen benchmark, ~3% performance gain is measured.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n\nV2:\nRevert back to initial implementation to have a write\nbarrier before every descs flags store, but still\nstore first desc flags last. (Missing barrier reported\nby Ilya)\n\n\n lib/librte_vhost/virtio_net.c | 19 ++++++++++++++++---\n 1 file changed, 16 insertions(+), 3 deletions(-)", "diff": "diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex 8c657a101..de436af79 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -97,6 +97,8 @@ flush_shadow_used_ring_packed(struct virtio_net *dev,\n {\n \tint i;\n \tuint16_t used_idx = vq->last_used_idx;\n+\tuint16_t head_idx = vq->last_used_idx;\n+\tuint16_t head_flags = 0;\n \n \t/* Split loop in two to save memory barriers */\n \tfor (i = 0; i < vq->shadow_used_idx; i++) {\n@@ -126,12 +128,17 @@ flush_shadow_used_ring_packed(struct virtio_net *dev,\n \t\t\tflags &= ~VRING_DESC_F_AVAIL;\n \t\t}\n \n-\t\tvq->desc_packed[vq->last_used_idx].flags = flags;\n+\t\tif (i > 0) {\n+\t\t\tvq->desc_packed[vq->last_used_idx].flags = flags;\n \n-\t\tvhost_log_cache_used_vring(dev, vq,\n+\t\t\tvhost_log_cache_used_vring(dev, vq,\n \t\t\t\t\tvq->last_used_idx *\n \t\t\t\t\tsizeof(struct vring_packed_desc),\n \t\t\t\t\tsizeof(struct vring_packed_desc));\n+\t\t} else {\n+\t\t\thead_idx = vq->last_used_idx;\n+\t\t\thead_flags = flags;\n+\t\t}\n \n \t\tvq->last_used_idx += vq->shadow_used_packed[i].count;\n \t\tif (vq->last_used_idx >= vq->size) {\n@@ -140,7 +147,13 @@ flush_shadow_used_ring_packed(struct virtio_net *dev,\n \t\t}\n \t}\n \n-\trte_smp_wmb();\n+\tvq->desc_packed[head_idx].flags = head_flags;\n+\n+\tvhost_log_cache_used_vring(dev, vq,\n+\t\t\t\tvq->last_used_idx *\n+\t\t\t\tsizeof(struct vring_packed_desc),\n+\t\t\t\tsizeof(struct vring_packed_desc));\n+\n \tvq->shadow_used_idx = 0;\n \tvhost_log_cache_sync(dev, vq);\n }\n", "prefixes": [ "v2" ] }{ "id": 49112, "url": "