Skip to content

support multi-pthread per core

Cunming Liang dpdk-dev 8 versions – Applied

Status from this message: Applied, thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest19 patches 3 repliesApplied
  2. v719 patches 3 repliesSuperseded
  3. v619 patches 20 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v519 patches7 repliesSuperseded
v417 patches58 repliesSuperseded
v316 patches0 repliesSuperseded
v215 patches0 repliesSuperseded
v115 patches16 repliesSuperseded

Changes in v8 from the cover letter

keep using strlen for trusted input string

Patches in v8 Applied

#Subject and filesSizeRepliesApplied
1/19eal: add cpuset into per EAL thread lcore_configlib/librte_eal/bsdapp/eal/eal_lcore.c lib/librte_eal/common/include/rte_lcore.h lib/librte_eal/linuxapp/eal/Makefile +1 more+24 -00 replies
2/19eal: fix PAGE_SIZE redefine complaint on freebsdlib/librte_eal/bsdapp/eal/eal_memory.c+5 -30 replies
3/19eal: new eal option '--lcores' for cpu assignmentlib/librte_eal/common/eal_common_options.c lib/librte_eal/common/eal_options.h lib/librte_eal/linuxapp/eal/Makefile+303 -40 replies
4/19eal: fix wrong strnlen() return value in 32bit icclib/librte_eal/common/eal_common_options.c+3 -30 replies
5/19eal: add public function parsing socket_id from cpu_idlib/librte_eal/bsdapp/eal/eal_lcore.c lib/librte_eal/common/eal_thread.h lib/librte_eal/linuxapp/eal/eal_lcore.c+22 -30 replies
6/19eal: new TLS definition and API declarationlib/librte_eal/bsdapp/eal/eal_thread.c lib/librte_eal/bsdapp/eal/rte_eal_version.map lib/librte_eal/common/eal_thread.h +3 more+69 -10 replies
7/19eal: add eal_common_thread.c for common thread APIlib/librte_eal/bsdapp/eal/Makefile lib/librte_eal/common/eal_common_thread.c lib/librte_eal/linuxapp/eal/Makefile+153 -00 replies
8/19eal: standardize init sequence between linux and bsdlib/librte_eal/bsdapp/eal/eal.c+2 -20 replies
9/19eal: add rte_gettid() to acquire unique system tidlib/librte_eal/bsdapp/eal/eal_thread.c lib/librte_eal/common/include/rte_eal.h lib/librte_eal/linuxapp/eal/eal_thread.c+43 -00 replies
10/19eal: apply affinity of EAL thread by assigned cpusetlib/librte_eal/bsdapp/eal/eal.c lib/librte_eal/bsdapp/eal/eal_thread.c lib/librte_eal/common/include/rte_lcore.h +2 more+37 -1130 replies
11/19enic: fix re-define freebsd compile complainlib/librte_pmd_enic/enic.h lib/librte_pmd_enic/enic_compat.h lib/librte_pmd_enic/vnic/vnic_dev.c+6 -60 replies
12/19malloc: fix the issue of SOCKET_ID_ANYlib/librte_malloc/malloc_heap.h+6 -10 replies
13/19log: fix the gap to support non-EAL threadlib/librte_eal/common/eal_common_log.c lib/librte_eal/common/include/rte_log.h+20 -20 replies
14/19eal: set _lcore_id and _socket_id to (-1) by defaultlib/librte_eal/bsdapp/eal/eal_thread.c lib/librte_eal/common/include/rte_lcore.h lib/librte_eal/linuxapp/eal/eal_thread.c+6 -60 replies
15/19eal: fix recursive spinlock in non-EAL thraedlib/librte_eal/common/include/generic/rte_spinlock.h+2 -20 replies
16/19mempool: add support to non-EAL threadlib/librte_mempool/rte_mempool.h+11 -70 replies
17/19ring: add support to non-EAL threadlib/librte_ring/rte_ring.h+6 -40 replies
18/19ring: add sched_yield to avoid spin foreverconfig/common_bsdapp config/common_linuxapp lib/librte_ring/rte_ring.h+29 -40 replies
19/19timer: add support to non-EAL threadlib/librte_timer/rte_timer.c lib/librte_timer/rte_timer.h+25 -110 replies

Reviews trailers per patch

None of the 19 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchKonstantin Ananyev
SeriesA-b
1/19
2/19
3/19
4/19
5/19
6/19
7/19
8/19
9/19
10/19
11/19
12/19
13/19
14/19
15/19
16/19
17/19
18/19
19/19

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH v8 00/19] support multi-pthread per core

v8 changes:
keep using strlen for trusted input string

v7 changes:
update EAL version map for new public EAL API rollback to use strnlen() passing EAL core option

v6 changes:
rename RTE_RING_PAUSE_REP(_COUNT) and set default to 0 rollback to use RTE_MAX_LCORE when checking valid lcore_id for EAL thread

v5 changes:
reorder some patch and split into addtional two patches rte_thread_get_affinity() return type change to avoid add RTE_RING_PAUSE_REP into config and by default turn off

v4 changes:
new patch fixing strnlen() invalid return in 32bit icc [03/17] update and add more comments on sched_yield() [16/17]

v3 changes:
new patch adding sched_yield() in rte_ring to avoid long spin [16/17]

v2 changes:
add '<number>-<number>' support for EAL option '--lcores' [02/17]

The patch series contain the enhancements of EAL and fixes for libraries
to run multi-pthreads(either EAL or non-EAL thread) per physical core.
Two major changes list as below:
- Extend the core affinity of each EAL thread to 1:n.
Each lcore stands for a EAL thread rather than a logical core.
The change adds new EAL option to allow static lcore to cpuset assginment. Then a lcore(EAL thread) affinity to a cpuset, original 1:1 mapping is the special case.
- Fix the libraries to allow running on any non-EAL thread.
It fix the gaps running libraries in non-EAL thread(dynamic created by user). Each fix libraries take care the case of rte_lcore_id() >= RTE_MAX_LCORE.

Thanks a million for the comments from Konstantin, Bruce, Mirek and Stephen in RFC review.

Cunming Liang (19):
eal: add cpuset into per EAL thread lcore_config
eal: fix PAGE_SIZE redefine complaint on freebsd
eal: new eal option '--lcores' for cpu assignment
eal: fix wrong strnlen() return value in 32bit icc
eal: add public function parsing socket_id from cpu_id
eal: new TLS definition and API declaration
eal: add eal_common_thread.c for common thread API
eal: standardize init sequence between linux and bsd
eal: add rte_gettid() to acquire unique system tid
eal: apply affinity of EAL thread by assigned cpuset
enic: fix re-define freebsd compile complain
malloc: fix the issue of SOCKET_ID_ANY
log: fix the gap to support non-EAL thread
eal: set _lcore_id and _socket_id to (-1) by default
eal: fix recursive spinlock in non-EAL thraed
mempool: add support to non-EAL thread
ring: add support to non-EAL thread
ring: add sched_yield to avoid spin forever
timer: add support to non-EAL thread

 config/common_bsdapp                               |   1 +
 config/common_linuxapp                             |   1 +
 lib/librte_eal/bsdapp/eal/Makefile                 |   1 +
 lib/librte_eal/bsdapp/eal/eal.c                    |  14 +-
 lib/librte_eal/bsdapp/eal/eal_lcore.c              |  14 +
 lib/librte_eal/bsdapp/eal/eal_memory.c             |   8 +-
 lib/librte_eal/bsdapp/eal/eal_thread.c             |  77 ++----
 lib/librte_eal/bsdapp/eal/rte_eal_version.map      |   2 +
 lib/librte_eal/common/eal_common_log.c             |  17 +-
 lib/librte_eal/common/eal_common_options.c         | 308 ++++++++++++++++++++-
 lib/librte_eal/common/eal_common_thread.c          | 150 ++++++++++
 lib/librte_eal/common/eal_options.h                |   2 +
 lib/librte_eal/common/eal_thread.h                 |  47 ++++
 .../common/include/generic/rte_spinlock.h          |   4 +-
 lib/librte_eal/common/include/rte_eal.h            |  27 ++
 lib/librte_eal/common/include/rte_lcore.h          |  40 ++-
 lib/librte_eal/common/include/rte_log.h            |   5 +
 lib/librte_eal/linuxapp/eal/Makefile               |   4 +
 lib/librte_eal/linuxapp/eal/eal.c                  |   8 +-
 lib/librte_eal/linuxapp/eal/eal_lcore.c            |  15 +-
 lib/librte_eal/linuxapp/eal/eal_thread.c           |  77 ++----
 lib/librte_eal/linuxapp/eal/rte_eal_version.map    |   2 +
 lib/librte_malloc/malloc_heap.h                    |   7 +-
 lib/librte_mempool/rte_mempool.h                   |  18 +-
 lib/librte_pmd_enic/enic.h                         |   4 +-
 lib/librte_pmd_enic/enic_compat.h                  |   2 +-
 lib/librte_pmd_enic/vnic/vnic_dev.c                |   6 +-
 lib/librte_ring/rte_ring.h                         |  41 ++-
 lib/librte_timer/rte_timer.c                       |  32 ++-
 lib/librte_timer/rte_timer.h                       |   4 +-
 30 files changed, 769 insertions(+), 169 deletions(-)
 create mode 100644 lib/librte_eal/common/eal_common_thread.c
Signature · 1 line
1.8.1.4