Skip to content

examples: add performance-thread

Ian Betts dpdk-dev 10 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest4 patches 4 repliesIn review
  2. v94 patches 4 repliesSuperseded
  3. v84 patches 13 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v74 patches1 replySuperseded
v64 patches1 replySuperseded
v54 patches6 repliesSuperseded
v42 patches0 repliesSuperseded
v32 patches4 repliesSuperseded
v25 patches2 repliesSuperseded
v15 patches0 repliesSuperseded

Patches in v10 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4doc: add sample application guide for performance-threaddoc/guides/sample_app_ug/img/performance_thread_1.svg doc/guides/sample_app_ug/img/performance_thread_2.svg doc/guides/sample_app_ug/index.rst +1 more+2928 -00 replies
2/4examples: add lthread subsystem for performance-threadexamples/performance-thread/common/arch/x86/ctx.c examples/performance-thread/common/arch/x86/ctx.h examples/performance-thread/common/common.mk +19 more+5195 -00 replies
3/4examples: add l3fwd-thread example in performance-threadMAINTAINERS examples/Makefile examples/performance-thread/Makefile +3 more+3897 -10 replies
4/4examples: add pthread_shim example to performance threadexamples/performance-thread/Makefile examples/performance-thread/pthread_shim/Makefile examples/performance-thread/pthread_shim/main.c +2 more+1172 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v10 yet.

Read the v10 thread

Cover letter [PATCH v10 0/4] examples: add performance-thread

This patchset comprises a layer 3 forwarding derivative intended to facilitate characterization of performance with different threading models, specifically:-

1. EAL threads running on different physical cores
2. EAL threads running on the same physical core
3. Lightweight threads running in an EAL thread

Purpose and justification

Since dpdk 2.0 it has been possible to assign multiple EAL threads to a physical core ( case 2 above ).
Currently no example application has focused on demonstrating the performance constraints of differing threading models.

Whilst purpose built applications that fully comprehend the DPDK single threaded programming model will always yield superior performance, the desire to preserve ROI in legacy code written for multithreaded operating environments makes lightweight threads (case 3 above) worthy of consideration.

As well as aiding with legacy code reuse, it is anticipated that lightweight threads will make it possible to scale a multithreaded application with fine granularity allowing an application to more easily take advantage of headroom on EAL cores, or conversely occupy more cores, as dictated by system load.

To explore performance with lightweight threads a simple cooperative scheduler subsystem is being included in this example application. If the expected benefits and use cases prove to be of value, it is anticipated that this lightweight thread subsystem would become a library in some future DPDK release.

Changes in this version
* fix clang errors
* remove superflous entry in maintainers file
* use DIRS-y in examples/Makefile

Ian Betts (4):
doc: add sample application guide for performance-thread
examples: add lthread subsystem for performance-thread
examples: add l3fwd-thread example in performance-thread
examples: add pthread_shim example to performance thread

 MAINTAINERS                                        |    4 +
 .../sample_app_ug/img/performance_thread_1.svg     |  799 +++++
 .../sample_app_ug/img/performance_thread_2.svg     |  865 +++++
 doc/guides/sample_app_ug/index.rst                 |    1 +
 doc/guides/sample_app_ug/performance_thread.rst    | 1263 +++++++
 examples/Makefile                                  |    4 +-
 examples/performance-thread/Makefile               |   45 +
 examples/performance-thread/common/arch/x86/ctx.c  |   93 +
 examples/performance-thread/common/arch/x86/ctx.h  |   57 +
 examples/performance-thread/common/common.mk       |   42 +
 examples/performance-thread/common/lthread.c       |  530 +++
 examples/performance-thread/common/lthread.h       |   99 +
 examples/performance-thread/common/lthread_api.h   |  829 +++++
 examples/performance-thread/common/lthread_cond.c  |  240 ++
 examples/performance-thread/common/lthread_cond.h  |   77 +
 examples/performance-thread/common/lthread_diag.c  |  324 ++
 examples/performance-thread/common/lthread_diag.h  |  132 +
 .../performance-thread/common/lthread_diag_api.h   |  319 ++
 examples/performance-thread/common/lthread_int.h   |  212 ++
 examples/performance-thread/common/lthread_mutex.c |  255 ++
 examples/performance-thread/common/lthread_mutex.h |   52 +
 .../performance-thread/common/lthread_objcache.h   |  158 +
 examples/performance-thread/common/lthread_pool.h  |  332 ++
 examples/performance-thread/common/lthread_queue.h |  302 ++
 examples/performance-thread/common/lthread_sched.c |  600 ++++
 examples/performance-thread/common/lthread_sched.h |  152 +
 examples/performance-thread/common/lthread_timer.h |   79 +
 examples/performance-thread/common/lthread_tls.c   |  254 ++
 examples/performance-thread/common/lthread_tls.h   |   57 +
 examples/performance-thread/l3fwd-thread/Makefile  |   57 +
 examples/performance-thread/l3fwd-thread/main.c    | 3641 ++++++++++++++++++++
 examples/performance-thread/l3fwd-thread/test.sh   |  149 +
 examples/performance-thread/pthread_shim/Makefile  |   60 +
 examples/performance-thread/pthread_shim/main.c    |  284 ++
 .../performance-thread/pthread_shim/pthread_shim.c |  713 ++++
 .../performance-thread/pthread_shim/pthread_shim.h |  113 +
 36 files changed, 13192 insertions(+), 1 deletion(-)
 create mode 100644 doc/guides/sample_app_ug/img/performance_thread_1.svg
 create mode 100644 doc/guides/sample_app_ug/img/performance_thread_2.svg
 create mode 100644 doc/guides/sample_app_ug/performance_thread.rst
 create mode 100644 examples/performance-thread/Makefile
 create mode 100644 examples/performance-thread/common/arch/x86/ctx.c
 create mode 100644 examples/performance-thread/common/arch/x86/ctx.h
 create mode 100644 examples/performance-thread/common/common.mk
 create mode 100644 examples/performance-thread/common/lthread.c
 create mode 100644 examples/performance-thread/common/lthread.h
 create mode 100644 examples/performance-thread/common/lthread_api.h
 create mode 100644 examples/performance-thread/common/lthread_cond.c
 create mode 100644 examples/performance-thread/common/lthread_cond.h
 create mode 100644 examples/performance-thread/common/lthread_diag.c
 create mode 100644 examples/performance-thread/common/lthread_diag.h
 create mode 100644 examples/performance-thread/common/lthread_diag_api.h
 create mode 100644 examples/performance-thread/common/lthread_int.h
 create mode 100644 examples/performance-thread/common/lthread_mutex.c
 create mode 100644 examples/performance-thread/common/lthread_mutex.h
 create mode 100644 examples/performance-thread/common/lthread_objcache.h
 create mode 100644 examples/performance-thread/common/lthread_pool.h
 create mode 100644 examples/performance-thread/common/lthread_queue.h
 create mode 100644 examples/performance-thread/common/lthread_sched.c
 create mode 100644 examples/performance-thread/common/lthread_sched.h
 create mode 100644 examples/performance-thread/common/lthread_timer.h
 create mode 100644 examples/performance-thread/common/lthread_tls.c
 create mode 100644 examples/performance-thread/common/lthread_tls.h
 create mode 100644 examples/performance-thread/l3fwd-thread/Makefile
 create mode 100644 examples/performance-thread/l3fwd-thread/main.c
 create mode 100755 examples/performance-thread/l3fwd-thread/test.sh
 create mode 100644 examples/performance-thread/pthread_shim/Makefile
 create mode 100644 examples/performance-thread/pthread_shim/main.c
 create mode 100644 examples/performance-thread/pthread_shim/pthread_shim.c
 create mode 100644 examples/performance-thread/pthread_shim/pthread_shim.h
Signature · 1 line
2.1.4