get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/105906/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 105906,
    "url": "http://patchwork.dpdk.org/api/patches/105906/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20220117080801.481568-3-dkozlyuk@nvidia.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20220117080801.481568-3-dkozlyuk@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220117080801.481568-3-dkozlyuk@nvidia.com",
    "date": "2022-01-17T08:07:57",
    "name": "[v1,2/6] app/test: add allocator performance benchmark",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0b4c553901676869406ef04bed1c8c21d6e566cf",
    "submitter": {
        "id": 2248,
        "url": "http://patchwork.dpdk.org/api/people/2248/?format=api",
        "name": "Dmitry Kozlyuk",
        "email": "dkozlyuk@nvidia.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patchwork.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20220117080801.481568-3-dkozlyuk@nvidia.com/mbox/",
    "series": [
        {
            "id": 21199,
            "url": "http://patchwork.dpdk.org/api/series/21199/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=21199",
            "date": "2022-01-17T08:07:55",
            "name": "Fast restart with many hugepages",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/21199/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/105906/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/105906/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 5F38AA034F;\n\tMon, 17 Jan 2022 09:08:38 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 80510411EB;\n\tMon, 17 Jan 2022 09:08:26 +0100 (CET)",
            "from NAM11-CO1-obe.outbound.protection.outlook.com\n (mail-co1nam11on2042.outbound.protection.outlook.com [40.107.220.42])\n by mails.dpdk.org (Postfix) with ESMTP id 337374118A\n for <dev@dpdk.org>; Mon, 17 Jan 2022 09:08:25 +0100 (CET)",
            "from DM5PR08CA0042.namprd08.prod.outlook.com (2603:10b6:4:60::31) by\n CY4PR1201MB2519.namprd12.prod.outlook.com (2603:10b6:903:d7::23) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.12; Mon, 17 Jan\n 2022 08:08:23 +0000",
            "from DM6NAM11FT011.eop-nam11.prod.protection.outlook.com\n (2603:10b6:4:60:cafe::d5) by DM5PR08CA0042.outlook.office365.com\n (2603:10b6:4:60::31) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.9 via Frontend\n Transport; Mon, 17 Jan 2022 08:08:23 +0000",
            "from mail.nvidia.com (12.22.5.234) by\n DM6NAM11FT011.mail.protection.outlook.com (10.13.172.108) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.4888.9 via Frontend Transport; Mon, 17 Jan 2022 08:08:23 +0000",
            "from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com\n (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Mon, 17 Jan 2022 08:08:22 +0000",
            "from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com\n (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.9; Mon, 17 Jan 2022\n 00:08:20 -0800"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=AbMAO7FZkcewrY0mQK1XddkNieK5dchfvIXleVM37cxNW0JkLbv9WqqkPAipsH8d4ZuXdjVsizHgBO/CsUZypUAZSZQh9cO7r/hTXEBor/rNiLAmK4QaAqj5E9eG4vOr/Lploh34Dag/cWgkLgxAg+iRpJD2y/ULGK5sFAL+byHeGPNHdaIH9bxAJpa6PLyA1rPX3pvCPbjssLon0M9VAQjW2yM5RqfjA/UG7nCEMQjENejgeErFdWjrGdF2U8CNbhy1XD5wLYkt/lP56rYgcldi6A+q+XcoEZw9jSTH9m7byC9gPxq1WycGLAlQTISj1wnBoOIJygeUhUopxLq09g==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=hO8zT3agI3rmYUtan1v5CRJcRVgwe8JzJ8W7aLYxGJM=;\n b=Y0j9IlqgB0v3N+KSVHzOGd3XkF8/VBm8MrRPdL3b5XxBowdccf4QOn1gG5gs3cRJhzVH6REvHnwdvCq0g+v5CKIZa71T2S6ZX93bd0TwxK97Rq+QxoTDjZDzcQln6VG6+2C/znptIDtt6HxQGbahOIWI3WsGAOeGsZZWgHfdlEUsPr07Qhh6SB7EZfKgcOaRLlj3ETzZzV5xsFV82sGvH+z4EBAEgbjF735ZjUas4kAEQK3EOiNTYHMErZ48UUsp2f9p9HXVoGGi6g6yt0Rqj6byyJ9Y7vj5zM0MDmSRJPYY5X5LrpOR6+Qqf3u8abV1gxUW1C1rR/O9Vh4Pmy74+g==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 12.22.5.234) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=hO8zT3agI3rmYUtan1v5CRJcRVgwe8JzJ8W7aLYxGJM=;\n b=YYciESKYnOZKyr2RmJhHHJsq0BOjVULKA98G1tG9OW9XMF6C3XXx/FQON5AFahev0iaksGoBLb3tuE6I2oew2Xq+yjM3K6WHInvNM8D70tSQzuViRzzJsDZjbz5zpczp+BAhuByIgdfibmicI3c9ehAuSmRY8b299LOKXcLGZPoolo8/M26LtjBM/2LevW2kh3KOm1ordqGjNEHnj5disl7hovHe+KdCNkbFRW9hUuvxyC3WvrquKo75jPX29L7LaqT0t8311jT2WtOgxiv4XDYXhoB/JZi5ZiYlXKNqQeCHuYsXhaZFLD/53U+ohga4EwDr5nawTFk+UIK73hOMyg==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 12.22.5.234)\n smtp.mailfrom=nvidia.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 12.22.5.234 as permitted sender) receiver=protection.outlook.com;\n client-ip=12.22.5.234; helo=mail.nvidia.com;",
        "From": "Dmitry Kozlyuk <dkozlyuk@nvidia.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Aaron Conole <aconole@redhat.com>, Viacheslav Ovsiienko\n <viacheslavo@nvidia.com>",
        "Subject": "[PATCH v1 2/6] app/test: add allocator performance benchmark",
        "Date": "Mon, 17 Jan 2022 10:07:57 +0200",
        "Message-ID": "<20220117080801.481568-3-dkozlyuk@nvidia.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220117080801.481568-1-dkozlyuk@nvidia.com>",
        "References": "<20211230143744.3550098-1-dkozlyuk@nvidia.com>\n <20220117080801.481568-1-dkozlyuk@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.126.231.35]",
        "X-ClientProxiedBy": "HQMAIL105.nvidia.com (172.20.187.12) To\n rnnvmail201.nvidia.com (10.129.68.8)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "4c641412-d4be-4084-89d4-08d9d990882a",
        "X-MS-TrafficTypeDiagnostic": "CY4PR1201MB2519:EE_",
        "X-Microsoft-Antispam-PRVS": "\n <CY4PR1201MB2519E9BA8F605FC8727339AFB9579@CY4PR1201MB2519.namprd12.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:3968;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n CCB0J8sOws7QY6ORvJi1Xk0sDLTNxvOJCCQyhYMBZrVHrJea4kT7vBAVK8p+ogByVXhAGJ01/1vjy7hvIiFCRyhLBtxCPR+n5yc0ys0WYKADbPJDFqQTI+sAxyY90dgLiRCNtp0Uk1dh0i7Uz5I4WNN4ivegSQy3j+jXBVgFzqvw1SRjIqHkkT6UrPkd5tI3Xu5EYLhxyHlYj5I8RqxJwohLQ2ETjaxnqsj/j23ohtyomSsqYhBNahYsVpe+7FoaB67sN6wUHaJKyXdjOBYV36hGOuBvdaCaMMU/+flZqfaSWdJF75s/IdF9QMZbDDrJcpzfuEo+TxOqIt+d87xdj2NsRmKHqbwOrrc9bjd4XBE8Em0UGU3c6Jwl6QRKmr8sVxsojymDGZbqPwIMLk9VYfCTrMOpdP5SMcf758G4iogv803rEL/NdAyKrVkMGuNSdz2NeKtP6gXbbbXbOKBqHFN9Jp0ejB2NtqL4N3HtABEAyaiBuWqh2jZ8WMgRs8H8CxPxyZUcmR3wsusHvsRP3gLUQXqW+HMM89u/cZczfPSGovaCAFRVfT2kAkkYoWMppA5kPVeRAMrJhltpD7l/YrPkfU9ieptSORLYaRBjZpDA6aBxUJTwtMyqSueNQ8tRET303Y7i/R8NL6LCrMZmb12/hgrq6EbwwWV99GgHGpYKcijDnML8DB/NjqpUf/E1PNbRS23kXrVzYz+mx8Au6IbiSpsp619Tl4cLbIVYTQ0V0+rkZUur0zDKHpFsOp37B+SIpA76J8tqGA4wsLNRr3qh8fS31EHdWlLdl20Xx0w=",
        "X-Forefront-Antispam-Report": "CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:;\n IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE;\n SFS:(4636009)(46966006)(36840700001)(40470700002)(7696005)(6286002)(8676002)(16526019)(6666004)(508600001)(107886003)(26005)(186003)(1076003)(8936002)(54906003)(70586007)(36756003)(5660300002)(70206006)(426003)(81166007)(336012)(2906002)(6916009)(36860700001)(4326008)(356005)(86362001)(47076005)(2616005)(316002)(40460700001)(55016003)(82310400004)(36900700001);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "17 Jan 2022 08:08:23.1549 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 4c641412-d4be-4084-89d4-08d9d990882a",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n DM6NAM11FT011.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "CY4PR1201MB2519",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Memory allocator performance is crucial to applications that deal\nwith large amount of memory or allocate frequently. DPDK allocator\nperformance is affected by EAL options, API used and, at least,\nallocation size. New autotest is intended to be run with different\nEAL options. It measures performance with a range of sizes\nfor dirrerent APIs: rte_malloc, rte_zmalloc, and rte_memzone_reserve.\n\nWork distribution between allocation and deallocation depends on EAL\noptions. The test prints both times and total time to ease comparison.\n\nMemory can be filled with zeroes at different points of allocation path,\nbut it always takes considerable fraction of overall timing. This is why\nthe test measures filling speed and prints how long clearing takes\nfor each size as a reference (for rte_memzone_reserve estimations\nare printed).\n\nSigned-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>\nReviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>\n---\n app/test/meson.build        |   2 +\n app/test/test_malloc_perf.c | 174 ++++++++++++++++++++++++++++++++++++\n 2 files changed, 176 insertions(+)\n create mode 100644 app/test/test_malloc_perf.c",
    "diff": "diff --git a/app/test/meson.build b/app/test/meson.build\nindex 344a609a4d..50cf2602a9 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -88,6 +88,7 @@ test_sources = files(\n         'test_lpm6_perf.c',\n         'test_lpm_perf.c',\n         'test_malloc.c',\n+        'test_malloc_perf.c',\n         'test_mbuf.c',\n         'test_member.c',\n         'test_member_perf.c',\n@@ -295,6 +296,7 @@ extra_test_names = [\n \n perf_test_names = [\n         'ring_perf_autotest',\n+        'malloc_perf_autotest',\n         'mempool_perf_autotest',\n         'memcpy_perf_autotest',\n         'hash_perf_autotest',\ndiff --git a/app/test/test_malloc_perf.c b/app/test/test_malloc_perf.c\nnew file mode 100644\nindex 0000000000..9686fc8af5\n--- /dev/null\n+++ b/app/test/test_malloc_perf.c\n@@ -0,0 +1,174 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2021 NVIDIA Corporation & Affiliates\n+ */\n+\n+#include <inttypes.h>\n+#include <string.h>\n+#include <rte_cycles.h>\n+#include <rte_errno.h>\n+#include <rte_malloc.h>\n+#include <rte_memzone.h>\n+\n+#include \"test.h\"\n+\n+#define TEST_LOG(level, ...) RTE_LOG(level, USER1, __VA_ARGS__)\n+\n+typedef void * (alloc_t)(const char *name, size_t size, unsigned int align);\n+typedef void (free_t)(void *addr);\n+typedef void * (memset_t)(void *addr, int value, size_t size);\n+\n+static const uint64_t KB = 1 << 10;\n+static const uint64_t GB = 1 << 30;\n+\n+static double\n+tsc_to_us(uint64_t tsc, size_t runs)\n+{\n+\treturn (double)tsc / rte_get_tsc_hz() * US_PER_S / runs;\n+}\n+\n+static int\n+test_memset_perf(double *us_per_gb)\n+{\n+\tstatic const size_t RUNS = 20;\n+\n+\tvoid *ptr;\n+\tsize_t i;\n+\tuint64_t tsc;\n+\n+\tTEST_LOG(INFO, \"Reference: memset\\n\");\n+\n+\tptr = rte_malloc(NULL, GB, 0);\n+\tif (ptr == NULL) {\n+\t\tTEST_LOG(ERR, \"rte_malloc(size=%\"PRIx64\") failed\\n\", GB);\n+\t\treturn -1;\n+\t}\n+\n+\ttsc = rte_rdtsc_precise();\n+\tfor (i = 0; i < RUNS; i++)\n+\t\tmemset(ptr, 0, GB);\n+\ttsc = rte_rdtsc_precise() - tsc;\n+\n+\t*us_per_gb = tsc_to_us(tsc, RUNS);\n+\tTEST_LOG(INFO, \"Result: %f.3 GiB/s <=> %.2f us/MiB\\n\",\n+\t\t\tUS_PER_S / *us_per_gb, *us_per_gb / KB);\n+\n+\trte_free(ptr);\n+\tTEST_LOG(INFO, \"\\n\");\n+\treturn 0;\n+}\n+\n+static int\n+test_alloc_perf(const char *name, alloc_t *alloc_fn, free_t *free_fn,\n+\t\tmemset_t *memset_fn, double memset_gb_us, size_t max_runs)\n+{\n+\tstatic const size_t SIZES[] = {\n+\t\t\t1 << 6, 1 << 7, 1 << 10, 1 << 12, 1 << 16, 1 << 20,\n+\t\t\t1 << 21, 1 << 22, 1 << 24, 1 << 30 };\n+\n+\tsize_t i, j;\n+\tvoid **ptrs;\n+\n+\tTEST_LOG(INFO, \"Performance: %s\\n\", name);\n+\n+\tptrs = calloc(max_runs, sizeof(ptrs[0]));\n+\tif (ptrs == NULL) {\n+\t\tTEST_LOG(ERR, \"Cannot allocate memory for pointers\");\n+\t\treturn -1;\n+\t}\n+\n+\tTEST_LOG(INFO, \"%12s%8s%12s%12s%12s%17s\\n\", \"Size (B)\", \"Runs\",\n+\t\t\t\"Alloc (us)\", \"Free (us)\", \"Total (us)\",\n+\t\t\tmemset_fn != NULL ? \"memset (us)\" : \"est.memset (us)\");\n+\tfor (i = 0; i < RTE_DIM(SIZES); i++) {\n+\t\tsize_t size = SIZES[i];\n+\t\tsize_t runs_done;\n+\t\tuint64_t tsc_start, tsc_alloc, tsc_memset = 0, tsc_free;\n+\t\tdouble alloc_time, free_time, memset_time;\n+\n+\t\ttsc_start = rte_rdtsc_precise();\n+\t\tfor (j = 0; j < max_runs; j++) {\n+\t\t\tptrs[j] = alloc_fn(NULL, size, 0);\n+\t\t\tif (ptrs[j] == NULL)\n+\t\t\t\tbreak;\n+\t\t}\n+\t\ttsc_alloc = rte_rdtsc_precise() - tsc_start;\n+\n+\t\tif (j == 0) {\n+\t\t\tTEST_LOG(INFO, \"%12zu Interrupted: out of memory.\\n\",\n+\t\t\t\t\tsize);\n+\t\t\tbreak;\n+\t\t}\n+\t\truns_done = j;\n+\n+\t\tif (memset_fn != NULL) {\n+\t\t\ttsc_start = rte_rdtsc_precise();\n+\t\t\tfor (j = 0; j < runs_done && ptrs[j] != NULL; j++)\n+\t\t\t\tmemset_fn(ptrs[j], 0, size);\n+\t\t\ttsc_memset = rte_rdtsc_precise() - tsc_start;\n+\t\t}\n+\n+\t\ttsc_start = rte_rdtsc_precise();\n+\t\tfor (j = 0; j < runs_done && ptrs[j] != NULL; j++)\n+\t\t\tfree_fn(ptrs[j]);\n+\t\ttsc_free = rte_rdtsc_precise() - tsc_start;\n+\n+\t\talloc_time = tsc_to_us(tsc_alloc, runs_done);\n+\t\tfree_time = tsc_to_us(tsc_free, runs_done);\n+\t\tmemset_time = memset_fn != NULL ?\n+\t\t\t\ttsc_to_us(tsc_memset, runs_done) :\n+\t\t\t\tmemset_gb_us * size / GB;\n+\t\tTEST_LOG(INFO, \"%12zu%8zu%12.2f%12.2f%12.2f%17.2f\\n\",\n+\t\t\t\tsize, runs_done, alloc_time, free_time,\n+\t\t\t\talloc_time + free_time, memset_time);\n+\n+\t\tmemset(ptrs, 0, max_runs * sizeof(ptrs[0]));\n+\t}\n+\n+\tfree(ptrs);\n+\tTEST_LOG(INFO, \"\\n\");\n+\treturn 0;\n+}\n+\n+static void *\n+memzone_alloc(const char *name __rte_unused, size_t size, unsigned int align)\n+{\n+\tconst struct rte_memzone *mz;\n+\tchar gen_name[RTE_MEMZONE_NAMESIZE];\n+\n+\tsnprintf(gen_name, sizeof(gen_name), \"test-mz-%\"PRIx64, rte_rdtsc());\n+\tmz = rte_memzone_reserve_aligned(gen_name, size, SOCKET_ID_ANY,\n+\t\t\tRTE_MEMZONE_1GB | RTE_MEMZONE_SIZE_HINT_ONLY, align);\n+\treturn (void *)(uintptr_t)mz;\n+}\n+\n+static void\n+memzone_free(void *addr)\n+{\n+\trte_memzone_free((struct rte_memzone *)addr);\n+}\n+\n+static int\n+test_malloc_perf(void)\n+{\n+\tstatic const size_t MAX_RUNS = 10000;\n+\n+\tdouble memset_us_gb;\n+\n+\tif (test_memset_perf(&memset_us_gb) < 0)\n+\t\treturn -1;\n+\n+\tif (test_alloc_perf(\"rte_malloc\", rte_malloc, rte_free, memset,\n+\t\t\tmemset_us_gb, MAX_RUNS) < 0)\n+\t\treturn -1;\n+\tif (test_alloc_perf(\"rte_zmalloc\", rte_zmalloc, rte_free, memset,\n+\t\t\tmemset_us_gb, MAX_RUNS) < 0)\n+\t\treturn -1;\n+\n+\tif (test_alloc_perf(\"rte_memzone_reserve\", memzone_alloc, memzone_free,\n+\t\t\tNULL, memset_us_gb, RTE_MAX_MEMZONE - 1) < 0)\n+\t\treturn -1;\n+\n+\treturn 0;\n+}\n+\n+REGISTER_TEST_COMMAND(malloc_perf_autotest, test_malloc_perf);\n",
    "prefixes": [
        "v1",
        "2/6"
    ]
}