Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/128495/?format=api
http://patches.dpdk.org/api/patches/128495/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230609191245.252521-15-zhirun.yan@intel.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": "<20230609191245.252521-15-zhirun.yan@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230609191245.252521-15-zhirun.yan@intel.com", "date": "2023-06-09T19:12:43", "name": "[v12,14/16] graph: add stats for mcore dispatch model", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a9234b13d5c484796c115eb04eab298cd9f5758c", "submitter": { "id": 1154, "url": "http://patches.dpdk.org/api/people/1154/?format=api", "name": "Yan, Zhirun", "email": "zhirun.yan@intel.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/20230609191245.252521-15-zhirun.yan@intel.com/mbox/", "series": [ { "id": 28444, "url": "http://patches.dpdk.org/api/series/28444/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=28444", "date": "2023-06-09T19:12:29", "name": "graph enhancement for multi-core dispatch", "version": 12, "mbox": "http://patches.dpdk.org/series/28444/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/128495/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/128495/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 8550942C71;\n\tFri, 9 Jun 2023 21:21:38 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C912842D85;\n\tFri, 9 Jun 2023 21:20:31 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id 4B1D542D84\n for <dev@dpdk.org>; Fri, 9 Jun 2023 21:20:30 +0200 (CEST)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Jun 2023 12:20:29 -0700", "from dpdk-zhirun-lmm.sh.intel.com ([10.67.119.94])\n by fmsmga006.fm.intel.com with ESMTP; 09 Jun 2023 12:20:26 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1686338430; x=1717874430;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=XiJXJCLzB4LdGCRRPsyaGjuBSF/b+RZYXNb5XmbsccI=;\n b=LenjCTJppOgZZd1OEY0RAP0AXdRit9SA00sj0ii/D1G0VVL/RG6fBt65\n oICNK1om0P/J4rVyZLA1+A/KqI4dIU9euIiCpYRGCgBHQPVOUndS6FOnk\n YwETTtTgKiCJSKuwl7aNVrTWscOh/U6Zx3LXYL07uDW5mlVkoAb4VckKr\n LwiGwyotMWU/rpzVYV7IzoKzsc+ysEzb5dDmecKmD7yGX8oUHQjXvt9Z5\n eO5Ddan2mk2qUTqeKRHFLQY3ZInMONy4r7GX5Lpeb5Qgmx8lWTeBMsl8k\n EyB35Vevalq5bT4zjHM03TAfjBlNVvXeXbxvqpJQzJUqlmsmpRUB53vC+ g==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10736\"; a=\"360155152\"", "E=Sophos;i=\"6.00,230,1681196400\"; d=\"scan'208\";a=\"360155152\"", "E=McAfee;i=\"6600,9927,10736\"; a=\"957254701\"", "E=Sophos;i=\"6.00,230,1681196400\"; d=\"scan'208\";a=\"957254701\"" ], "X-ExtLoop1": "1", "From": "Zhirun Yan <zhirun.yan@intel.com>", "To": "dev@dpdk.org, jerinj@marvell.com, kirankumark@marvell.com,\n ndabilpuram@marvell.com, stephen@networkplumber.org,\n pbhagavatula@marvell.com, jerinjacobk@gmail.com, david.marchand@redhat.com", "Cc": "cunming.liang@intel.com, haiyue.wang@intel.com,\n mattias.ronnblom@ericsson.com, Zhirun Yan <zhirun.yan@intel.com>", "Subject": "[PATCH v12 14/16] graph: add stats for mcore dispatch model", "Date": "Sat, 10 Jun 2023 03:12:43 +0800", "Message-Id": "<20230609191245.252521-15-zhirun.yan@intel.com>", "X-Mailer": "git-send-email 2.37.2", "In-Reply-To": "<20230609191245.252521-1-zhirun.yan@intel.com>", "References": "<20230608151844.1823783-1-zhirun.yan@intel.com>\n <20230609191245.252521-1-zhirun.yan@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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": "Add stats for mcore dispatch model if stats collection is\nenabled.\n\nSigned-off-by: Haiyue Wang <haiyue.wang@intel.com>\nSigned-off-by: Cunming Liang <cunming.liang@intel.com>\nSigned-off-by: Zhirun Yan <zhirun.yan@intel.com>\nAcked-by: Jerin Jacob <jerinj@marvell.com>\nAcked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n lib/graph/graph_debug.c | 6 ++\n lib/graph/graph_stats.c | 76 +++++++++++++++++++---\n lib/graph/rte_graph.h | 10 +++\n lib/graph/rte_graph_model_mcore_dispatch.c | 3 +\n lib/graph/rte_graph_worker_common.h | 2 +\n 5 files changed, 89 insertions(+), 8 deletions(-)", "diff": "diff --git a/lib/graph/graph_debug.c b/lib/graph/graph_debug.c\nindex b84412f5dd..9def3067ec 100644\n--- a/lib/graph/graph_debug.c\n+++ b/lib/graph/graph_debug.c\n@@ -74,6 +74,12 @@ rte_graph_obj_dump(FILE *f, struct rte_graph *g, bool all)\n \t\tfprintf(f, \" size=%d\\n\", n->size);\n \t\tfprintf(f, \" idx=%d\\n\", n->idx);\n \t\tfprintf(f, \" total_objs=%\" PRId64 \"\\n\", n->total_objs);\n+\t\tif (rte_graph_worker_model_get(g) == RTE_GRAPH_MODEL_MCORE_DISPATCH) {\n+\t\t\tfprintf(f, \" total_sched_objs=%\" PRId64 \"\\n\",\n+\t\t\t\tn->dispatch.total_sched_objs);\n+\t\t\tfprintf(f, \" total_sched_fail=%\" PRId64 \"\\n\",\n+\t\t\t\tn->dispatch.total_sched_fail);\n+\t\t}\n \t\tfprintf(f, \" total_calls=%\" PRId64 \"\\n\", n->total_calls);\n \t\tfor (i = 0; i < n->nb_edges; i++)\n \t\t\tfprintf(f, \" edge[%d] <%s>\\n\", i,\ndiff --git a/lib/graph/graph_stats.c b/lib/graph/graph_stats.c\nindex c0140ba922..cc32245c05 100644\n--- a/lib/graph/graph_stats.c\n+++ b/lib/graph/graph_stats.c\n@@ -40,13 +40,19 @@ struct rte_graph_cluster_stats {\n \tstruct cluster_node clusters[];\n } __rte_cache_aligned;\n \n+#define boarder_model_dispatch() \\\n+\tfprintf(f, \"+-------------------------------+---------------+--------\" \\\n+\t\t \"-------+---------------+---------------+---------------+\" \\\n+\t\t \"---------------+---------------+-\" \\\n+\t\t \"----------+\\n\")\n+\n #define boarder() \\\n \tfprintf(f, \"+-------------------------------+---------------+--------\" \\\n \t\t \"-------+---------------+---------------+---------------+-\" \\\n \t\t \"----------+\\n\")\n \n static inline void\n-print_banner(FILE *f)\n+print_banner_default(FILE *f)\n {\n \tboarder();\n \tfprintf(f, \"%-32s%-16s%-16s%-16s%-16s%-16s%-16s\\n\", \"|Node\", \"|calls\",\n@@ -55,6 +61,28 @@ print_banner(FILE *f)\n \tboarder();\n }\n \n+static inline void\n+print_banner_dispatch(FILE *f)\n+{\n+\tboarder_model_dispatch();\n+\tfprintf(f, \"%-32s%-16s%-16s%-16s%-16s%-16s%-16s%-16s%-16s\\n\",\n+\t\t\"|Node\", \"|calls\",\n+\t\t\"|objs\", \"|sched objs\", \"|sched fail\",\n+\t\t\"|realloc_count\", \"|objs/call\", \"|objs/sec(10E6)\",\n+\t\t\"|cycles/call|\");\n+\tboarder_model_dispatch();\n+}\n+\n+static inline void\n+print_banner(FILE *f)\n+{\n+\tif (rte_graph_worker_model_get(STAILQ_FIRST(graph_list_head_get())->graph) ==\n+\t RTE_GRAPH_MODEL_MCORE_DISPATCH)\n+\t\tprint_banner_dispatch(f);\n+\telse\n+\t\tprint_banner_default(f);\n+}\n+\n static inline void\n print_node(FILE *f, const struct rte_graph_cluster_node_stats *stat)\n {\n@@ -76,11 +104,22 @@ print_node(FILE *f, const struct rte_graph_cluster_node_stats *stat)\n \tobjs_per_sec = ts_per_hz ? (objs - prev_objs) / ts_per_hz : 0;\n \tobjs_per_sec /= 1000000;\n \n-\tfprintf(f,\n-\t\t\"|%-31s|%-15\" PRIu64 \"|%-15\" PRIu64 \"|%-15\" PRIu64\n-\t\t\"|%-15.3f|%-15.6f|%-11.4f|\\n\",\n-\t\tstat->name, calls, objs, stat->realloc_count, objs_per_call,\n-\t\tobjs_per_sec, cycles_per_call);\n+\tif (rte_graph_worker_model_get(STAILQ_FIRST(graph_list_head_get())->graph) ==\n+\t RTE_GRAPH_MODEL_MCORE_DISPATCH) {\n+\t\tfprintf(f,\n+\t\t\t\"|%-31s|%-15\" PRIu64 \"|%-15\" PRIu64 \"|%-15\" PRIu64\n+\t\t\t\"|%-15\" PRIu64 \"|%-15\" PRIu64\n+\t\t\t\"|%-15.3f|%-15.6f|%-11.4f|\\n\",\n+\t\t\tstat->name, calls, objs, stat->dispatch.sched_objs,\n+\t\t\tstat->dispatch.sched_fail, stat->realloc_count, objs_per_call,\n+\t\t\tobjs_per_sec, cycles_per_call);\n+\t} else {\n+\t\tfprintf(f,\n+\t\t\t\"|%-31s|%-15\" PRIu64 \"|%-15\" PRIu64 \"|%-15\" PRIu64\n+\t\t\t\"|%-15.3f|%-15.6f|%-11.4f|\\n\",\n+\t\t\tstat->name, calls, objs, stat->realloc_count, objs_per_call,\n+\t\t\tobjs_per_sec, cycles_per_call);\n+\t}\n }\n \n static int\n@@ -88,13 +127,20 @@ graph_cluster_stats_cb(bool is_first, bool is_last, void *cookie,\n \t\t const struct rte_graph_cluster_node_stats *stat)\n {\n \tFILE *f = cookie;\n+\tint model;\n+\n+\tmodel = rte_graph_worker_model_get(STAILQ_FIRST(graph_list_head_get())->graph);\n \n \tif (unlikely(is_first))\n \t\tprint_banner(f);\n \tif (stat->objs)\n \t\tprint_node(f, stat);\n-\tif (unlikely(is_last))\n-\t\tboarder();\n+\tif (unlikely(is_last)) {\n+\t\tif (model == RTE_GRAPH_MODEL_MCORE_DISPATCH)\n+\t\t\tboarder_model_dispatch();\n+\t\telse\n+\t\t\tboarder();\n+\t}\n \n \treturn 0;\n };\n@@ -333,12 +379,20 @@ cluster_node_arregate_stats(struct cluster_node *cluster)\n {\n \tuint64_t calls = 0, cycles = 0, objs = 0, realloc_count = 0;\n \tstruct rte_graph_cluster_node_stats *stat = &cluster->stat;\n+\tuint64_t sched_objs = 0, sched_fail = 0;\n \tstruct rte_node *node;\n \trte_node_t count;\n+\tint model;\n \n+\tmodel = rte_graph_worker_model_get(STAILQ_FIRST(graph_list_head_get())->graph);\n \tfor (count = 0; count < cluster->nb_nodes; count++) {\n \t\tnode = cluster->nodes[count];\n \n+\t\tif (model == RTE_GRAPH_MODEL_MCORE_DISPATCH) {\n+\t\t\tsched_objs += node->dispatch.total_sched_objs;\n+\t\t\tsched_fail += node->dispatch.total_sched_fail;\n+\t\t}\n+\n \t\tcalls += node->total_calls;\n \t\tobjs += node->total_objs;\n \t\tcycles += node->total_cycles;\n@@ -348,6 +402,12 @@ cluster_node_arregate_stats(struct cluster_node *cluster)\n \tstat->calls = calls;\n \tstat->objs = objs;\n \tstat->cycles = cycles;\n+\n+\tif (model == RTE_GRAPH_MODEL_MCORE_DISPATCH) {\n+\t\tstat->dispatch.sched_objs = sched_objs;\n+\t\tstat->dispatch.sched_fail = sched_fail;\n+\t}\n+\n \tstat->ts = rte_get_timer_cycles();\n \tstat->realloc_count = realloc_count;\n }\ndiff --git a/lib/graph/rte_graph.h b/lib/graph/rte_graph.h\nindex 2ffee520b1..28e50e49b8 100644\n--- a/lib/graph/rte_graph.h\n+++ b/lib/graph/rte_graph.h\n@@ -220,6 +220,16 @@ struct rte_graph_cluster_node_stats {\n \tuint64_t prev_objs;\t/**< Previous number of processed objs. */\n \tuint64_t prev_cycles;\t/**< Previous number of cycles. */\n \n+\tRTE_STD_C11\n+\tunion {\n+\t\tstruct {\n+\t\t\tuint64_t sched_objs;\n+\t\t\t/**< Previous number of scheduled objs for dispatch model. */\n+\t\t\tuint64_t sched_fail;\n+\t\t\t/**< Previous number of failed schedule objs for dispatch model. */\n+\t\t} dispatch;\n+\t};\n+\n \tuint64_t realloc_count; /**< Realloc count. */\n \n \trte_node_t id;\t/**< Node identifier of stats. */\ndiff --git a/lib/graph/rte_graph_model_mcore_dispatch.c b/lib/graph/rte_graph_model_mcore_dispatch.c\nindex 8f4bc860ab..d1291b8c57 100644\n--- a/lib/graph/rte_graph_model_mcore_dispatch.c\n+++ b/lib/graph/rte_graph_model_mcore_dispatch.c\n@@ -96,6 +96,7 @@ __graph_sched_node_enqueue(struct rte_node *node, struct rte_graph *graph)\n \t\trte_pause();\n \n \toff += size;\n+\tnode->dispatch.total_sched_objs += size;\n \tnode->idx -= size;\n \tif (node->idx > 0)\n \t\tgoto submit_again;\n@@ -107,6 +108,8 @@ __graph_sched_node_enqueue(struct rte_node *node, struct rte_graph *graph)\n \t\tmemmove(&node->objs[0], &node->objs[off],\n \t\t\tnode->idx * sizeof(void *));\n \n+\tnode->dispatch.total_sched_fail += node->idx;\n+\n \treturn false;\n }\n \ndiff --git a/lib/graph/rte_graph_worker_common.h b/lib/graph/rte_graph_worker_common.h\nindex b34cdf1ffb..a3824590cd 100644\n--- a/lib/graph/rte_graph_worker_common.h\n+++ b/lib/graph/rte_graph_worker_common.h\n@@ -110,6 +110,8 @@ struct rte_node {\n \t\t/* Fast schedule area for mcore dispatch model */\n \t\tstruct {\n \t\t\tunsigned int lcore_id; /**< Node running lcore. */\n+\t\t\tuint64_t total_sched_objs; /**< Number of objects scheduled. */\n+\t\t\tuint64_t total_sched_fail; /**< Number of scheduled failure. */\n \t\t} dispatch;\n \t};\n \t/* Fast path area */\n", "prefixes": [ "v12", "14/16" ] }{ "id": 128495, "url": "