Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/27912/?format=api
https://patches.dpdk.org/api/patches/27912/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1503626773-184682-3-git-send-email-xiaoyun.li@intel.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": "<1503626773-184682-3-git-send-email-xiaoyun.li@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1503626773-184682-3-git-send-email-xiaoyun.li@intel.com", "date": "2017-08-25T02:06:12", "name": "[dpdk-dev,2/3] app/test: run-time dispatch over memcpy perf test", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "3cde39181b32722ed80104fadcfbc953d7fda5b7", "submitter": { "id": 798, "url": "https://patches.dpdk.org/api/people/798/?format=api", "name": "Li, Xiaoyun", "email": "xiaoyun.li@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1503626773-184682-3-git-send-email-xiaoyun.li@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/27912/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/27912/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 3541F7D57;\n\tFri, 25 Aug 2017 04:07:08 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 730457D5E\n\tfor <dev@dpdk.org>; Fri, 25 Aug 2017 04:07:06 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Aug 2017 19:07:06 -0700", "from dpdk-lixiaoyun.sh.intel.com ([10.67.111.119])\n\tby fmsmga001.fm.intel.com with ESMTP; 24 Aug 2017 19:07:04 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos; i=\"5.41,423,1498546800\"; d=\"scan'208\";\n\ta=\"1187946321\"", "From": "Xiaoyun Li <xiaoyun.li@intel.com>", "To": "bruce.richardson@intel.com", "Cc": "dev@dpdk.org, wenzhuo.lu@intel.com, zhihong.wang@intel.com,\n\tqi.z.zhang@intel.com, Xiaoyun Li <xiaoyun.li@intel.com>", "Date": "Fri, 25 Aug 2017 10:06:12 +0800", "Message-Id": "<1503626773-184682-3-git-send-email-xiaoyun.li@intel.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1503626773-184682-1-git-send-email-xiaoyun.li@intel.com>", "References": "<1503626773-184682-1-git-send-email-xiaoyun.li@intel.com>", "Subject": "[dpdk-dev] [PATCH 2/3] app/test: run-time dispatch over memcpy perf\n\ttest", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This patch modifies assignment of alignment unit from build-time\nto run-time based on CPU flags that machine supports.\n\nSigned-off-by: Xiaoyun Li <xiaoyun.li@intel.com>\n---\n test/test/test_memcpy_perf.c | 36 +++++++++++++++++++++++-------------\n 1 file changed, 23 insertions(+), 13 deletions(-)", "diff": "diff --git a/test/test/test_memcpy_perf.c b/test/test/test_memcpy_perf.c\nindex ff3aaaa..68132e6 100644\n--- a/test/test/test_memcpy_perf.c\n+++ b/test/test/test_memcpy_perf.c\n@@ -79,13 +79,7 @@ static size_t buf_sizes[TEST_VALUE_RANGE];\n #define TEST_BATCH_SIZE 100\n \n /* Data is aligned on this many bytes (power of 2) */\n-#ifdef RTE_MACHINE_CPUFLAG_AVX512F\n-#define ALIGNMENT_UNIT 64\n-#elif defined RTE_MACHINE_CPUFLAG_AVX2\n-#define ALIGNMENT_UNIT 32\n-#else /* RTE_MACHINE_CPUFLAG */\n-#define ALIGNMENT_UNIT 16\n-#endif /* RTE_MACHINE_CPUFLAG */\n+static uint8_t alignment_unit = 16;\n \n /*\n * Pointers used in performance tests. The two large buffers are for uncached\n@@ -101,19 +95,34 @@ init_buffers(void)\n {\n \tunsigned i;\n \n-\tlarge_buf_read = rte_malloc(\"memcpy\", LARGE_BUFFER_SIZE + ALIGNMENT_UNIT, ALIGNMENT_UNIT);\n+\tif (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F))\n+\t\talignment_unit = 64;\n+\telse if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2))\n+\t\talignment_unit = 32;\n+\telse\n+\t\talignment_unit = 16;\n+\n+\tlarge_buf_read = rte_malloc(\"memcpy\",\n+\t\t\t\t LARGE_BUFFER_SIZE + alignment_unit,\n+\t\t\t\t alignment_unit);\n \tif (large_buf_read == NULL)\n \t\tgoto error_large_buf_read;\n \n-\tlarge_buf_write = rte_malloc(\"memcpy\", LARGE_BUFFER_SIZE + ALIGNMENT_UNIT, ALIGNMENT_UNIT);\n+\tlarge_buf_write = rte_malloc(\"memcpy\",\n+\t\t\t\t LARGE_BUFFER_SIZE + alignment_unit,\n+\t\t\t\t alignment_unit);\n \tif (large_buf_write == NULL)\n \t\tgoto error_large_buf_write;\n \n-\tsmall_buf_read = rte_malloc(\"memcpy\", SMALL_BUFFER_SIZE + ALIGNMENT_UNIT, ALIGNMENT_UNIT);\n+\tsmall_buf_read = rte_malloc(\"memcpy\",\n+\t\t\t\t SMALL_BUFFER_SIZE + alignment_unit,\n+\t\t\t\t alignment_unit);\n \tif (small_buf_read == NULL)\n \t\tgoto error_small_buf_read;\n \n-\tsmall_buf_write = rte_malloc(\"memcpy\", SMALL_BUFFER_SIZE + ALIGNMENT_UNIT, ALIGNMENT_UNIT);\n+\tsmall_buf_write = rte_malloc(\"memcpy\",\n+\t\t\t\t SMALL_BUFFER_SIZE + alignment_unit,\n+\t\t\t\t alignment_unit);\n \tif (small_buf_write == NULL)\n \t\tgoto error_small_buf_write;\n \n@@ -153,7 +162,7 @@ static inline size_t\n get_rand_offset(size_t uoffset)\n {\n \treturn ((rte_rand() % (LARGE_BUFFER_SIZE - SMALL_BUFFER_SIZE)) &\n-\t\t\t~(ALIGNMENT_UNIT - 1)) + uoffset;\n+\t\t\t~(alignment_unit - 1)) + uoffset;\n }\n \n /* Fill in source and destination addresses. */\n@@ -321,7 +330,8 @@ perf_test(void)\n \t\t \"(bytes) (ticks) (ticks) (ticks) (ticks)\\n\"\n \t\t \"------- -------------- -------------- -------------- --------------\");\n \n-\tprintf(\"\\n========================== %2dB aligned ============================\", ALIGNMENT_UNIT);\n+\tprintf(\"\\n========================= %2dB aligned ============================\",\n+\t\talignment_unit);\n \t/* Do aligned tests where size is a variable */\n \tperf_test_variable_aligned();\n \tprintf(\"\\n------- -------------- -------------- -------------- --------------\");\n", "prefixes": [ "dpdk-dev", "2/3" ] }{ "id": 27912, "url": "