Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/88179/?format=api
http://patchwork.dpdk.org/api/patches/88179/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210224212018.17576-4-honnappa.nagarahalli@arm.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": "<20210224212018.17576-4-honnappa.nagarahalli@arm.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210224212018.17576-4-honnappa.nagarahalli@arm.com", "date": "2021-02-24T21:20:16", "name": "[RFC,3/5] eal: lcore state FINISHED is not required", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "373f91d4148756782ffed5df7451d99c880e8faf", "submitter": { "id": 1045, "url": "http://patchwork.dpdk.org/api/people/1045/?format=api", "name": "Honnappa Nagarahalli", "email": "honnappa.nagarahalli@arm.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/20210224212018.17576-4-honnappa.nagarahalli@arm.com/mbox/", "series": [ { "id": 15367, "url": "http://patchwork.dpdk.org/api/series/15367/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=15367", "date": "2021-02-24T21:20:13", "name": "Use correct memory ordering in eal functions", "version": 1, "mbox": "http://patchwork.dpdk.org/series/15367/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/88179/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/88179/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 E1DC9A034F;\n\tWed, 24 Feb 2021 22:20:52 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8A05516076E;\n\tWed, 24 Feb 2021 22:20:47 +0100 (CET)", "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 8452F16076E\n for <dev@dpdk.org>; Wed, 24 Feb 2021 22:20:46 +0100 (CET)", "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 08C381063;\n Wed, 24 Feb 2021 13:20:46 -0800 (PST)", "from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com\n [10.118.12.44])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EFC343F73D;\n Wed, 24 Feb 2021 13:20:45 -0800 (PST)" ], "From": "Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>", "To": "Hemant Agrawal <hemant.agrawal@nxp.com>,\n Nipun Gupta <nipun.gupta@nxp.com>,\n Jerin Jacob <jerinj@marvell.com>,\n Harry van Haaren <harry.van.haaren@intel.com>,\n Bruce Richardson <bruce.richardson@intel.com>,\n Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,\n Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,\n Dmitry Malloy <dmitrym@microsoft.com>,\n Pallavi Kadam <pallavi.kadam@intel.com>", "Cc": "dev@dpdk.org, honnappa.nagarahalli@arm.com, ruifeng.wang@arm.com,\n feifei.wang@arm.com, nd@arm.com", "Date": "Wed, 24 Feb 2021 15:20:16 -0600", "Message-Id": "<20210224212018.17576-4-honnappa.nagarahalli@arm.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20210224212018.17576-1-honnappa.nagarahalli@arm.com>", "References": "<20210224212018.17576-1-honnappa.nagarahalli@arm.com>", "Subject": "[dpdk-dev] [RFC 3/5] eal: lcore state FINISHED is not required", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "FINISHED state seems to be used to indicate that the worker's update\nof the 'state' is not visible to other threads. There seems to be no\nrequirement to have such a state.\n\nSigned-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>\nReviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>\n---\n drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 2 +-\n drivers/event/octeontx/ssovf_evdev_selftest.c | 2 +-\n drivers/event/sw/sw_evdev_selftest.c | 4 ++--\n examples/l2fwd-keepalive/main.c | 2 +-\n lib/librte_eal/common/eal_common_launch.c | 7 ++-----\n lib/librte_eal/freebsd/eal_thread.c | 2 +-\n lib/librte_eal/linux/eal_thread.c | 8 +-------\n lib/librte_eal/windows/eal_thread.c | 8 +-------\n 8 files changed, 10 insertions(+), 25 deletions(-)", "diff": "diff --git a/drivers/event/dpaa2/dpaa2_eventdev_selftest.c b/drivers/event/dpaa2/dpaa2_eventdev_selftest.c\nindex cd7311a94..bbbd20951 100644\n--- a/drivers/event/dpaa2/dpaa2_eventdev_selftest.c\n+++ b/drivers/event/dpaa2/dpaa2_eventdev_selftest.c\n@@ -468,7 +468,7 @@ wait_workers_to_join(int lcore, const rte_atomic32_t *count)\n \tRTE_SET_USED(count);\n \n \tprint_cycles = cycles = rte_get_timer_cycles();\n-\twhile (rte_eal_get_lcore_state(lcore) != FINISHED) {\n+\twhile (rte_eal_get_lcore_state(lcore) != WAIT) {\n \t\tuint64_t new_cycles = rte_get_timer_cycles();\n \n \t\tif (new_cycles - print_cycles > rte_get_timer_hz()) {\ndiff --git a/drivers/event/octeontx/ssovf_evdev_selftest.c b/drivers/event/octeontx/ssovf_evdev_selftest.c\nindex 528f99dd8..d7b0d2211 100644\n--- a/drivers/event/octeontx/ssovf_evdev_selftest.c\n+++ b/drivers/event/octeontx/ssovf_evdev_selftest.c\n@@ -579,7 +579,7 @@ wait_workers_to_join(int lcore, const rte_atomic32_t *count)\n \tRTE_SET_USED(count);\n \n \tprint_cycles = cycles = rte_get_timer_cycles();\n-\twhile (rte_eal_get_lcore_state(lcore) != FINISHED) {\n+\twhile (rte_eal_get_lcore_state(lcore) != WAIT) {\n \t\tuint64_t new_cycles = rte_get_timer_cycles();\n \n \t\tif (new_cycles - print_cycles > rte_get_timer_hz()) {\ndiff --git a/drivers/event/sw/sw_evdev_selftest.c b/drivers/event/sw/sw_evdev_selftest.c\nindex e4bfb3a0f..7847a8645 100644\n--- a/drivers/event/sw/sw_evdev_selftest.c\n+++ b/drivers/event/sw/sw_evdev_selftest.c\n@@ -3138,8 +3138,8 @@ worker_loopback(struct test *t, uint8_t disable_implicit_release)\n \trte_eal_remote_launch(worker_loopback_worker_fn, t, w_lcore);\n \n \tprint_cycles = cycles = rte_get_timer_cycles();\n-\twhile (rte_eal_get_lcore_state(p_lcore) != FINISHED ||\n-\t\t\trte_eal_get_lcore_state(w_lcore) != FINISHED) {\n+\twhile (rte_eal_get_lcore_state(p_lcore) != WAIT ||\n+\t\t\trte_eal_get_lcore_state(w_lcore) != WAIT) {\n \n \t\trte_service_run_iter_on_app_lcore(t->service_id, 1);\n \ndiff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c\nindex e4c2b2793..dd777c46a 100644\n--- a/examples/l2fwd-keepalive/main.c\n+++ b/examples/l2fwd-keepalive/main.c\n@@ -506,7 +506,7 @@ dead_core(__rte_unused void *ptr_data, const int id_core)\n \tif (terminate_signal_received)\n \t\treturn;\n \tprintf(\"Dead core %i - restarting..\\n\", id_core);\n-\tif (rte_eal_get_lcore_state(id_core) == FINISHED) {\n+\tif (rte_eal_get_lcore_state(id_core) == WAIT) {\n \t\trte_eal_wait_lcore(id_core);\n \t\trte_eal_remote_launch(l2fwd_launch_one_lcore, NULL, id_core);\n \t} else {\ndiff --git a/lib/librte_eal/common/eal_common_launch.c b/lib/librte_eal/common/eal_common_launch.c\nindex 34f854ad8..78fd94026 100644\n--- a/lib/librte_eal/common/eal_common_launch.c\n+++ b/lib/librte_eal/common/eal_common_launch.c\n@@ -26,14 +26,11 @@ rte_eal_wait_lcore(unsigned worker_id)\n \tif (lcore_config[worker_id].state == WAIT)\n \t\treturn 0;\n \n-\twhile (lcore_config[worker_id].state != WAIT &&\n-\t lcore_config[worker_id].state != FINISHED)\n+\twhile (lcore_config[worker_id].state != WAIT)\n \t\trte_pause();\n \n \trte_rmb();\n \n-\t/* we are in finished state, go to wait state */\n-\tlcore_config[worker_id].state = WAIT;\n \treturn lcore_config[worker_id].ret;\n }\n \n@@ -62,7 +59,7 @@ rte_eal_mp_remote_launch(int (*f)(void *), void *arg,\n \n \tif (call_main == CALL_MAIN) {\n \t\tlcore_config[main_lcore].ret = f(arg);\n-\t\tlcore_config[main_lcore].state = FINISHED;\n+\t\tlcore_config[main_lcore].state = WAIT;\n \t}\n \n \treturn 0;\ndiff --git a/lib/librte_eal/freebsd/eal_thread.c b/lib/librte_eal/freebsd/eal_thread.c\nindex 17b8f3996..6d6f1e2fd 100644\n--- a/lib/librte_eal/freebsd/eal_thread.c\n+++ b/lib/librte_eal/freebsd/eal_thread.c\n@@ -140,7 +140,7 @@ eal_thread_loop(__rte_unused void *arg)\n \t\tlcore_config[lcore_id].f = NULL;\n \t\tlcore_config[lcore_id].arg = NULL;\n \t\trte_wmb();\n-\t\tlcore_config[lcore_id].state = FINISHED;\n+\t\tlcore_config[lcore_id].state = WAIT;\n \t}\n \n \t/* never reached */\ndiff --git a/lib/librte_eal/linux/eal_thread.c b/lib/librte_eal/linux/eal_thread.c\nindex a0a009104..7b9463df3 100644\n--- a/lib/librte_eal/linux/eal_thread.c\n+++ b/lib/librte_eal/linux/eal_thread.c\n@@ -141,13 +141,7 @@ eal_thread_loop(__rte_unused void *arg)\n \t\tlcore_config[lcore_id].arg = NULL;\n \t\trte_wmb();\n \n-\t\t/* when a service core returns, it should go directly to WAIT\n-\t\t * state, because the application will not lcore_wait() for it.\n-\t\t */\n-\t\tif (lcore_config[lcore_id].core_role == ROLE_SERVICE)\n-\t\t\tlcore_config[lcore_id].state = WAIT;\n-\t\telse\n-\t\t\tlcore_config[lcore_id].state = FINISHED;\n+\t\tlcore_config[lcore_id].state = WAIT;\n \t}\n \n \t/* never reached */\ndiff --git a/lib/librte_eal/windows/eal_thread.c b/lib/librte_eal/windows/eal_thread.c\nindex 7a9277c51..35d059a30 100644\n--- a/lib/librte_eal/windows/eal_thread.c\n+++ b/lib/librte_eal/windows/eal_thread.c\n@@ -125,13 +125,7 @@ eal_thread_loop(void *arg __rte_unused)\n \t\tlcore_config[lcore_id].arg = NULL;\n \t\trte_wmb();\n \n-\t\t/* when a service core returns, it should go directly to WAIT\n-\t\t * state, because the application will not lcore_wait() for it.\n-\t\t */\n-\t\tif (lcore_config[lcore_id].core_role == ROLE_SERVICE)\n-\t\t\tlcore_config[lcore_id].state = WAIT;\n-\t\telse\n-\t\t\tlcore_config[lcore_id].state = FINISHED;\n+\t\tlcore_config[lcore_id].state = WAIT;\n \t}\n }\n \n", "prefixes": [ "RFC", "3/5" ] }{ "id": 88179, "url": "