DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
* [dpdk-dev] [PATCH 0/7] Register external threads as lcore
@ 2020-06-10 14:44 David Marchand
  2020-06-10 14:45 ` [dpdk-dev] [PATCH 1/7] eal: relocate per thread symbols to common David Marchand
                   ` (12 more replies)
  0 siblings, 13 replies; 126+ messages in thread
From: David Marchand @ 2020-06-10 14:44 UTC (permalink / raw)
  To: dev

OVS and some other applications have been hacking into DPDK internals to
fake EAL threads and avoid performance penalty of only having non-EAL
threads.

This series proposes to add a new type of lcores and maps those external
threads to such lcores.
Those threads won't run the DPDK eal mainloop and as a consequence part of
the EAL threads API cannot work.

Having new lcores appearing during the process lifetime is not expected
by some DPDK components. This is addressed by notifying of such lcore
hotplug.

This patchset has still some more work (like refusing new lcore type in
incompatible EAL threads API, updating the documentation and adding unit
tests) but I am sending it anyway as I would like to get this in for
20.08.

For the interested parties, I have a patch [1] against dpdk-latest OVS
branch that makes use of this series.

1: https://github.com/david-marchand/ovs/commit/dpdk-latest-external-lcores

-- 
David Marchand

David Marchand (7):
  eal: relocate per thread symbols to common
  eal: fix multiple definition of per lcore thread id
  eal: introduce thread init helper
  eal: introduce thread uninit helper
  eal: register non-EAL threads as lcore
  eal: dump lcores
  eal: add lcore hotplug notifications

 doc/guides/howto/debug_troubleshoot.rst   |   5 +-
 lib/librte_eal/common/eal_common_lcore.c  | 167 +++++++++++++++++++++-
 lib/librte_eal/common/eal_common_thread.c | 143 ++++++++++++++----
 lib/librte_eal/common/eal_common_trace.c  |  49 ++++++-
 lib/librte_eal/common/eal_private.h       |  43 ++++++
 lib/librte_eal/common/eal_thread.h        |  26 +++-
 lib/librte_eal/common/eal_trace.h         |   1 +
 lib/librte_eal/freebsd/eal.c              |  16 ++-
 lib/librte_eal/freebsd/eal_thread.c       |  38 +----
 lib/librte_eal/include/rte_eal.h          |  12 +-
 lib/librte_eal/include/rte_lcore.h        | 112 +++++++++++++--
 lib/librte_eal/linux/eal.c                |  17 ++-
 lib/librte_eal/linux/eal_thread.c         |  38 +----
 lib/librte_eal/rte_eal_version.map        |  14 ++
 lib/librte_eal/windows/eal.c              |   3 +-
 lib/librte_eal/windows/eal_thread.c       |  14 +-
 16 files changed, 536 insertions(+), 162 deletions(-)

-- 
2.23.0


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