DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 00/10] generic rte atomic APIs deprecate proposal
@ 2020-03-10 17:49 Phil Yang
  2020-03-10 17:49 ` [dpdk-dev] [PATCH 01/10] doc: add generic atomic deprecation section Phil Yang
                   ` (10 more replies)
  0 siblings, 11 replies; 219+ messages in thread
From: Phil Yang @ 2020-03-10 17:49 UTC (permalink / raw)
  To: thomas, harry.van.haaren, konstantin.ananyev, stephen,
	maxime.coquelin, dev
  Cc: david.marchand, jerinj, hemant.agrawal, Honnappa.Nagarahalli,
	gavin.hu, ruifeng.wang, joyce.kong, nd

DPDK provides generic rte_atomic APIs to do several atomic operations.
These APIs are using the deprecated __sync built-ins and enforce full
memory barriers on aarch64. However, full barriers are not necessary
in many use cases. In order to address such use cases, C language offers
C11 atomic APIs. The C11 atomic APIs provide finer memory barrier control
by making use of the memory ordering parameter provided by the user.
Various patches submitted in the past [1] and the patches in this series
indicate significant performance gains on multiple aarch64 CPUs and no
performance loss on x86.

But the existing rte_atomic API implementations cannot be changed as the
APIs do not take the memory ordering parameter. The only choice available
is replacing the usage of the rte_atomic APIs with C11 atomic APIs. In
order to make this change, the following steps are proposed:

[1] deprecate rte_atomic APIs so that future patches do not use rte_atomic
APIs (a script is added to flag the usages).
[2] refactor the code that uses rte_atomic APIs to use c11 atomic APIs.

This patchset contains:
1) the checkpatch script changes to flag rte_atomic API usage in patches.
2) changes to programmer guide describing writing efficient code for aarch64.
3) changes to various libraries to make use of c11 atomic APIs.

We are planning to replicate this idea across all the other libraries,
drivers, examples, test applications. In the next phase, we will add
changes to the mbuf, the EAL interrupts and the event timer adapter libraries.

Honnappa Nagarahalli (2):
  service: avoid race condition for MT unsafe service
  service: identify service running on another core correctly

Phil Yang (8):
  doc: add generic atomic deprecation section
  devtools: prevent use of rte atomic APIs in future patches
  vhost: optimize broadcast rarp sync with c11 atomic
  ipsec: optimize with c11 atomic for sa outbound sqn update
  service: remove rte prefix from static functions
  service: remove redundant code
  service: optimize with c11 one-way barrier
  service: relax barriers with C11 atomic operations

 devtools/checkpatches.sh                         |   9 ++
 doc/guides/prog_guide/writing_efficient_code.rst |  60 +++++++-
 lib/librte_eal/common/rte_service.c              | 175 ++++++++++++-----------
 lib/librte_ipsec/ipsec_sqn.h                     |   3 +-
 lib/librte_ipsec/sa.h                            |   2 +-
 lib/librte_vhost/vhost.h                         |   2 +-
 lib/librte_vhost/vhost_user.c                    |   7 +-
 lib/librte_vhost/virtio_net.c                    |  16 ++-
 8 files changed, 175 insertions(+), 99 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 219+ messages in thread

end of thread, other threads:[~2020-07-20  7:06 UTC | newest]

Thread overview: 219+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 17:49 [dpdk-dev] [PATCH 00/10] generic rte atomic APIs deprecate proposal Phil Yang
2020-03-10 17:49 ` [dpdk-dev] [PATCH 01/10] doc: add generic atomic deprecation section Phil Yang
2020-03-10 17:49 ` [dpdk-dev] [PATCH 02/10] devtools: prevent use of rte atomic APIs in future patches Phil Yang
2020-03-10 17:49 ` [dpdk-dev] [PATCH 03/10] vhost: optimize broadcast rarp sync with c11 atomic Phil Yang
2020-03-10 17:49 ` [dpdk-dev] [PATCH 04/10] ipsec: optimize with c11 atomic for sa outbound sqn update Phil Yang
2020-03-10 17:49 ` [dpdk-dev] [PATCH 05/10] service: remove rte prefix from static functions Phil Yang
2020-03-10 17:49 ` [dpdk-dev] [PATCH 06/10] service: remove redundant code Phil Yang
2020-03-10 17:49 ` [dpdk-dev] [PATCH 07/10] service: avoid race condition for MT unsafe service Phil Yang
2020-03-10 17:49 ` [dpdk-dev] [PATCH 08/10] service: identify service running on another core correctly Phil Yang
2020-03-10 17:49 ` [dpdk-dev] [PATCH 09/10] service: optimize with c11 one-way barrier Phil Yang
2020-03-10 17:49 ` [dpdk-dev] [PATCH 10/10] service: relax barriers with C11 atomic operations Phil Yang
2020-03-12  7:44 ` [dpdk-dev] [PATCH v2 00/10] generic rte atomic APIs deprecate proposal Phil Yang
2020-03-12  7:44   ` [dpdk-dev] [PATCH v2 01/10] doc: add generic atomic deprecation section Phil Yang
2020-03-12  7:44   ` [dpdk-dev] [PATCH v2 02/10] devtools: prevent use of rte atomic APIs in future patches Phil Yang
2020-03-12  7:44   ` [dpdk-dev] [PATCH v2 03/10] vhost: optimize broadcast rarp sync with c11 atomic Phil Yang
2020-03-12  7:44   ` [dpdk-dev] [PATCH v2 04/10] ipsec: optimize with c11 atomic for sa outbound sqn update Phil Yang
2020-03-12  7:44   ` [dpdk-dev] [PATCH v2 05/10] service: remove rte prefix from static functions Phil Yang
2020-03-12  7:44   ` [dpdk-dev] [PATCH v2 06/10] service: remove redundant code Phil Yang
2020-03-12  7:44   ` [dpdk-dev] [PATCH v2 07/10] service: avoid race condition for MT unsafe service Phil Yang
2020-03-12  7:44   ` [dpdk-dev] [PATCH v2 08/10] service: identify service running on another core correctly Phil Yang
2020-03-12  7:44   ` [dpdk-dev] [PATCH v2 09/10] service: optimize with c11 one-way barrier Phil Yang
2020-03-12  7:44   ` [dpdk-dev] [PATCH v2 10/10] service: relax barriers with C11 atomic operations Phil Yang
2020-03-17  1:17   ` [dpdk-dev] [PATCH v3 00/12] generic rte atomic APIs deprecate proposal Phil Yang
2020-03-17  1:17     ` [dpdk-dev] [PATCH v3 01/12] doc: add generic atomic deprecation section Phil Yang
2020-03-17  1:17     ` [dpdk-dev] [PATCH v3 02/12] devtools: prevent use of rte atomic APIs in future patches Phil Yang
2020-03-17  1:17     ` [dpdk-dev] [PATCH v3 03/12] eal/build: add libatomic dependency for 32-bit clang Phil Yang
2020-04-24  6:08       ` Phil Yang
2020-03-17  1:17     ` [dpdk-dev] [PATCH v3 04/12] build: remove redundant code Phil Yang
2020-04-24  6:14       ` Phil Yang
2020-03-17  1:17     ` [dpdk-dev] [PATCH v3 05/12] vhost: optimize broadcast rarp sync with c11 atomic Phil Yang
2020-04-23 16:54       ` [dpdk-dev] [PATCH v2] " Phil Yang
2020-04-27  8:57         ` Maxime Coquelin
2020-04-28 16:06         ` Maxime Coquelin
2020-03-17  1:17     ` [dpdk-dev] [PATCH v3 06/12] ipsec: optimize with c11 atomic for sa outbound sqn update Phil Yang
2020-03-23 18:48       ` Ananyev, Konstantin
2020-03-23 19:07         ` Honnappa Nagarahalli
2020-03-23 19:18           ` Ananyev, Konstantin
2020-03-23 20:20             ` Honnappa Nagarahalli
2020-03-24 13:10               ` Ananyev, Konstantin
2020-03-24 13:21                 ` Ananyev, Konstantin
2020-03-24 10:37             ` Phil Yang
2020-03-24 11:03               ` Ananyev, Konstantin
2020-03-25  9:38                 ` Phil Yang
2020-04-23 17:16       ` [dpdk-dev] [PATCH v2] " Phil Yang
2020-04-23 17:45         ` Jerin Jacob
2020-04-24  4:49           ` Phil Yang
2020-04-23 18:10         ` Ananyev, Konstantin
2020-04-24  4:35           ` Phil Yang
2020-04-24  4:33         ` [dpdk-dev] [PATCH v3] " Phil Yang
2020-04-24 11:17           ` Ananyev, Konstantin
2020-05-09 21:51             ` Akhil Goyal
2020-03-17  1:17     ` [dpdk-dev] [PATCH v3 07/12] service: remove rte prefix from static functions Phil Yang
2020-04-03 11:57       ` Van Haaren, Harry
2020-04-08 10:14         ` Phil Yang
2020-04-08 10:36           ` Van Haaren, Harry
2020-04-08 10:49             ` Phil Yang
2020-04-05 21:35       ` Honnappa Nagarahalli
2020-04-08 10:14         ` Phil Yang
2020-04-23 16:31       ` [dpdk-dev] [PATCH v2 0/6] use c11 atomics for service core lib Phil Yang
2020-04-23 16:31         ` [dpdk-dev] [PATCH v2 1/6] service: fix race condition for MT unsafe service Phil Yang
2020-04-29 16:51           ` Van Haaren, Harry
2020-04-29 22:48             ` Honnappa Nagarahalli
2020-05-01 14:21               ` Van Haaren, Harry
2020-05-01 14:56                 ` Honnappa Nagarahalli
2020-05-01 17:51                   ` Van Haaren, Harry
2020-04-23 16:31         ` [dpdk-dev] [PATCH v2 2/6] service: identify service running on another core correctly Phil Yang
2020-04-23 16:31         ` [dpdk-dev] [PATCH v2 3/6] service: remove rte prefix from static functions Phil Yang
2020-04-23 16:31         ` [dpdk-dev] [PATCH v2 4/6] service: remove redundant code Phil Yang
2020-04-23 16:31         ` [dpdk-dev] [PATCH v2 5/6] service: optimize with c11 atomics Phil Yang
2020-04-23 16:31         ` [dpdk-dev] [PATCH v2 6/6] service: relax barriers with C11 atomics Phil Yang
2020-05-02  0:02         ` [dpdk-dev] [PATCH v3 0/6] use c11 atomics for service core lib Honnappa Nagarahalli
2020-05-02  0:02           ` [dpdk-dev] [PATCH v3 1/6] service: fix race condition for MT unsafe service Honnappa Nagarahalli
2020-05-05 14:48             ` Van Haaren, Harry
2020-05-02  0:02           ` [dpdk-dev] [PATCH v3 2/6] service: identify service running on another core correctly Honnappa Nagarahalli
2020-05-05 14:48             ` Van Haaren, Harry
2020-05-02  0:02           ` [dpdk-dev] [PATCH v3 3/6] service: remove rte prefix from static functions Honnappa Nagarahalli
2020-05-05 14:48             ` Van Haaren, Harry
2020-05-02  0:02           ` [dpdk-dev] [PATCH v3 4/6] service: remove redundant code Honnappa Nagarahalli
2020-05-05 14:48             ` Van Haaren, Harry
2020-05-02  0:02           ` [dpdk-dev] [PATCH v3 5/6] service: optimize with c11 atomics Honnappa Nagarahalli
2020-05-05 14:48             ` Van Haaren, Harry
2020-05-02  0:02           ` [dpdk-dev] [PATCH v3 6/6] service: relax barriers with C11 atomics Honnappa Nagarahalli
2020-05-05 14:48             ` Van Haaren, Harry
2020-05-05 21:17         ` [dpdk-dev] [PATCH v4 0/6] use c11 atomics for service core lib Honnappa Nagarahalli
2020-05-05 21:17           ` [dpdk-dev] [PATCH v4 1/6] service: fix race condition for MT unsafe service Honnappa Nagarahalli
2020-05-05 21:17           ` [dpdk-dev] [PATCH v4 2/6] service: fix identification of service running on other lcore Honnappa Nagarahalli
2020-05-05 21:17           ` [dpdk-dev] [PATCH v4 3/6] service: remove rte prefix from static functions Honnappa Nagarahalli
2020-05-05 21:17           ` [dpdk-dev] [PATCH v4 4/6] service: remove redundant code Honnappa Nagarahalli
2020-05-05 21:17           ` [dpdk-dev] [PATCH v4 5/6] service: optimize with c11 atomics Honnappa Nagarahalli
2020-05-06 10:20             ` Phil Yang
2020-05-05 21:17           ` [dpdk-dev] [PATCH v4 6/6] service: relax barriers with C11 atomics Honnappa Nagarahalli
2020-05-06 10:24           ` [dpdk-dev] [PATCH v5 0/6] use c11 atomics for service core lib Phil Yang
2020-05-06 10:24             ` [dpdk-dev] [PATCH v5 1/6] service: fix race condition for MT unsafe service Phil Yang
2020-05-06 10:24             ` [dpdk-dev] [PATCH v5 2/6] service: fix identification of service running on other lcore Phil Yang
2020-05-06 10:24             ` [dpdk-dev] [PATCH v5 3/6] service: remove rte prefix from static functions Phil Yang
2020-05-06 10:24             ` [dpdk-dev] [PATCH v5 4/6] service: remove redundant code Phil Yang
2020-05-06 10:24             ` [dpdk-dev] [PATCH v5 5/6] service: optimize with c11 atomics Phil Yang
2020-05-06 10:24             ` [dpdk-dev] [PATCH v5 6/6] service: relax barriers with C11 atomics Phil Yang
2020-05-06 15:27             ` [dpdk-dev] [PATCH v6 0/6] use c11 atomics for service core lib Phil Yang
2020-05-06 15:27               ` [dpdk-dev] [PATCH v6 1/6] service: fix race condition for MT unsafe service Phil Yang
2020-05-06 15:28               ` [dpdk-dev] [PATCH v6 2/6] service: fix identification of service running on other lcore Phil Yang
2020-05-06 15:28               ` [dpdk-dev] [PATCH v6 3/6] service: remove rte prefix from static functions Phil Yang
2020-05-06 15:28               ` [dpdk-dev] [PATCH v6 4/6] service: remove redundant code Phil Yang
2020-05-06 15:28               ` [dpdk-dev] [PATCH v6 5/6] service: optimize with c11 atomics Phil Yang
2020-05-06 15:28               ` [dpdk-dev] [PATCH v6 6/6] service: relax barriers with C11 atomics Phil Yang
2020-05-11 11:21               ` [dpdk-dev] [PATCH v6 0/6] use c11 atomics for service core lib David Marchand
2020-03-17  1:17     ` [dpdk-dev] [PATCH v3 08/12] service: remove redundant code Phil Yang
2020-04-03 11:58       ` Van Haaren, Harry
2020-04-05 18:35         ` Honnappa Nagarahalli
2020-04-08 10:15           ` Phil Yang
2020-03-17  1:17     ` [dpdk-dev] [PATCH v3 09/12] service: avoid race condition for MT unsafe service Phil Yang
2020-04-03 11:58       ` Van Haaren, Harry
2020-04-04 18:03         ` Honnappa Nagarahalli
2020-04-08 18:05           ` Van Haaren, Harry
2020-04-09  1:31             ` Honnappa Nagarahalli
2020-04-09 16:46               ` Van Haaren, Harry
2020-04-18  6:21                 ` Honnappa Nagarahalli
2020-04-21 17:43                   ` Van Haaren, Harry
2020-03-17  1:17     ` [dpdk-dev] [PATCH v3 10/12] service: identify service running on another core correctly Phil Yang
2020-04-03 11:58       ` Van Haaren, Harry
2020-04-05  2:43         ` Honnappa Nagarahalli
2020-03-17  1:17     ` [dpdk-dev] [PATCH v3 11/12] service: optimize with c11 one-way barrier Phil Yang
2020-04-03 11:58       ` Van Haaren, Harry
2020-04-06  4:22         ` Honnappa Nagarahalli
2020-04-08 10:15         ` Phil Yang
2020-03-17  1:17     ` [dpdk-dev] [PATCH v3 12/12] service: relax barriers with C11 atomic operations Phil Yang
2020-04-03 11:58       ` Van Haaren, Harry
2020-04-06 17:06         ` Honnappa Nagarahalli
2020-04-08 19:42           ` Van Haaren, Harry
2020-03-18 14:01     ` [dpdk-dev] [PATCH v3 00/12] generic rte atomic APIs deprecate proposal Van Haaren, Harry
2020-03-18 15:13       ` Thomas Monjalon
2020-03-20  5:01         ` Honnappa Nagarahalli
2020-03-20 12:20           ` Jerin Jacob
2020-03-20  4:51       ` Honnappa Nagarahalli
2020-03-20 18:32         ` Honnappa Nagarahalli
2020-03-27 14:47           ` Van Haaren, Harry
2020-04-03  7:23     ` Mattias Rönnblom
2020-05-12  8:03     ` [dpdk-dev] [PATCH v4 0/4] " Phil Yang
2020-05-12  8:03       ` [dpdk-dev] [PATCH v4 1/4] doc: add generic atomic deprecation section Phil Yang
2020-05-12  8:03       ` [dpdk-dev] [PATCH v4 2/4] maintainers: claim maintainers of c11 atomics code Phil Yang
2020-05-24 23:11         ` Thomas Monjalon
2020-05-25  3:28           ` Phil Yang
2020-05-12  8:03       ` [dpdk-dev] [PATCH v4 3/4] devtools: prevent use of rte atomic APIs in future patches Phil Yang
2020-05-12  8:03       ` [dpdk-dev] [PATCH v4 4/4] eal/atomic: add wrapper for c11 atomics Phil Yang
2020-05-12 11:18         ` Morten Brørup
2020-05-13  9:40           ` Phil Yang
2020-05-13 15:32             ` Honnappa Nagarahalli
2020-05-12 18:20         ` Stephen Hemminger
2020-05-12 19:23           ` Honnappa Nagarahalli
2020-05-13  8:57             ` Morten Brørup
2020-05-13 15:30               ` Honnappa Nagarahalli
2020-05-13 19:04               ` Mattias Rönnblom
2020-05-13 19:40                 ` Honnappa Nagarahalli
2020-05-13 20:17                   ` Mattias Rönnblom
2020-05-14  8:34                     ` Morten Brørup
2020-05-14 20:16                       ` Mattias Rönnblom
2020-05-14 21:00                         ` Honnappa Nagarahalli
2020-05-13 11:53             ` Ananyev, Konstantin
2020-05-13 15:06               ` Honnappa Nagarahalli
2020-05-13 19:25           ` Mattias Rönnblom
2020-05-12  8:18       ` [dpdk-dev] [PATCH v4 0/4] generic rte atomic APIs deprecate proposal Phil Yang
2020-05-26  9:01       ` [dpdk-dev] [PATCH v5 " Phil Yang
2020-05-26  9:01         ` [dpdk-dev] [PATCH v5 1/4] doc: add generic atomic deprecation section Phil Yang
2020-05-26  9:01         ` [dpdk-dev] [PATCH v5 2/4] maintainers: claim maintainers of c11 atomics code Phil Yang
2020-05-26  9:01         ` [dpdk-dev] [PATCH v5 3/4] devtools: prevent use of rte atomic APIs in future patches Phil Yang
2020-06-29  4:38           ` Honnappa Nagarahalli
2020-06-29  5:38             ` Phil Yang
2020-05-26  9:01         ` [dpdk-dev] [PATCH v5 4/4] eal/atomic: add wrapper for c11 atomic thread fence Phil Yang
2020-06-29  4:40           ` Honnappa Nagarahalli
2020-06-29 10:09             ` Ananyev, Konstantin
2020-06-29 14:37               ` Honnappa Nagarahalli
2020-06-29 10:13           ` Ananyev, Konstantin
2020-07-07  9:50         ` [dpdk-dev] [PATCH v6 0/4] generic rte atomic APIs deprecate proposal Phil Yang
2020-07-07  9:50           ` [dpdk-dev] [PATCH v6 1/4] doc: add generic atomic deprecation section Phil Yang
2020-07-10 16:55             ` Thomas Monjalon
2020-07-10 23:47               ` Honnappa Nagarahalli
2020-07-07  9:50           ` [dpdk-dev] [PATCH v6 2/4] maintainers: claim maintainers of C11 atomics Phil Yang
2020-07-10 17:45             ` Thomas Monjalon
2020-07-10 23:41               ` Honnappa Nagarahalli
2020-07-13  6:26                 ` Phil Yang
2020-07-07  9:50           ` [dpdk-dev] [PATCH v6 3/4] devtools: prevent use of rte atomic APIs in future patches Phil Yang
2020-07-07  9:50           ` [dpdk-dev] [PATCH v6 4/4] eal/atomic: add wrapper for C11 atomic thread fence Phil Yang
2020-07-13  6:23           ` [dpdk-dev] [PATCH v7 0/3] generic rte atomic APIs deprecate proposal Phil Yang
2020-07-13  6:23             ` [dpdk-dev] [PATCH v7 1/3] doc: add generic atomic deprecation section Phil Yang
2020-07-14 18:36               ` Honnappa Nagarahalli
2020-07-15  2:58                 ` Phil Yang
2020-07-13  6:23             ` [dpdk-dev] [PATCH v7 2/3] devtools: prevent use of rte atomic APIs in future patches Phil Yang
2020-07-13  6:23             ` [dpdk-dev] [PATCH v7 3/3] eal/atomic: add wrapper for C11 atomic thread fence Phil Yang
2020-07-16  4:53             ` [dpdk-dev] [PATCH v8 0/3] generic rte atomic APIs deprecate proposal Phil Yang
2020-07-16  4:53               ` [dpdk-dev] [PATCH v8 1/3] doc: add optimizations using C11 atomic built-ins Phil Yang
2020-07-16 10:35                 ` David Marchand
2020-07-16 18:22                 ` Honnappa Nagarahalli
2020-07-17  4:44                   ` Phil Yang
2020-07-16  4:53               ` [dpdk-dev] [PATCH v8 2/3] devtools: prevent use of rte atomic APIs in future patches Phil Yang
2020-07-16 10:48                 ` David Marchand
2020-07-16 11:31                   ` Thomas Monjalon
2020-07-16 16:37                     ` Phil Yang
2020-07-16 16:42                       ` Thomas Monjalon
2020-07-16 16:59                         ` Honnappa Nagarahalli
2020-07-16 21:45                           ` Stephen Hemminger
2020-07-17 22:48                             ` Honnappa Nagarahalli
2020-07-18  2:18                               ` Stephen Hemminger
2020-07-17  4:48                           ` Phil Yang
2020-07-16 15:07                   ` Phil Yang
2020-07-16  4:53               ` [dpdk-dev] [PATCH v8 3/3] eal/atomic: add wrapper for C11 atomic thread fence Phil Yang
2020-07-17  5:08               ` [dpdk-dev] [PATCH v9 0/3] generic rte atomic APIs deprecate proposal Phil Yang
2020-07-17  5:08                 ` [dpdk-dev] [PATCH v9 1/3] doc: add optimizations using C11 atomic builtins Phil Yang
2020-07-17  5:08                 ` [dpdk-dev] [PATCH v9 2/3] devtools: prevent use of rte atomic APIs in future patches Phil Yang
2020-07-17  8:35                   ` Thomas Monjalon
2020-07-17  9:41                     ` Phil Yang
2020-07-17  5:08                 ` [dpdk-dev] [PATCH v9 3/3] eal/atomic: add wrapper for C11 atomic thread fence Phil Yang
2020-07-17  8:48                   ` Thomas Monjalon
2020-07-17  8:53                     ` Phil Yang
2020-07-17 10:14                 ` [dpdk-dev] [PATCH v10 0/3] generic rte atomic APIs deprecate proposal Phil Yang
2020-07-17 10:14                   ` [dpdk-dev] [PATCH v10 1/3] doc: add optimizations using C11 atomic builtins Phil Yang
2020-07-17 10:14                   ` [dpdk-dev] [PATCH v10 2/3] eal/atomic: add wrapper for C11 atomic thread fence Phil Yang
2020-07-17 10:14                   ` [dpdk-dev] [PATCH v10 3/3] devtools: prevent use of rte atomic APIs in future patches Phil Yang
2020-07-17 13:58                   ` [dpdk-dev] [PATCH v10 0/3] generic rte atomic APIs deprecate proposal David Marchand
2020-07-20  7:06                     ` Phil Yang

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).