From: "Gavin Hu (Arm Technology China)" <Gavin.Hu@arm.com>
To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
"thomas@monjalon.net" <thomas@monjalon.net>,
"Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Cc: Ilya Maximets <i.maximets@samsung.com>,
"dev@dpdk.org" <dev@dpdk.org>, nd <nd@arm.com>,
"jerinj@marvell.com" <jerinj@marvell.com>,
"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
"Nipun.gupta@nxp.com" <nipun.gupta@nxp.com>,
"olivier.matz@6wind.com" <olivier.matz@6wind.com>,
"Richardson, Bruce" <bruce.richardson@intel.com>,
"chaozhu@linux.vnet.ibm.com" <chaozhu@linux.vnet.ibm.com>,
nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v2] ring: enforce reading the tails before ring operations
Date: Sat, 9 Mar 2019 10:28:57 +0000 [thread overview]
Message-ID: <VI1PR08MB31678059A977790E19406C888F4E0@VI1PR08MB3167.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <AM6PR08MB367217F20AD2D688AC28039D984D0@AM6PR08MB3672.eurprd08.prod.outlook.com>
> -----Original Message-----
> From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
> Sent: Saturday, March 9, 2019 7:48 AM
> To: thomas@monjalon.net; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; Gavin Hu (Arm Technology China)
> <Gavin.Hu@arm.com>
> Cc: Ilya Maximets <i.maximets@samsung.com>; dev@dpdk.org; nd
> <nd@arm.com>; jerinj@marvell.com; hemant.agrawal@nxp.com;
> Nipun.gupta@nxp.com; olivier.matz@6wind.com; Richardson, Bruce
> <bruce.richardson@intel.com>; chaozhu@linux.vnet.ibm.com; nd
> <nd@arm.com>
> Subject: RE: [PATCH v2] ring: enforce reading the tails before ring
> operations
>
> > 08/03/2019 16:50, Ananyev, Konstantin:
> > > 08/03/2019 16:05, Gavin Hu (Arm Technology China):
> > > > Anyway, on x86, smp_rmb, as a compiler barrier, applies to
> load/store, not
> > only load/load.
> > >
> > > Yes, that's true, but I think that's happened by coincidence, not
> > > intentionally.
> > >
> > > > This is the case also for arm, arm64, ppc32, ppc64.
> > > > I will submit a patch to expand the definition of this API.
> > >
> > > I understand your intention, but that does mean we would also need
> to
> > > change not only rte_smp_rmb() but rte_rmb() too (to keep things
> consistent)?
> > > That sounds worring.
> > > Might be better to keep smp_rmb() definition as it is, and introduce
> > > new function that fits your purposes (smp_rwmb or
> smp_load_store_barrier)?
> Looking at rte_rmb, rte_io_rmb, rte_cio_rmb implementations for Arm,
> they all provide load/store barrier as well. If other architectures also
> provide load/store barrier with rte_xxx_rmb, then we could extend the
> meaning of the existing APIs.
Further looking at rte_rmb, rte_io_rmb, rte_cio_rmb implementations for PPC64 and x86,
They also provide load/store barrier. It is safe to extend the meaning of the existing rte_XXX_rmb API.
>
> Even if a new API is provided, we need to do provide the same APIs for IO
> and CIO variants.
Since rte_XXX_rmbs API for all architectures already provide the desired load/store ordering,
a new API is redundant and not needed.
> >
> > How is it managed in other projects?
> In my experience, I usually have been changing the algorithms to use C11
> memory model. So, I have not come across this issue yet. Others can
> comment.
>
> >
next prev parent reply other threads:[~2019-03-09 10:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-06 3:07 [dpdk-dev] [PATCH v1] " gavin hu
[not found] ` <CGME20190306114906eucas1p19c2572b1fe777e1eb0ca96d2e47295bd@eucas1p1.samsung.com>
2019-03-06 11:49 ` [dpdk-dev] [v1] " Ilya Maximets
2019-03-07 6:50 ` Gavin Hu (Arm Technology China)
2019-03-07 6:45 ` [dpdk-dev] [PATCH v2] " gavin hu
2019-03-07 8:52 ` Ilya Maximets
2019-03-07 9:27 ` Gavin Hu (Arm Technology China)
2019-03-07 9:48 ` Ilya Maximets
2019-03-07 10:44 ` Gavin Hu (Arm Technology China)
2019-03-07 11:17 ` Ananyev, Konstantin
2019-03-08 3:21 ` Honnappa Nagarahalli
2019-03-08 5:27 ` Gavin Hu (Arm Technology China)
2019-03-08 16:33 ` Ananyev, Konstantin
2019-03-10 20:47 ` Honnappa Nagarahalli
2019-03-11 13:58 ` Ananyev, Konstantin
2019-03-08 4:23 ` Gavin Hu (Arm Technology China)
2019-03-08 5:06 ` Honnappa Nagarahalli
2019-03-08 12:13 ` Ananyev, Konstantin
2019-03-08 15:05 ` Gavin Hu (Arm Technology China)
2019-03-08 15:50 ` Ananyev, Konstantin
2019-03-08 23:18 ` Thomas Monjalon
2019-03-08 23:48 ` Honnappa Nagarahalli
2019-03-09 10:28 ` Gavin Hu (Arm Technology China) [this message]
2019-03-12 16:58 ` [dpdk-dev] [PATCH v3 0/1] ring: enforce reading the tail before reading ring slots Gavin Hu
2019-03-12 16:58 ` [dpdk-dev] [PATCH v3 1/1] " Gavin Hu
2019-03-13 8:12 ` Nipun Gupta
2019-03-15 13:26 ` Ananyev, Konstantin
2019-03-15 13:26 ` Ananyev, Konstantin
2019-03-28 0:21 ` Thomas Monjalon
2019-03-28 0:21 ` Thomas Monjalon
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=VI1PR08MB31678059A977790E19406C888F4E0@VI1PR08MB3167.eurprd08.prod.outlook.com \
--to=gavin.hu@arm.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=bruce.richardson@intel.com \
--cc=chaozhu@linux.vnet.ibm.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=i.maximets@samsung.com \
--cc=jerinj@marvell.com \
--cc=konstantin.ananyev@intel.com \
--cc=nd@arm.com \
--cc=nipun.gupta@nxp.com \
--cc=olivier.matz@6wind.com \
--cc=thomas@monjalon.net \
/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).