From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id BBF138DA9 for ; Fri, 4 Dec 2015 11:34:32 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 04 Dec 2015 02:34:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,380,1444719600"; d="scan'208";a="7428423" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga004.fm.intel.com with ESMTP; 04 Dec 2015 02:34:30 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id tB4AYUSY017384; Fri, 4 Dec 2015 10:34:30 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id tB4AYTUE015140; Fri, 4 Dec 2015 10:34:29 GMT Received: (from ibetts@localhost) by sivswdev01.ir.intel.com with id tB4AYTPZ015136; Fri, 4 Dec 2015 10:34:29 GMT From: Ian Betts To: dev@dpdk.org Date: Fri, 4 Dec 2015 10:34:21 +0000 Message-Id: <1449225265-14480-1-git-send-email-ian.betts@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1449159683-7092-3-git-send-email-ian.betts@intel.com> References: <1449159683-7092-3-git-send-email-ian.betts@intel.com> Cc: Ian Betts Subject: [dpdk-dev] [PATCH v8 0/4] examples: add performance-thread X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 10:34:33 -0000 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 * remove ASM implementation of atomic64_xchg in favor of builtin __sync_lock_test_and_set() Ian Betts (4): doc: add sample application guide for performance-thread examples: add lthread subsystem forperformance-thread examples: add l3fwd-thread example in performance-thread examples: add pthread_shim example to performance thread config/defconfig_x86_64-native-linuxapp-gcc | 2 + config/defconfig_x86_64-native-linuxapp-icc | 2 + .../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 | 1 + examples/performance-thread/Makefile | 47 + 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 | 321 ++ examples/performance-thread/common/lthread_diag.h | 129 + .../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 | 160 + 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 | 714 ++++ .../performance-thread/pthread_shim/pthread_shim.h | 113 + 37 files changed, 13189 insertions(+) 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 -- 2.1.4