Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/119362/?format=api
https://patches.dpdk.org/api/patches/119362/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20221031112634.18329-1-mb@smartsharesystems.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": "<20221031112634.18329-1-mb@smartsharesystems.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20221031112634.18329-1-mb@smartsharesystems.com", "date": "2022-10-31T11:26:32", "name": "[v2,1/3] mempool: split statistics from debug", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "321c217a0adfd98d0394ee1b5b1a0fcff197fe80", "submitter": { "id": 591, "url": "https://patches.dpdk.org/api/people/591/?format=api", "name": "Morten Brørup", "email": "mb@smartsharesystems.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20221031112634.18329-1-mb@smartsharesystems.com/mbox/", "series": [ { "id": 25495, "url": "https://patches.dpdk.org/api/series/25495/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=25495", "date": "2022-10-31T11:26:32", "name": "[v2,1/3] mempool: split statistics from debug", "version": 2, "mbox": "https://patches.dpdk.org/series/25495/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/119362/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/119362/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 A655AA00C5;\n\tMon, 31 Oct 2022 12:26:44 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4000440A79;\n\tMon, 31 Oct 2022 12:26:41 +0100 (CET)", "from smartserver.smartsharesystems.com\n (smartserver.smartsharesystems.com [77.243.40.215])\n by mails.dpdk.org (Postfix) with ESMTP id 749A840223\n for <dev@dpdk.org>; Mon, 31 Oct 2022 12:26:38 +0100 (CET)", "from dkrd2.smartsharesys.local ([192.168.4.12]) by\n smartserver.smartsharesystems.com with Microsoft SMTPSVC(6.0.3790.4675);\n Mon, 31 Oct 2022 12:26:35 +0100" ], "From": "=?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>", "To": "olivier.matz@6wind.com, andrew.rybchenko@oktetlabs.ru,\n stephen@networkplumber.org, jerinj@marvell.com, bruce.richardson@intel.com", "Cc": "thomas@monjalon.net, dev@dpdk.org,\n =?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>", "Subject": "[PATCH v2 1/3] mempool: split statistics from debug", "Date": "Mon, 31 Oct 2022 12:26:32 +0100", "Message-Id": "<20221031112634.18329-1-mb@smartsharesystems.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20221030115445.2115-1-mb@smartsharesystems.com>", "References": "<20221030115445.2115-1-mb@smartsharesystems.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-OriginalArrivalTime": "31 Oct 2022 11:26:35.0951 (UTC)\n FILETIME=[A2D9C3F0:01D8ED1B]", "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": "Split statistics from debug, to make mempool statistics available without\nthe performance cost of continuously validating the cookies in the mempool\nelements.\n\nmempool_perf_autotest shows the follwing change in rate_persec.\n\nWhen enabling mempool debug without this patch:\n-28.1 % and -74.0 %, respectively without and with cache.\n\nWhen enabling mempool stats (but not debug) with this patch:\n-5.8 % and -21.2 %, respectively without and with cache.\n\nv2:\n* Fix checkpatch warning:\n Use C style comments in rte_include.h, not C++ style.\n* Do not rename the rte_mempool_debug_stats structure.\n\nSigned-off-by: Morten Brørup <mb@smartsharesystems.com>\n---\n config/rte_config.h | 2 ++\n lib/mempool/rte_mempool.c | 6 +++---\n lib/mempool/rte_mempool.h | 6 +++---\n 3 files changed, 8 insertions(+), 6 deletions(-)", "diff": "diff --git a/config/rte_config.h b/config/rte_config.h\nindex ae56a86394..3c4876d434 100644\n--- a/config/rte_config.h\n+++ b/config/rte_config.h\n@@ -47,6 +47,8 @@\n \n /* mempool defines */\n #define RTE_MEMPOOL_CACHE_MAX_SIZE 512\n+/* RTE_LIBRTE_MEMPOOL_STATS is not set */\n+/* RTE_LIBRTE_MEMPOOL_DEBUG is not set */\n \n /* mbuf defines */\n #define RTE_MBUF_DEFAULT_MEMPOOL_OPS \"ring_mp_mc\"\ndiff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c\nindex 21c94a2b9f..62d1ce764e 100644\n--- a/lib/mempool/rte_mempool.c\n+++ b/lib/mempool/rte_mempool.c\n@@ -818,7 +818,7 @@ rte_mempool_create_empty(const char *name, unsigned n, unsigned elt_size,\n \t\t\t RTE_CACHE_LINE_MASK) != 0);\n \tRTE_BUILD_BUG_ON((sizeof(struct rte_mempool_cache) &\n \t\t\t RTE_CACHE_LINE_MASK) != 0);\n-#ifdef RTE_LIBRTE_MEMPOOL_DEBUG\n+#ifdef RTE_LIBRTE_MEMPOOL_STATS\n \tRTE_BUILD_BUG_ON((sizeof(struct rte_mempool_debug_stats) &\n \t\t\t RTE_CACHE_LINE_MASK) != 0);\n \tRTE_BUILD_BUG_ON((offsetof(struct rte_mempool, stats) &\n@@ -1221,7 +1221,7 @@ rte_mempool_audit(struct rte_mempool *mp)\n void\n rte_mempool_dump(FILE *f, struct rte_mempool *mp)\n {\n-#ifdef RTE_LIBRTE_MEMPOOL_DEBUG\n+#ifdef RTE_LIBRTE_MEMPOOL_STATS\n \tstruct rte_mempool_info info;\n \tstruct rte_mempool_debug_stats sum;\n \tunsigned lcore_id;\n@@ -1269,7 +1269,7 @@ rte_mempool_dump(FILE *f, struct rte_mempool *mp)\n \tfprintf(f, \" common_pool_count=%u\\n\", common_count);\n \n \t/* sum and dump statistics */\n-#ifdef RTE_LIBRTE_MEMPOOL_DEBUG\n+#ifdef RTE_LIBRTE_MEMPOOL_STATS\n \trte_mempool_ops_get_info(mp, &info);\n \tmemset(&sum, 0, sizeof(sum));\n \tfor (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {\ndiff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h\nindex 3725a72951..9c4bf5549f 100644\n--- a/lib/mempool/rte_mempool.h\n+++ b/lib/mempool/rte_mempool.h\n@@ -56,7 +56,7 @@ extern \"C\" {\n #define RTE_MEMPOOL_HEADER_COOKIE2 0xf2eef2eedadd2e55ULL /**< Header cookie. */\n #define RTE_MEMPOOL_TRAILER_COOKIE 0xadd2e55badbadbadULL /**< Trailer cookie.*/\n \n-#ifdef RTE_LIBRTE_MEMPOOL_DEBUG\n+#ifdef RTE_LIBRTE_MEMPOOL_STATS\n /**\n * A structure that stores the mempool statistics (per-lcore).\n * Note: Cache stats (put_cache_bulk/objs, get_cache_bulk/objs) are not\n@@ -237,7 +237,7 @@ struct rte_mempool {\n \tuint32_t nb_mem_chunks; /**< Number of memory chunks */\n \tstruct rte_mempool_memhdr_list mem_list; /**< List of memory chunks */\n \n-#ifdef RTE_LIBRTE_MEMPOOL_DEBUG\n+#ifdef RTE_LIBRTE_MEMPOOL_STATS\n \t/** Per-lcore statistics. */\n \tstruct rte_mempool_debug_stats stats[RTE_MAX_LCORE];\n #endif\n@@ -302,7 +302,7 @@ struct rte_mempool {\n * @param n\n * Number to add to the object-oriented statistics.\n */\n-#ifdef RTE_LIBRTE_MEMPOOL_DEBUG\n+#ifdef RTE_LIBRTE_MEMPOOL_STATS\n #define RTE_MEMPOOL_STAT_ADD(mp, name, n) do { \\\n \t\tunsigned __lcore_id = rte_lcore_id(); \\\n \t\tif (__lcore_id < RTE_MAX_LCORE) { \\\n", "prefixes": [ "v2", "1/3" ] }{ "id": 119362, "url": "