From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
To: dev@dpdk.org, honnappa.nagarahalli@arm.com,
konstantin.ananyev@intel.com, david.marchand@redhat.com,
feifei.wang2@arm.com
Cc: ruifeng.wang@arm.com, nd@arm.com
Subject: [dpdk-dev] [PATCH v3 0/4] Use correct memory ordering in eal functions
Date: Sun, 24 Oct 2021 23:52:33 -0500 [thread overview]
Message-ID: <20211025045237.19878-1-honnappa.nagarahalli@arm.com> (raw)
In-Reply-To: <20210224212018.17576-1-honnappa.nagarahalli@arm.com>
v3:
a) Added Fixes, Cc:stable#dpdk.org in 1/6
b) Merged 3/6 & 4/6 and moved after the first commit in the series
c) Merged 2/6 & 5/6 as they need to be in a single commit
d) Removed use of volatile in 6/6 (Konstantin)
rte_eal_remote_launch and rte_eal_wait_lcore need to provide
correct memory ordering to address the data communication from
main core to worker core.
There are 2 use cases:
1) All the store operations (meant for worker) by main core
should be visible to worker core before the worker core runs the
assigned function
2) All the store operations by the worker core should be visible
to the main core after rte_eal_wait_lcore returns.
For the data that needs to be communicated to the worker after
the rte_eal_remote_launch returns, load-acquire and store-release
semantics should be used.
For the main to worker communication, the pointer to function
to execute is used as the guard variable. Hence, resetting of
the function pointer is important.
For the worker to main communication, the existing code uses the
lcore state as the guard variable. However, it looks like
the FINISHED state is not really required. Hence the FINISHED state
is removed before using the state as the guard variable.
Honnappa Nagarahalli (4):
eal: reset lcore function pointer and argument
eal: lcore state FINISHED is not required
eal: ensure correct memory ordering
test/ring: use relaxed barriers for ring stress test
app/test/test_ring_stress_impl.h | 18 +++----
drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 2 +-
drivers/event/octeontx/ssovf_evdev_selftest.c | 2 +-
drivers/event/sw/sw_evdev_selftest.c | 4 +-
examples/l2fwd-keepalive/main.c | 3 +-
lib/eal/common/eal_common_launch.c | 13 ++---
lib/eal/freebsd/eal_thread.c | 45 +++++++++++++----
lib/eal/include/rte_launch.h | 21 ++++----
lib/eal/include/rte_service.h | 4 +-
lib/eal/linux/eal_thread.c | 48 +++++++++++++------
lib/eal/windows/eal_thread.c | 48 +++++++++++++------
11 files changed, 132 insertions(+), 76 deletions(-)
--
2.17.1
next prev parent reply other threads:[~2021-10-25 4:52 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-24 21:20 [dpdk-dev] [RFC 0/5] " Honnappa Nagarahalli
2021-02-24 21:20 ` [dpdk-dev] [RFC 1/5] eal: reset lcore function pointer and argument Honnappa Nagarahalli
2021-02-24 21:20 ` [dpdk-dev] [RFC 2/5] eal: ensure memory operations are visible to worker Honnappa Nagarahalli
2021-02-24 21:20 ` [dpdk-dev] [RFC 3/5] eal: lcore state FINISHED is not required Honnappa Nagarahalli
[not found] ` <AM5PR0802MB2465B62994239817E0AC46C59E9E9@AM5PR0802MB2465.eurprd08.prod.outlook.com>
2021-02-25 8:44 ` [dpdk-dev] 回复: " Feifei Wang
2021-02-25 23:33 ` [dpdk-dev] " Honnappa Nagarahalli
2021-02-26 8:26 ` Thomas Monjalon
2021-03-02 3:13 ` Honnappa Nagarahalli
2021-03-19 13:42 ` Ananyev, Konstantin
2021-03-30 2:54 ` Honnappa Nagarahalli
2021-03-01 5:55 ` [dpdk-dev] 回复: " Feifei Wang
2021-02-24 21:20 ` [dpdk-dev] [RFC 4/5] eal: ensure memory operations are visible to main Honnappa Nagarahalli
2021-02-24 21:20 ` [dpdk-dev] [RFC 5/5] test/ring: use relaxed barriers for ring stress test Honnappa Nagarahalli
2021-03-01 16:41 ` [dpdk-dev] [RFC 0/5] Use correct memory ordering in eal functions Stephen Hemminger
2021-03-02 16:06 ` Honnappa Nagarahalli
2021-09-09 23:13 ` [dpdk-dev] [PATCH v2 0/6] " Honnappa Nagarahalli
2021-09-09 23:13 ` [dpdk-dev] [PATCH v2 1/6] eal: reset lcore function pointer and argument Honnappa Nagarahalli
2021-09-10 7:49 ` Bruce Richardson
2021-09-10 8:12 ` David Marchand
2021-09-11 22:19 ` Honnappa Nagarahalli
2021-09-09 23:13 ` [dpdk-dev] [PATCH v2 2/6] eal: ensure memory operations are visible to worker Honnappa Nagarahalli
2021-09-09 23:13 ` [dpdk-dev] [PATCH v2 3/6] eal: lcore state FINISHED is not required Honnappa Nagarahalli
2021-09-09 23:13 ` [dpdk-dev] [PATCH v2 4/6] eal: update rte_eal_wait_lcore definition Honnappa Nagarahalli
2021-09-09 23:37 ` Honnappa Nagarahalli
2021-09-09 23:13 ` [dpdk-dev] [PATCH v2 5/6] eal: ensure memory operations are visible to main Honnappa Nagarahalli
2021-09-09 23:13 ` [dpdk-dev] [PATCH v2 6/6] test/ring: use relaxed barriers for ring stress test Honnappa Nagarahalli
2021-10-07 11:55 ` Ananyev, Konstantin
2021-10-07 23:40 ` Honnappa Nagarahalli
2021-10-25 4:52 ` Honnappa Nagarahalli [this message]
2021-10-25 4:52 ` [dpdk-dev] [PATCH v3 1/4] eal: reset lcore function pointer and argument Honnappa Nagarahalli
2021-10-25 4:52 ` [dpdk-dev] [PATCH v3 2/4] eal: lcore state FINISHED is not required Honnappa Nagarahalli
2021-10-25 4:52 ` [dpdk-dev] [PATCH v3 3/4] eal: use correct memory ordering Honnappa Nagarahalli
2021-10-25 4:52 ` [dpdk-dev] [PATCH v3 4/4] test/ring: use relaxed barriers for ring stress test Honnappa Nagarahalli
2021-10-25 16:23 ` [dpdk-dev] [PATCH v3 0/4] Use correct memory ordering in eal functions David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211025045237.19878-1-honnappa.nagarahalli@arm.com \
--to=honnappa.nagarahalli@arm.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=feifei.wang2@arm.com \
--cc=konstantin.ananyev@intel.com \
--cc=nd@arm.com \
--cc=ruifeng.wang@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).