DPDK patches and discussions
 help / color / mirror / Atom feed
From: ibetts <ian.betts@intel.com>
To: dev@dpdk.org
Cc: Ian Betts <ian.betts@intel.com>
Subject: [dpdk-dev] [PATCH v1 0/5] examples: add performance thread example
Date: Wed, 30 Sep 2015 15:29:43 +0100	[thread overview]
Message-ID: <1443623388-29104-1-git-send-email-ian.betts@intel.com> (raw)

From: Ian Betts <ian.betts@intel.com>

Performance thread example application
 
This example comprises 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.

A simple pthread shim in the form of a hello world example is also
included.


Ian Betts (5):
  doc: add performance-thread sample application guide
  examples: add cooperative scheduler subsytem for performance-thread
    app
  examples: add l3fwd-thread in performance-thread sample app
  examples: add pthread-shim in performance-thread sample app
  config: add build files for performance-thread-app

 config/common_linuxapp                             |    6 +
 config/defconfig_i686-native-linuxapp-gcc          |    6 +
 config/defconfig_i686-native-linuxapp-icc          |    6 +
 config/defconfig_x86_x32-native-linuxapp-gcc       |    6 +
 doc/guides/rel_notes/release_2_2.rst               |    6 +
 doc/guides/sample_app_ug/index.rst                 |    1 +
 doc/guides/sample_app_ug/performance_thread.rst    | 1221 +++++++
 examples/Makefile                                  |    1 +
 .../performance-thread/common/arch/x86/atomic.h    |   60 +
 examples/performance-thread/common/arch/x86/ctx.c  |   66 +
 examples/performance-thread/common/arch/x86/ctx.h  |   57 +
 examples/performance-thread/common/common.mk       |   40 +
 examples/performance-thread/common/lthread.c       |  528 +++
 examples/performance-thread/common/lthread.h       |   99 +
 examples/performance-thread/common/lthread_api.h   |  822 +++++
 examples/performance-thread/common/lthread_cond.c  |  228 ++
 examples/performance-thread/common/lthread_cond.h  |   77 +
 examples/performance-thread/common/lthread_diag.c  |  315 ++
 examples/performance-thread/common/lthread_diag.h  |  129 +
 .../performance-thread/common/lthread_diag_api.h   |  295 ++
 examples/performance-thread/common/lthread_int.h   |  212 ++
 examples/performance-thread/common/lthread_mutex.c |  244 ++
 examples/performance-thread/common/lthread_mutex.h |   52 +
 .../performance-thread/common/lthread_objcache.h   |  160 +
 examples/performance-thread/common/lthread_pool.h  |  338 ++
 examples/performance-thread/common/lthread_queue.h |  303 ++
 examples/performance-thread/common/lthread_sched.c |  644 ++++
 examples/performance-thread/common/lthread_sched.h |  152 +
 examples/performance-thread/common/lthread_timer.h |   47 +
 examples/performance-thread/common/lthread_tls.c   |  242 ++
 examples/performance-thread/common/lthread_tls.h   |   64 +
 examples/performance-thread/l3fwd-thread/Makefile  |   57 +
 examples/performance-thread/l3fwd-thread/main.c    | 3355 ++++++++++++++++++++
 examples/performance-thread/pthread_shim/Makefile  |   61 +
 examples/performance-thread/pthread_shim/main.c    |  287 ++
 .../performance-thread/pthread_shim/pthread_shim.c |  717 +++++
 .../performance-thread/pthread_shim/pthread_shim.h |  113 +
 37 files changed, 11017 insertions(+)
 create mode 100644 doc/guides/sample_app_ug/performance_thread.rst
 create mode 100644 examples/performance-thread/common/arch/x86/atomic.h
 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 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

-- 
1.9.3

             reply	other threads:[~2015-09-30 14:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 14:29 ibetts [this message]
2015-09-30 14:29 ` [dpdk-dev] [PATCH v1 1/5] doc: add performance-thread sample application guide ibetts
2015-09-30 14:29 ` [dpdk-dev] [PATCH v1 2/5] examples: add cooperative scheduler subsytem for performance-thread app ibetts
2015-09-30 14:29 ` [dpdk-dev] [PATCH v1 3/5] examples: add l3fwd-thread in performance-thread sample app ibetts
2015-09-30 14:29 ` [dpdk-dev] [PATCH v1 4/5] examples: add pthread-shim " ibetts
2015-09-30 14:29 ` [dpdk-dev] [PATCH v1 5/5] config: add build files for performance-thread ibetts

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=1443623388-29104-1-git-send-email-ian.betts@intel.com \
    --to=ian.betts@intel.com \
    --cc=dev@dpdk.org \
    /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).