From: Ruifeng Wang <Ruifeng.Wang@arm.com>
To: "thomas@monjalon.net" <thomas@monjalon.net>
Cc: "david.marchand@redhat.com" <david.marchand@redhat.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"konstantin.v.ananyev@yandex.ru" <konstantin.v.ananyev@yandex.ru>,
Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
nd <nd@arm.com>, nd <nd@arm.com>
Subject: RE: [PATCH] eal: add notes to SMP memory barrier APIs
Date: Sun, 25 Jun 2023 07:55:25 +0000 [thread overview]
Message-ID: <AS8PR08MB7080E4D84D495F4D4CAD5D459E21A@AS8PR08MB7080.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <2110866.OBFZWjSADL@thomas>
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Wednesday, June 21, 2023 3:30 PM
> To: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Cc: david.marchand@redhat.com; dev@dpdk.org; konstantin.v.ananyev@yandex.ru; Honnappa
> Nagarahalli <Honnappa.Nagarahalli@arm.com>; nd <nd@arm.com>
> Subject: Re: [PATCH] eal: add notes to SMP memory barrier APIs
>
> 21/06/2023 08:44, Ruifeng Wang:
> > + * @note
> > + * This function is deprecated. It adds complexity to the memory
> > + model
> > + * used by this project. C11 memory model should always be used.
> > + * rte_atomic_thread_fence() should be used instead.
> > */
> > static inline void rte_smp_mb(void);
>
> I think it should be more explicit:
> "the memory model used by this project" -> the DPDK memory model Why it adds complexity?
The rte_smp_xx APIs define a set of memory order semantics. It is redundant given we are
using memory order semantics defined in the C language.
I'll make it more explicit in the next version.
> What do you mean by "C11 memory model"?
I mean the memory order semantics:
https://en.cppreference.com/w/c/atomic/memory_order
>
next prev parent reply other threads:[~2023-06-25 7:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 6:44 Ruifeng Wang
2023-06-21 7:29 ` Thomas Monjalon
2023-06-25 7:55 ` Ruifeng Wang [this message]
2023-06-22 18:19 ` Mattias Rönnblom
2023-06-23 21:51 ` Tyler Retzlaff
2023-06-25 8:45 ` Ruifeng Wang
2023-06-25 15:40 ` Thomas Monjalon
2023-06-25 8:17 ` Ruifeng Wang
2023-06-29 19:28 ` Mattias Rönnblom
2023-07-03 6:12 ` Ruifeng Wang
2023-06-26 7:12 ` [PATCH v2] " Ruifeng Wang
2023-06-29 19:43 ` Mattias Rönnblom
2023-07-03 7:02 ` Ruifeng Wang
2023-07-04 12:08 ` Mattias Rönnblom
2023-07-03 9:56 ` [PATCH v3] " Ruifeng Wang
2023-07-28 9:17 ` 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=AS8PR08MB7080E4D84D495F4D4CAD5D459E21A@AS8PR08MB7080.eurprd08.prod.outlook.com \
--to=ruifeng.wang@arm.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=konstantin.v.ananyev@yandex.ru \
--cc=nd@arm.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).