Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/52140/?format=api
http://patches.dpdk.org/api/patches/52140/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1554274796-23258-3-git-send-email-phil.yang@arm.com/", "project": { "id": 1, "url": "http://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": "<1554274796-23258-3-git-send-email-phil.yang@arm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1554274796-23258-3-git-send-email-phil.yang@arm.com", "date": "2019-04-03T06:59:55", "name": "[v3,2/3] test/distributor: replace sync builtins with atomic builtins", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "8744bed80919ebb94b27b1aa73af84ee1fdb6263", "submitter": { "id": 833, "url": "http://patches.dpdk.org/api/people/833/?format=api", "name": "Phil Yang", "email": "phil.yang@arm.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1554274796-23258-3-git-send-email-phil.yang@arm.com/mbox/", "series": [ { "id": 4074, "url": "http://patches.dpdk.org/api/series/4074/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4074", "date": "2019-04-03T06:59:53", "name": "example and test cases optimizations", "version": 3, "mbox": "http://patches.dpdk.org/series/4074/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/52140/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/52140/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 1737A6CD8;\n\tWed, 3 Apr 2019 09:02:55 +0200 (CEST)", "from foss.arm.com (foss.arm.com [217.140.101.70])\n\tby dpdk.org (Postfix) with ESMTP id 075B45F36\n\tfor <dev@dpdk.org>; Wed, 3 Apr 2019 09:02:50 +0200 (CEST)", "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 77E0D80D;\n\tWed, 3 Apr 2019 00:02:49 -0700 (PDT)", "from phil-VirtualBox.shanghai.arm.com (unknown [10.169.109.179])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id\n\t0BB603F68F; Wed, 3 Apr 2019 00:02:47 -0700 (PDT)" ], "From": "Phil Yang <phil.yang@arm.com>", "To": "dev@dpdk.org,\n\tthomas@monjalon.net", "Cc": "david.hunt@intel.com, reshma.pattan@intel.com, gavin.hu@arm.com,\n\thonnappa.nagarahalli@arm.com, phil.yang@arm.com, nd@arm.com", "Date": "Wed, 3 Apr 2019 14:59:55 +0800", "Message-Id": "<1554274796-23258-3-git-send-email-phil.yang@arm.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1554274796-23258-1-git-send-email-phil.yang@arm.com>", "References": "<1546508946-12552-1-git-send-email-phil.yang@arm.com>\n\t<1554274796-23258-1-git-send-email-phil.yang@arm.com>", "Subject": "[dpdk-dev] [PATCH v3 2/3] test/distributor: replace sync builtins\n\twith atomic builtins", "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": "'__sync' built-in functions are deprecated, should use the '__atomic'\nbuilt-in instead. the sync built-in functions are full barriers, while\natomic built-in functions offer less restrictive one-way barriers,\nwhich help performance.\n\nHere is the example test result on TX2:\nsudo ./arm64-armv8a-linuxapp-gcc/app/test -l 112-139 \\\n-n 4 --socket-mem=1024,1024 -- -i\nRTE>>distributor_perf_autotest\n\n*** distributor_perf_autotest without this patch ***", "diff": "==== Cache line switch test ===\nTime for 33554432 iterations = 1519202730 ticks\nTicks per iteration = 45\n\n*** distributor_perf_autotest with this patch ***\n==== Cache line switch test ===\nTime for 33554432 iterations = 1251715496 ticks\nTicks per iteration = 37\n\nLess ticks needed for the cache line switch test. It got 17% of\nperformance improvement.\n\nSigned-off-by: Phil Yang <phil.yang@arm.com>\nReviewed-by: Gavin Hu <gavin.hu@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\nReviewed-by: Joyce Kong <joyce.kong@arm.com>\nReviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>\n---\n app/test/test_distributor.c | 7 ++++---\n app/test/test_distributor_perf.c | 2 +-\n 2 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/app/test/test_distributor.c b/app/test/test_distributor.c\nindex 98919ec..0364637 100644\n--- a/app/test/test_distributor.c\n+++ b/app/test/test_distributor.c\n@@ -62,7 +62,7 @@ handle_work(void *arg)\n \tstruct worker_params *wp = arg;\n \tstruct rte_distributor *db = wp->dist;\n \tunsigned int count = 0, num = 0;\n-\tunsigned int id = __sync_fetch_and_add(&worker_idx, 1);\n+\tunsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED);\n \tint i;\n \n \tfor (i = 0; i < 8; i++)\n@@ -270,7 +270,7 @@ handle_work_with_free_mbufs(void *arg)\n \tunsigned int count = 0;\n \tunsigned int i;\n \tunsigned int num = 0;\n-\tunsigned int id = __sync_fetch_and_add(&worker_idx, 1);\n+\tunsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED);\n \n \tfor (i = 0; i < 8; i++)\n \t\tbuf[i] = NULL;\n@@ -343,7 +343,8 @@ handle_work_for_shutdown_test(void *arg)\n \tunsigned int total = 0;\n \tunsigned int i;\n \tunsigned int returned = 0;\n-\tconst unsigned int id = __sync_fetch_and_add(&worker_idx, 1);\n+\tconst unsigned int id = __atomic_fetch_add(&worker_idx, 1,\n+\t\t\t__ATOMIC_RELAXED);\n \n \tnum = rte_distributor_get_pkt(d, id, buf, buf, num);\n \ndiff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c\nindex edf1998..89b28f0 100644\n--- a/app/test/test_distributor_perf.c\n+++ b/app/test/test_distributor_perf.c\n@@ -111,7 +111,7 @@ handle_work(void *arg)\n \tunsigned int count = 0;\n \tunsigned int num = 0;\n \tint i;\n-\tunsigned int id = __sync_fetch_and_add(&worker_idx, 1);\n+\tunsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED);\n \tstruct rte_mbuf *buf[8] __rte_cache_aligned;\n \n \tfor (i = 0; i < 8; i++)\n", "prefixes": [ "v3", "2/3" ] }{ "id": 52140, "url": "