examples: add performance-thread
v7 cover 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 copyright dates
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
config/defconfig_x86_64-native-linuxapp-gcc | 3 + config/defconfig_x86_64-native-linuxapp-icc | 3 + .../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 | 46 + .../performance-thread/common/arch/x86/atomic.h | 59 + 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 | 241 ++ 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 | 256 ++ examples/performance-thread/common/lthread_mutex.h | 52 + .../performance-thread/common/lthread_objcache.h | 160 + examples/performance-thread/common/lthread_pool.h | 333 ++ examples/performance-thread/common/lthread_queue.h | 303 ++ examples/performance-thread/common/lthread_sched.c | 600 ++++ examples/performance-thread/common/lthread_sched.h | 152 + examples/performance-thread/common/lthread_timer.h | 78 + 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 | 150 + 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 + 38 files changed, 13253 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/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 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
PATCH v7 1/4 doc: add sample application guide for performance-thread
This commit adds the sample application user guide for the performance thread sample application.
--- .../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 ++++++++++++++++++++ 4 files changed, 2928 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
doc/guides/sample_app_ug/img/performance_thread_1.svg new file +799 -0
@@ -0,0 +1,799 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="449.57141" + height="187.34319" + viewBox="0 0 449.57143 187.34319" + id="svg2" + version="1.1" + inkscape:version="0.48.3.1 r9886" + sodipodi:docname="performance_thread_1.svg" + inkscape:export-filename="C:\Users\tkulasex\Documents\L-threads\model-v2.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4"> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11487" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path11489" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker11285" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path11287" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker11107" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path11109" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10757" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10759" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10421" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10423" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10273" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10275" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker9983" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path9985" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker9853" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path9855" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lend-6" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path4248-0" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker4992-4" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path4994-2" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Mend-1" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path4254-1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker4992-4-0" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path4994-2-9" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lend-6-8" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path4248-0-3" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker5952-2" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path5954-4" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker5952-2-1" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path5954-4-2" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker6881-5" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path6883-0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-3" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-4" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-3-0" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-4-2" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-3-0-4" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-4-2-4" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-3-1" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-4-6" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10119-2" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend" + inkscape:collect="always"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10121-6" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11487-0" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path11489-6" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10585" + style="overflow:visible" + inkscape:isstock="true" + inkscape:collect="always"> + <path + id="path10587" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10273-9" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10275-3" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10421-3" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10423-1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-2" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-5" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10119" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend" + inkscape:collect="always"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10121" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10923" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend" + inkscape:collect="always"> + <path + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10925" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10757-4" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10759-3" + inkscape:connector-curvature="0" /> + </marker> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.4" + inkscape:cx="138.23152" + inkscape:cy="-30.946457" + inkscape:document-units="px" + inkscape:current-layer="g4142-7" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:window-width="1920" + inkscape:window-height="1148" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1" + width="744.09px" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-40.428564,-78.569476)"> + <g + transform="translate(7.9156519e-7,106.78572)" + id="g4142-7"> + <g + transform="translate(162.14285,0.35714094)" + id="g4177-1"> + <g + transform="translate(-160.49999,-56.592401)" + id="g4142-55-1"> + <rect + y="43.076488" + x="39.285713" + height="65" + width="38.57143" + id="rect4136-65-2" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" /> + <text + transform="matrix(0,-1,1,0,0,0)" + sodipodi:linespacing="125%" + id="text4138-4-8" + y="62.447506" + x="-95.515633" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="62.447506" + x="-95.515633" + id="tspan4140-2-4" + sodipodi:role="line">Port 1</tspan></text> + </g> + <rect + y="93.269798" + x="-121.21429" + height="65" + width="38.57143" + id="rect4136-8-3-7" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 1.00000002;stroke-dashoffset:0" /> + <text + transform="matrix(0,-1,1,0,0,0)" + sodipodi:linespacing="125%" + id="text4138-8-7-3" + y="-98.052498" + x="-145.70891" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="-98.052498" + x="-145.70891" + id="tspan4140-5-8-3" + sodipodi:role="line">Port 2</tspan></text> + <g + transform="translate(-158.35713,1.6218895)" + id="g4177-7-6"> + <rect + y="1.2907723" + x="132.85715" + height="46.42857" + width="94.285713" + id="rect4171-1-9" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" /> + <text + sodipodi:linespacing="125%" + id="text4173-0-0" + y="29.147915" + x="146.42856" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="29.147915" + x="146.42856" + id="tspan4175-6-1" + sodipodi:role="line">rx-thread</tspan></text> + </g> + <text + xml:space="preserve" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + x="86.642853" + y="78.626976" + id="text5627-0-5" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5629-8-6" + x="86.642853" + y="78.626976">rings</tspan></text> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10757)" + d="m -83.357144,17.912679 56.42858,4.28571" + id="path4239-3-5" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10923)" + d="m -82.808124,125.71821 53.57145,-9.28573" + id="path4239-0-3-6" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 2.00000004;stroke-dashoffset:0;marker-end:url(#marker10119)" + d="m 68.78571,29.341249 62.5,28.21429" + id="path5457-1-2" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <g + transform="translate(-161.92858,95.100119)" + id="g4177-7-6-7"> + <rect + y="1.2907723" + x="132.85715" + height="46.42857" + width="94.285713" + id="rect4171-1-9-8" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" /> + <text + sodipodi:linespacing="125%" + id="text4173-0-0-6" + y="29.147915" + x="146.42856" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="29.147915" + x="146.42856" + id="tspan4175-6-1-8" + sodipodi:role="line">rx-thread</tspan></text> + </g> + <g + transform="translate(249.5,-71.149881)" + id="g4142-5-1-2"> + <rect + y="43.076488" + x="39.285713" + height="65" + width="38.57143" + id="rect4136-6-5-3" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" /> + <text + transform="matrix(0,-1,1,0,0,0)" + sodipodi:linespacing="125%" + id="text4138-3-3-5" + y="62.447506" + x="-95.515633" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="62.447506" + x="-95.515633" + id="tspan4140-7-3-5" + sodipodi:role="line">Port 1</tspan></text> + </g> + <rect + y="74.426659" + x="288.07141" + height="65" + width="38.57143" + id="rect4136-8-4-7-7" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 1.00000002;stroke-dashoffset:0" /> + <text + transform="matrix(0,-1,1,0,0,0)" + sodipodi:linespacing="125%" + id="text4138-8-2-5-8" + y="311.23318" + x="-126.86578" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="311.23318" + x="-126.86578" + id="tspan4140-5-4-9-6" + sodipodi:role="line">Port 2</tspan></text> + <g + id="g5905-4" + transform="translate(-1.2142913,-215.16774)"> + <rect + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" + id="rect4171-9-0-0" + width="94.285713" + height="46.42857" + x="132.85715" + y="250.48721" /> + <text + xml:space="preserve" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + x="146.42856" + y="278.34433" + id="text4173-9-2-6" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4175-0-7-3" + x="146.42856" + y="278.34433">tx-thread</tspan></text> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10431)" + d="M 226.28573,52.462339 287.7143,2.8194795" + id="path4984-4-07" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10421)" + d="m 227.09388,122.75669 60.35714,9.64286" + id="path4984-1-6-8" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <g + id="g5905-6-0" + transform="translate(0.21427875,-156.1499)"> + <rect + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" + id="rect4171-9-0-9-1" + width="94.285713" + height="46.42857" + x="132.85715" + y="250.48721" /> + <text + xml:space="preserve" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + x="146.42856" + y="278.34433" + id="text4173-9-2-0-0" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4175-0-7-7-8" + x="146.42856" + y="278.34433">tx-thread</tspan></text> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10273)" + d="m 227.19687,67.801919 58.92857,41.071411" + id="path4984-4-0-4" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10585)" + d="M 227.30382,110.24508 286.94667,24.530799" + id="path4984-4-0-0-7" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 2.00000004;stroke-dashoffset:0;marker-end:url(#marker11487)" + d="m 66.28572,118.8909 65.71429,-2.14285" + id="path5457-1-2-8" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <g + id="g5905-4-6" + transform="translate(-3.5000113,-277.43173)"> + <rect + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" + id="rect4171-9-0-0-7" + width="94.285713" + height="46.42857" + x="132.85715" + y="250.48721" /> + <text + xml:space="preserve" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + x="146.42856" + y="278.34433" + id="text4173-9-2-6-8" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4175-0-7-3-5" + x="146.42856" + y="278.34433">tx-thread</tspan></text> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 2.00000004;stroke-dashoffset:0;marker-end:url(#marker10119-2)" + d="M 68.35772,16.118199 127.64343,-6.3818105" + id="path5457-1-2-2" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10431-3)" + d="m 224.52079,-13.531251 64.28571,2.14286" + id="path4984-4-07-4" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10431-3-0)" + d="M 224.17025,2.1505695 287.02739,87.864849" + id="path4984-4-07-4-7" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + </g> + </g> + </g> +</svg>
doc/guides/sample_app_ug/img/performance_thread_2.svg new file +865 -0
865 lines not on this page · raw message
doc/guides/sample_app_ug/index.rst +1 -0
@@ -75,6 +75,7 @@ Sample Applications User Guide tep_termination proc_info ptpclient + performance_thread **Figures**
doc/guides/sample_app_ug/performance_thread.rst new file +1263 -0
1,263 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v7 2/4 examples: add lthread subsystem for performance-thread
In reply to Ian BettsThis commit adds the lightweight thread subsystem used by the performance-thread sample applications.
--- .../performance-thread/common/arch/x86/atomic.h | 59 ++ 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 | 241 ++++++ 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 | 256 +++++++ examples/performance-thread/common/lthread_mutex.h | 52 ++ .../performance-thread/common/lthread_objcache.h | 160 ++++ examples/performance-thread/common/lthread_pool.h | 333 +++++++++ examples/performance-thread/common/lthread_queue.h | 303 ++++++++ examples/performance-thread/common/lthread_sched.c | 600 +++++++++++++++ examples/performance-thread/common/lthread_sched.h | 152 ++++ examples/performance-thread/common/lthread_timer.h | 78 ++ examples/performance-thread/common/lthread_tls.c | 254 +++++++ examples/performance-thread/common/lthread_tls.h | 57 ++ 23 files changed, 5253 insertions(+) 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
examples/performance-thread/common/arch/x86/atomic.h new file +59 -0
@@ -0,0 +1,59 @@ +/* +*- +* BSD LICENSE +* +* Copyright(c) 2015 Intel Corporation. All rights reserved. +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of Intel Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef ATOMIC_H_ +#define ATOMIC_H_ + +#include <stdint.h> + +/* +* Atomically set a value and return the old value +*/ +static inline uint64_t +atomic64_xchg (uint64_t *ptr,uint64_t val) __attribute__ ((always_inline)); +static inline uint64_t +atomic64_xchg (uint64_t *ptr,uint64_t val) +{ + asmvolatile ( +"lock;" +"xchgq %0,%1;" + :"=r" ((uint64_t ) val) + :"m" (*(uint64_t *) ptr),"0" (val) + :"memory" ); + +return val; +} + + +#endif /* ATOMIC_H_ */
examples/performance-thread/common/arch/x86/ctx.c new file +93 -0
93 lines not on this page · raw message
examples/performance-thread/common/arch/x86/ctx.h new file +57 -0
57 lines not on this page · raw message
examples/performance-thread/common/common.mk new file +42 -0
42 lines not on this page · raw message
examples/performance-thread/common/lthread.c new file +530 -0
530 lines not on this page · raw message
examples/performance-thread/common/lthread.h new file +99 -0
99 lines not on this page · raw message
examples/performance-thread/common/lthread_api.h new file +829 -0
829 lines not on this page · raw message
examples/performance-thread/common/lthread_cond.c new file +240 -0
240 lines not on this page · raw message
examples/performance-thread/common/lthread_cond.h new file +77 -0
77 lines not on this page · raw message
examples/performance-thread/common/lthread_diag.c new file +321 -0
321 lines not on this page · raw message
examples/performance-thread/common/lthread_diag.h new file +129 -0
129 lines not on this page · raw message
examples/performance-thread/common/lthread_diag_api.h new file +319 -0
319 lines not on this page · raw message
examples/performance-thread/common/lthread_int.h new file +212 -0
205 lines not on this page · raw message
examples/performance-thread/common/lthread_mutex.c new file +255 -0
255 lines not on this page · raw message
examples/performance-thread/common/lthread_mutex.h new file +52 -0
52 lines not on this page · raw message
examples/performance-thread/common/lthread_objcache.h new file +160 -0
160 lines not on this page · raw message
examples/performance-thread/common/lthread_pool.h new file +333 -0
333 lines not on this page · raw message
examples/performance-thread/common/lthread_queue.h new file +303 -0
303 lines not on this page · raw message
examples/performance-thread/common/lthread_sched.c new file +600 -0
600 lines not on this page · raw message
examples/performance-thread/common/lthread_sched.h new file +152 -0
152 lines not on this page · raw message
examples/performance-thread/common/lthread_timer.h new file +78 -0
78 lines not on this page · raw message
examples/performance-thread/common/lthread_tls.c new file +254 -0
254 lines not on this page · raw message
examples/performance-thread/common/lthread_tls.h new file +57 -0
57 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.1.4
Part of the diff is not shown here. View the raw message.
v8 cover 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
* 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
Signature · 1 line
2.1.4
PATCH v8 1/4 doc: add sample application guide for performance-thread
This commit adds the sample application user guide for the performance thread sample application.
--- .../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 ++++++++++++++++++++ 4 files changed, 2928 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
doc/guides/sample_app_ug/img/performance_thread_1.svg new file +799 -0
@@ -0,0 +1,799 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="449.57141" + height="187.34319" + viewBox="0 0 449.57143 187.34319" + id="svg2" + version="1.1" + inkscape:version="0.48.3.1 r9886" + sodipodi:docname="performance_thread_1.svg" + inkscape:export-filename="C:\Users\tkulasex\Documents\L-threads\model-v2.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4"> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11487" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path11489" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker11285" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path11287" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker11107" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path11109" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10757" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10759" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10421" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10423" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10273" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10275" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker9983" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path9985" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker9853" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path9855" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lend-6" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path4248-0" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker4992-4" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path4994-2" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Mend-1" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path4254-1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker4992-4-0" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path4994-2-9" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lend-6-8" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path4248-0-3" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker5952-2" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path5954-4" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker5952-2-1" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path5954-4-2" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker6881-5" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path6883-0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-3" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-4" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-3-0" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-4-2" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-3-0-4" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-4-2-4" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-3-1" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-4-6" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10119-2" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend" + inkscape:collect="always"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10121-6" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11487-0" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path11489-6" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10585" + style="overflow:visible" + inkscape:isstock="true" + inkscape:collect="always"> + <path + id="path10587" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10273-9" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10275-3" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10421-3" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10423-1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-2" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-5" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10119" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend" + inkscape:collect="always"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10121" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10923" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend" + inkscape:collect="always"> + <path + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10925" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10757-4" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10759-3" + inkscape:connector-curvature="0" /> + </marker> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.4" + inkscape:cx="138.23152" + inkscape:cy="-30.946457" + inkscape:document-units="px" + inkscape:current-layer="g4142-7" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:window-width="1920" + inkscape:window-height="1148" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1" + width="744.09px" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-40.428564,-78.569476)"> + <g + transform="translate(7.9156519e-7,106.78572)" + id="g4142-7"> + <g + transform="translate(162.14285,0.35714094)" + id="g4177-1"> + <g + transform="translate(-160.49999,-56.592401)" + id="g4142-55-1"> + <rect + y="43.076488" + x="39.285713" + height="65" + width="38.57143" + id="rect4136-65-2" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" /> + <text + transform="matrix(0,-1,1,0,0,0)" + sodipodi:linespacing="125%" + id="text4138-4-8" + y="62.447506" + x="-95.515633" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="62.447506" + x="-95.515633" + id="tspan4140-2-4" + sodipodi:role="line">Port 1</tspan></text> + </g> + <rect + y="93.269798" + x="-121.21429" + height="65" + width="38.57143" + id="rect4136-8-3-7" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 1.00000002;stroke-dashoffset:0" /> + <text + transform="matrix(0,-1,1,0,0,0)" + sodipodi:linespacing="125%" + id="text4138-8-7-3" + y="-98.052498" + x="-145.70891" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="-98.052498" + x="-145.70891" + id="tspan4140-5-8-3" + sodipodi:role="line">Port 2</tspan></text> + <g + transform="translate(-158.35713,1.6218895)" + id="g4177-7-6"> + <rect + y="1.2907723" + x="132.85715" + height="46.42857" + width="94.285713" + id="rect4171-1-9" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" /> + <text + sodipodi:linespacing="125%" + id="text4173-0-0" + y="29.147915" + x="146.42856" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="29.147915" + x="146.42856" + id="tspan4175-6-1" + sodipodi:role="line">rx-thread</tspan></text> + </g> + <text + xml:space="preserve" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + x="86.642853" + y="78.626976" + id="text5627-0-5" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5629-8-6" + x="86.642853" + y="78.626976">rings</tspan></text> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10757)" + d="m -83.357144,17.912679 56.42858,4.28571" + id="path4239-3-5" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10923)" + d="m -82.808124,125.71821 53.57145,-9.28573" + id="path4239-0-3-6" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 2.00000004;stroke-dashoffset:0;marker-end:url(#marker10119)" + d="m 68.78571,29.341249 62.5,28.21429" + id="path5457-1-2" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <g + transform="translate(-161.92858,95.100119)" + id="g4177-7-6-7"> + <rect + y="1.2907723" + x="132.85715" + height="46.42857" + width="94.285713" + id="rect4171-1-9-8" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" /> + <text + sodipodi:linespacing="125%" + id="text4173-0-0-6" + y="29.147915" + x="146.42856" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="29.147915" + x="146.42856" + id="tspan4175-6-1-8" + sodipodi:role="line">rx-thread</tspan></text> + </g> + <g + transform="translate(249.5,-71.149881)" + id="g4142-5-1-2"> + <rect + y="43.076488" + x="39.285713" + height="65" + width="38.57143" + id="rect4136-6-5-3" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" /> + <text + transform="matrix(0,-1,1,0,0,0)" + sodipodi:linespacing="125%" + id="text4138-3-3-5" + y="62.447506" + x="-95.515633" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="62.447506" + x="-95.515633" + id="tspan4140-7-3-5" + sodipodi:role="line">Port 1</tspan></text> + </g> + <rect + y="74.426659" + x="288.07141" + height="65" + width="38.57143" + id="rect4136-8-4-7-7" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 1.00000002;stroke-dashoffset:0" /> + <text + transform="matrix(0,-1,1,0,0,0)" + sodipodi:linespacing="125%" + id="text4138-8-2-5-8" + y="311.23318" + x="-126.86578" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="311.23318" + x="-126.86578" + id="tspan4140-5-4-9-6" + sodipodi:role="line">Port 2</tspan></text> + <g + id="g5905-4" + transform="translate(-1.2142913,-215.16774)"> + <rect + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" + id="rect4171-9-0-0" + width="94.285713" + height="46.42857" + x="132.85715" + y="250.48721" /> + <text + xml:space="preserve" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + x="146.42856" + y="278.34433" + id="text4173-9-2-6" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4175-0-7-3" + x="146.42856" + y="278.34433">tx-thread</tspan></text> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10431)" + d="M 226.28573,52.462339 287.7143,2.8194795" + id="path4984-4-07" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10421)" + d="m 227.09388,122.75669 60.35714,9.64286" + id="path4984-1-6-8" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <g + id="g5905-6-0" + transform="translate(0.21427875,-156.1499)"> + <rect + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" + id="rect4171-9-0-9-1" + width="94.285713" + height="46.42857" + x="132.85715" + y="250.48721" /> + <text + xml:space="preserve" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + x="146.42856" + y="278.34433" + id="text4173-9-2-0-0" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4175-0-7-7-8" + x="146.42856" + y="278.34433">tx-thread</tspan></text> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10273)" + d="m 227.19687,67.801919 58.92857,41.071411" + id="path4984-4-0-4" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10585)" + d="M 227.30382,110.24508 286.94667,24.530799" + id="path4984-4-0-0-7" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 2.00000004;stroke-dashoffset:0;marker-end:url(#marker11487)" + d="m 66.28572,118.8909 65.71429,-2.14285" + id="path5457-1-2-8" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <g + id="g5905-4-6" + transform="translate(-3.5000113,-277.43173)"> + <rect + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" + id="rect4171-9-0-0-7" + width="94.285713" + height="46.42857" + x="132.85715" + y="250.48721" /> + <text + xml:space="preserve" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + x="146.42856" + y="278.34433" + id="text4173-9-2-6-8" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4175-0-7-3-5" + x="146.42856" + y="278.34433">tx-thread</tspan></text> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 2.00000004;stroke-dashoffset:0;marker-end:url(#marker10119-2)" + d="M 68.35772,16.118199 127.64343,-6.3818105" + id="path5457-1-2-2" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10431-3)" + d="m 224.52079,-13.531251 64.28571,2.14286" + id="path4984-4-07-4" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10431-3-0)" + d="M 224.17025,2.1505695 287.02739,87.864849" + id="path4984-4-07-4-7" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + </g> + </g> + </g> +</svg>
doc/guides/sample_app_ug/img/performance_thread_2.svg new file +865 -0
865 lines not on this page · raw message
doc/guides/sample_app_ug/index.rst +1 -0
@@ -75,6 +75,7 @@ Sample Applications User Guide tep_termination proc_info ptpclient + performance_thread **Figures**
doc/guides/sample_app_ug/performance_thread.rst new file +1263 -0
1,263 lines not on this page · raw message
Signature · 1 line
2.1.4
v9 cover 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
* Remove CONFIG_RTE_PERFORMANCE_THREAD
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 | 7 + .../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 | 6 +- 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 | 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 + 36 files changed, 13194 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
PATCH v9 1/4 doc: add sample application guide for performance-thread
This commit adds the sample application user guide for the performance thread sample application.
--- .../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 ++++++++++++++++++++ 4 files changed, 2928 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
doc/guides/sample_app_ug/img/performance_thread_1.svg new file +799 -0
@@ -0,0 +1,799 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="449.57141" + height="187.34319" + viewBox="0 0 449.57143 187.34319" + id="svg2" + version="1.1" + inkscape:version="0.48.3.1 r9886" + sodipodi:docname="performance_thread_1.svg" + inkscape:export-filename="C:\Users\tkulasex\Documents\L-threads\model-v2.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4"> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11487" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path11489" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker11285" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path11287" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker11107" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path11109" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10757" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10759" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10421" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10423" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10273" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10275" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker9983" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path9985" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker9853" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path9855" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lend-6" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path4248-0" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker4992-4" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path4994-2" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Mend-1" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path4254-1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker4992-4-0" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path4994-2-9" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lend-6-8" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path4248-0-3" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker5952-2" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path5954-4" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker5952-2-1" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path5954-4-2" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker6881-5" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path6883-0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-3" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-4" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-3-0" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-4-2" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-3-0-4" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-4-2-4" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-3-1" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-4-6" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10119-2" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend" + inkscape:collect="always"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10121-6" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11487-0" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path11489-6" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10585" + style="overflow:visible" + inkscape:isstock="true" + inkscape:collect="always"> + <path + id="path10587" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10273-9" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10275-3" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10421-3" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10423-1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker10431-2" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path10433-5" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10119" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend" + inkscape:collect="always"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10121" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10923" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend" + inkscape:collect="always"> + <path + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10925" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker10757-4" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 0,0 z" + id="path10759-3" + inkscape:connector-curvature="0" /> + </marker> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.4" + inkscape:cx="138.23152" + inkscape:cy="-30.946457" + inkscape:document-units="px" + inkscape:current-layer="g4142-7" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:window-width="1920" + inkscape:window-height="1148" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1" + width="744.09px" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-40.428564,-78.569476)"> + <g + transform="translate(7.9156519e-7,106.78572)" + id="g4142-7"> + <g + transform="translate(162.14285,0.35714094)" + id="g4177-1"> + <g + transform="translate(-160.49999,-56.592401)" + id="g4142-55-1"> + <rect + y="43.076488" + x="39.285713" + height="65" + width="38.57143" + id="rect4136-65-2" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" /> + <text + transform="matrix(0,-1,1,0,0,0)" + sodipodi:linespacing="125%" + id="text4138-4-8" + y="62.447506" + x="-95.515633" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="62.447506" + x="-95.515633" + id="tspan4140-2-4" + sodipodi:role="line">Port 1</tspan></text> + </g> + <rect + y="93.269798" + x="-121.21429" + height="65" + width="38.57143" + id="rect4136-8-3-7" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 1.00000002;stroke-dashoffset:0" /> + <text + transform="matrix(0,-1,1,0,0,0)" + sodipodi:linespacing="125%" + id="text4138-8-7-3" + y="-98.052498" + x="-145.70891" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="-98.052498" + x="-145.70891" + id="tspan4140-5-8-3" + sodipodi:role="line">Port 2</tspan></text> + <g + transform="translate(-158.35713,1.6218895)" + id="g4177-7-6"> + <rect + y="1.2907723" + x="132.85715" + height="46.42857" + width="94.285713" + id="rect4171-1-9" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" /> + <text + sodipodi:linespacing="125%" + id="text4173-0-0" + y="29.147915" + x="146.42856" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="29.147915" + x="146.42856" + id="tspan4175-6-1" + sodipodi:role="line">rx-thread</tspan></text> + </g> + <text + xml:space="preserve" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + x="86.642853" + y="78.626976" + id="text5627-0-5" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan5629-8-6" + x="86.642853" + y="78.626976">rings</tspan></text> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10757)" + d="m -83.357144,17.912679 56.42858,4.28571" + id="path4239-3-5" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10923)" + d="m -82.808124,125.71821 53.57145,-9.28573" + id="path4239-0-3-6" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 2.00000004;stroke-dashoffset:0;marker-end:url(#marker10119)" + d="m 68.78571,29.341249 62.5,28.21429" + id="path5457-1-2" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <g + transform="translate(-161.92858,95.100119)" + id="g4177-7-6-7"> + <rect + y="1.2907723" + x="132.85715" + height="46.42857" + width="94.285713" + id="rect4171-1-9-8" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" /> + <text + sodipodi:linespacing="125%" + id="text4173-0-0-6" + y="29.147915" + x="146.42856" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="29.147915" + x="146.42856" + id="tspan4175-6-1-8" + sodipodi:role="line">rx-thread</tspan></text> + </g> + <g + transform="translate(249.5,-71.149881)" + id="g4142-5-1-2"> + <rect + y="43.076488" + x="39.285713" + height="65" + width="38.57143" + id="rect4136-6-5-3" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" /> + <text + transform="matrix(0,-1,1,0,0,0)" + sodipodi:linespacing="125%" + id="text4138-3-3-5" + y="62.447506" + x="-95.515633" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="62.447506" + x="-95.515633" + id="tspan4140-7-3-5" + sodipodi:role="line">Port 1</tspan></text> + </g> + <rect + y="74.426659" + x="288.07141" + height="65" + width="38.57143" + id="rect4136-8-4-7-7" + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 1.00000002;stroke-dashoffset:0" /> + <text + transform="matrix(0,-1,1,0,0,0)" + sodipodi:linespacing="125%" + id="text4138-8-2-5-8" + y="311.23318" + x="-126.86578" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + xml:space="preserve"><tspan + y="311.23318" + x="-126.86578" + id="tspan4140-5-4-9-6" + sodipodi:role="line">Port 2</tspan></text> + <g + id="g5905-4" + transform="translate(-1.2142913,-215.16774)"> + <rect + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" + id="rect4171-9-0-0" + width="94.285713" + height="46.42857" + x="132.85715" + y="250.48721" /> + <text + xml:space="preserve" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + x="146.42856" + y="278.34433" + id="text4173-9-2-6" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4175-0-7-3" + x="146.42856" + y="278.34433">tx-thread</tspan></text> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10431)" + d="M 226.28573,52.462339 287.7143,2.8194795" + id="path4984-4-07" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10421)" + d="m 227.09388,122.75669 60.35714,9.64286" + id="path4984-1-6-8" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <g + id="g5905-6-0" + transform="translate(0.21427875,-156.1499)"> + <rect + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" + id="rect4171-9-0-9-1" + width="94.285713" + height="46.42857" + x="132.85715" + y="250.48721" /> + <text + xml:space="preserve" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + x="146.42856" + y="278.34433" + id="text4173-9-2-0-0" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4175-0-7-7-8" + x="146.42856" + y="278.34433">tx-thread</tspan></text> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10273)" + d="m 227.19687,67.801919 58.92857,41.071411" + id="path4984-4-0-4" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10585)" + d="M 227.30382,110.24508 286.94667,24.530799" + id="path4984-4-0-0-7" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 2.00000004;stroke-dashoffset:0;marker-end:url(#marker11487)" + d="m 66.28572,118.8909 65.71429,-2.14285" + id="path5457-1-2-8" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <g + id="g5905-4-6" + transform="translate(-3.5000113,-277.43173)"> + <rect + style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4, 1;stroke-dashoffset:0" + id="rect4171-9-0-0-7" + width="94.285713" + height="46.42857" + x="132.85715" + y="250.48721" /> + <text + xml:space="preserve" + style="font-size:15px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" + x="146.42856" + y="278.34433" + id="text4173-9-2-6-8" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan4175-0-7-3-5" + x="146.42856" + y="278.34433">tx-thread</tspan></text> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:4.00000008, 2.00000004;stroke-dashoffset:0;marker-end:url(#marker10119-2)" + d="M 68.35772,16.118199 127.64343,-6.3818105" + id="path5457-1-2-2" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10431-3)" + d="m 224.52079,-13.531251 64.28571,2.14286" + id="path4984-4-07-4" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker10431-3-0)" + d="M 224.17025,2.1505695 287.02739,87.864849" + id="path4984-4-07-4-7" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + </g> + </g> + </g> +</svg>
doc/guides/sample_app_ug/img/performance_thread_2.svg new file +865 -0
865 lines not on this page · raw message
doc/guides/sample_app_ug/index.rst +1 -0
@@ -75,6 +75,7 @@ Sample Applications User Guide tep_termination proc_info ptpclient + performance_thread **Figures**
doc/guides/sample_app_ug/performance_thread.rst new file +1263 -0
1,263 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v9 2/4 examples: add lthread subsystem for performance-thread
In reply to Ian BettsThis commit adds the lightweight thread subsystem used by the performance-thread sample applications.
--- 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 ++ 22 files changed, 5191 insertions(+) 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
examples/performance-thread/common/arch/x86/ctx.c new file +93 -0
@@ -0,0 +1,93 @@ +/*- +* BSD LICENSE +* +* Copyright(c) 2015 Intel Corporation. All rights reserved. +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of Intel Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* +* https://github.com/halayli/lthread which carries the following license. +* +* Copyright (C) 2012, Hasan Alayli <[email protected]> +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +* SUCH DAMAGE. +*/ + + + +#if defined(__x86_64__) +__asm__ ( +".text\n" +".p2align 4,,15\n" +".globl ctx_switch\n" +".globl _ctx_switch\n" +"ctx_switch:\n" +"_ctx_switch:\n" +" movq %rsp, 0(%rsi) # save stack_pointer\n" +" movq %rbp, 8(%rsi) # save frame_pointer\n" +" movq (%rsp), %rax # save insn_pointer\n" +" movq %rax, 16(%rsi)\n" +" movq %rbx, 24(%rsi)\n # save rbx,r12-r15\n" +" movq 24(%rdi), %rbx\n" +" movq %r15, 56(%rsi)\n" +" movq %r14, 48(%rsi)\n" +" movq 48(%rdi), %r14\n" +" movq 56(%rdi), %r15\n" +" movq %r13, 40(%rsi)\n" +" movq %r12, 32(%rsi)\n" +" movq 32(%rdi), %r12\n" +" movq 40(%rdi), %r13\n" +" movq 0(%rdi), %rsp # restore stack_pointer\n" +" movq 16(%rdi), %rax # restore insn_pointer\n" +" movq 8(%rdi), %rbp # restore frame_pointer\n" +" movq %rax, (%rsp)\n" +" ret\n" + ); +#else +#pragma GCC error "__x86_64__ is not defined" +#endif
examples/performance-thread/common/arch/x86/ctx.h new file +57 -0
57 lines not on this page · raw message
examples/performance-thread/common/common.mk new file +42 -0
42 lines not on this page · raw message
examples/performance-thread/common/lthread.c new file +530 -0
530 lines not on this page · raw message
examples/performance-thread/common/lthread.h new file +99 -0
99 lines not on this page · raw message
examples/performance-thread/common/lthread_api.h new file +829 -0
829 lines not on this page · raw message
examples/performance-thread/common/lthread_cond.c new file +240 -0
240 lines not on this page · raw message
examples/performance-thread/common/lthread_cond.h new file +77 -0
77 lines not on this page · raw message
examples/performance-thread/common/lthread_diag.c new file +321 -0
321 lines not on this page · raw message
examples/performance-thread/common/lthread_diag.h new file +129 -0
129 lines not on this page · raw message
examples/performance-thread/common/lthread_diag_api.h new file +319 -0
319 lines not on this page · raw message
examples/performance-thread/common/lthread_int.h new file +212 -0
212 lines not on this page · raw message
examples/performance-thread/common/lthread_mutex.c new file +255 -0
52 lines not on this page · raw message
examples/performance-thread/common/lthread_mutex.h new file +52 -0
52 lines not on this page · raw message
examples/performance-thread/common/lthread_objcache.h new file +160 -0
160 lines not on this page · raw message
examples/performance-thread/common/lthread_pool.h new file +332 -0
332 lines not on this page · raw message
examples/performance-thread/common/lthread_queue.h new file +302 -0
302 lines not on this page · raw message
examples/performance-thread/common/lthread_sched.c new file +600 -0
600 lines not on this page · raw message
examples/performance-thread/common/lthread_sched.h new file +152 -0
152 lines not on this page · raw message
examples/performance-thread/common/lthread_timer.h new file +79 -0
79 lines not on this page · raw message
examples/performance-thread/common/lthread_tls.c new file +254 -0
254 lines not on this page · raw message
examples/performance-thread/common/lthread_tls.h new file +57 -0
57 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.1.4
Part of the diff is not shown here. View the raw message.
PATCH v9 3/4 examples: add l3fwd-thread example in performance-thread
In reply to Ian BettsThis commit adds an L3 forwarding application to the performace-thread example.
--- MAINTAINERS | 7 + examples/Makefile | 6 +- examples/performance-thread/Makefile | 43 + examples/performance-thread/l3fwd-thread/Makefile | 57 + examples/performance-thread/l3fwd-thread/main.c | 3641 +++++++++++++++++++++ examples/performance-thread/l3fwd-thread/test.sh | 149 + 6 files changed, 3902 insertions(+), 1 deletion(-) create mode 100644 examples/performance-thread/Makefile 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
MAINTAINERS +7 -0
@@ -575,3 +575,10 @@ F: doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst M: Pablo de Lara <[email protected]> M: Daniel Mrzyglod <[email protected]> F: examples/ptpclient/ + +M: Ian Betts <[email protected]> +F: examples/performance-thread/ + +M: Ian Betts <[email protected]> +M: John McNamara <[email protected]> +F: doc/guides/sample_app_ug/performance_thread.rst
examples/Makefile +5 -1
@@ -77,5 +77,9 @@ DIRS-y += vmdq DIRS-y += vmdq_dcb DIRS-$(CONFIG_RTE_LIBRTE_POWER) += vm_power_manager DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += l2fwd-crypto - +ifneq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),) +ifneq ($(CONFIG_RTE_ARCH_X86_64),) +DIRS-y += performance-thread +endif +endif include $(RTE_SDK)/mk/rte.extsubdir.mk
examples/performance-thread/Makefile new file +43 -0
43 lines not on this page · raw message
examples/performance-thread/l3fwd-thread/Makefile new file +57 -0
57 lines not on this page · raw message
examples/performance-thread/l3fwd-thread/main.c new file +3641 -0
2,880 lines not on this page · raw message
examples/performance-thread/l3fwd-thread/test.sh new file +149 -0
149 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.1.4
Part of the diff is not shown here. View the raw message.
Re: [PATCH v9 3/4] examples: add l3fwd-thread example in performance-thread
2015-12-07 17:58, Ian Betts:
MAINTAINERS F: doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst · line 584
Quoted 13 lines
MAINTAINERS +7
-0@@ -575,3 +575,10 @@ F: doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst M: Pablo de Lara <[email protected]> M: Daniel Mrzyglod <[email protected]> F: examples/ptpclient/ + +M: Ian Betts <[email protected]> +F: examples/performance-thread/ + +M: Ian Betts <[email protected]> +M: John McNamara <[email protected]> +F: doc/guides/sample_app_ug/performance_thread.rst
Why doing 2 sections?
John is already the doc maintainer. You don't need to add him here.
examples/Makefile DIRS-y += vmdq · line 84
Quoted 12 lines
examples/Makefile +5
-1@@ -77,5 +77,9 @@ DIRS-y += vmdq DIRS-y += vmdq_dcb DIRS-$(CONFIG_RTE_LIBRTE_POWER) += vm_power_manager DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += l2fwd-crypto - +ifneq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),) +ifneq ($(CONFIG_RTE_ARCH_X86_64),) +DIRS-y += performance-thread +endif +endif
Matter of taste, I would prefer DIRS-$(CONFIG_RTE_ARCH_X86_64)
Re: [PATCH v9 3/4] examples: add l3fwd-thread example in performance-thread
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, December 8, 2015 1:36 AM
To: Betts, Ian
Cc: [email protected]; [email protected]; Richardson, Bruce
Subject: Re: [PATCH v9 3/4] examples: add l3fwd-thread example in performance-thread
Quoted 6 lines
MAINTAINERS +3
-0+M: Ian Betts <[email protected]> +M: John McNamara <[email protected]> +F: doc/guides/sample_app_ug/performance_thread.rstWhy doing 2 sections?
John is already the doc maintainer. You don't need to add him here.
I just copy most of the other examples which also do this. I also thought it was odd.
I will remove him.
Quoted 13 lines
examples/Makefile +5
-1@@ -77,5 +77,9 @@ DIRS-y += vmdq DIRS-y += vmdq_dcb DIRS-$(CONFIG_RTE_LIBRTE_POWER) += vm_power_manager DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += l2fwd-crypto - +ifneq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),) +ifneq ($(CONFIG_RTE_ARCH_X86_64),) +DIRS-y += performance-thread +endif +endif
Quoted 1 line
Matter of taste, I would prefer DIRS-$(CONFIG_RTE_ARCH_X86_64)
I need to combine CONFIG_RTE_EXEC_ENV_LINUXAPP ( the two clauses )
Re: [PATCH v9 3/4] examples: add l3fwd-thread example in performance-thread
2015-12-08 01:54, Betts, Ian:
Quoted 11 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, December 8, 2015 1:36 AM
To: Betts, Ian
Cc: [email protected]; [email protected]; Richardson, Bruce
Subject: Re: [PATCH v9 3/4] examples: add l3fwd-thread example in performance-threadQuoted 3 lines
MAINTAINERS +3
-0+M: Ian Betts <[email protected]> +M: John McNamara <[email protected]> +F: doc/guides/sample_app_ug/performance_thread.rst
Quoted 5 lines
Quoted 2 lines
Why doing 2 sections?
John is already the doc maintainer. You don't need to add him here.I just copy most of the other examples which also do this. I also thought it was odd.
No, John is really the co-maintainer of some examples. Please talk with him, you are in the same company.
Quoted 15 lines
I will remove him.
Quoted 12 lines
examples/Makefile +5
-1@@ -77,5 +77,9 @@ DIRS-y += vmdq DIRS-y += vmdq_dcb DIRS-$(CONFIG_RTE_LIBRTE_POWER) += vm_power_manager DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += l2fwd-crypto - +ifneq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),) +ifneq ($(CONFIG_RTE_ARCH_X86_64),) +DIRS-y += performance-thread +endif +endif
Quoted 3 lines
examples/Makefile DIRS-y += vmdq · line 85
Quoted 1 line
examples/Makefile +0
-0Matter of taste, I would prefer DIRS-$(CONFIG_RTE_ARCH_X86_64)I need to combine
CONFIG_RTE_EXEC_ENV_LINUXAPP( the two clauses )
+ifneq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),) +DIRS-$(CONFIG_RTE_ARCH_X86_64) += performance-thread +endif
It highlights the main dependency of this code: x86
Re: [PATCH v9 3/4] examples: add l3fwd-thread example in performance-thread
In reply to Ian Betts2015-12-07 17:58, Ian Betts:
Quoted 1 line
examples/performance-thread/l3fwd-thread/main.c| 3641 +++++++++++++++++++++
It does not compile with clang:common/lthread_diag.c:165:1: error: unused function '_qnode_pool_display'
PATCH v9 4/4 examples: add pthread_shim example to performance thread
In reply to Ian BettsThis commit adds an example that illustrates how to implement a pthread shim with the lthread subsystem included in the performance thread example application.
--- examples/performance-thread/Makefile | 2 + 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 ++++ 5 files changed, 1173 insertions(+) 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
examples/performance-thread/Makefile +2 -0
@@ -39,5 +39,7 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk DIRS-y += l3fwd-thread +DIRS-y += pthread_shim + include $(RTE_SDK)/mk/rte.extsubdir.mk
examples/performance-thread/pthread_shim/Makefile new file +60 -0
60 lines not on this page · raw message
examples/performance-thread/pthread_shim/main.c new file +284 -0
284 lines not on this page · raw message
examples/performance-thread/pthread_shim/pthread_shim.c new file +714 -0
714 lines not on this page · raw message
examples/performance-thread/pthread_shim/pthread_shim.h new file +113 -0
113 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH v8 2/4 examples: add lthread subsystem forperformance-thread
In reply to Ian BettsThis commit adds the lightweight thread subsystem used by the performance-thread sample applications.
Changes in this version
* remove ASM implementation of atomic64_xchg in favor of builtin __sync_lock_test_and_set()
--- 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 ++ 22 files changed, 5191 insertions(+) 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
examples/performance-thread/common/arch/x86/ctx.c new file +93 -0
@@ -0,0 +1,93 @@ +/*- +* BSD LICENSE +* +* Copyright(c) 2015 Intel Corporation. All rights reserved. +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* * Neither the name of Intel Corporation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* +* https://github.com/halayli/lthread which carries the following license. +* +* Copyright (C) 2012, Hasan Alayli <[email protected]> +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +* SUCH DAMAGE. +*/ + + + +#if defined(__x86_64__) +__asm__ ( +".text\n" +".p2align 4,,15\n" +".globl ctx_switch\n" +".globl _ctx_switch\n" +"ctx_switch:\n" +"_ctx_switch:\n" +" movq %rsp, 0(%rsi) # save stack_pointer\n" +" movq %rbp, 8(%rsi) # save frame_pointer\n" +" movq (%rsp), %rax # save insn_pointer\n" +" movq %rax, 16(%rsi)\n" +" movq %rbx, 24(%rsi)\n # save rbx,r12-r15\n" +" movq 24(%rdi), %rbx\n" +" movq %r15, 56(%rsi)\n" +" movq %r14, 48(%rsi)\n" +" movq 48(%rdi), %r14\n" +" movq 56(%rdi), %r15\n" +" movq %r13, 40(%rsi)\n" +" movq %r12, 32(%rsi)\n" +" movq 32(%rdi), %r12\n" +" movq 40(%rdi), %r13\n" +" movq 0(%rdi), %rsp # restore stack_pointer\n" +" movq 16(%rdi), %rax # restore insn_pointer\n" +" movq 8(%rdi), %rbp # restore frame_pointer\n" +" movq %rax, (%rsp)\n" +" ret\n" + ); +#else +#pragma GCC error "__x86_64__ is not defined" +#endif
examples/performance-thread/common/arch/x86/ctx.h new file +57 -0
57 lines not on this page · raw message
examples/performance-thread/common/common.mk new file +42 -0
42 lines not on this page · raw message
examples/performance-thread/common/lthread.c new file +530 -0
530 lines not on this page · raw message
examples/performance-thread/common/lthread.h new file +99 -0
99 lines not on this page · raw message
examples/performance-thread/common/lthread_api.h new file +829 -0
829 lines not on this page · raw message
examples/performance-thread/common/lthread_cond.c new file +240 -0
240 lines not on this page · raw message
examples/performance-thread/common/lthread_cond.h new file +77 -0
77 lines not on this page · raw message
examples/performance-thread/common/lthread_diag.c new file +321 -0
321 lines not on this page · raw message
examples/performance-thread/common/lthread_diag.h new file +129 -0
129 lines not on this page · raw message
examples/performance-thread/common/lthread_diag_api.h new file +319 -0
319 lines not on this page · raw message
examples/performance-thread/common/lthread_int.h new file +212 -0
212 lines not on this page · raw message
examples/performance-thread/common/lthread_mutex.c new file +255 -0
52 lines not on this page · raw message
examples/performance-thread/common/lthread_mutex.h new file +52 -0
52 lines not on this page · raw message
examples/performance-thread/common/lthread_objcache.h new file +160 -0
160 lines not on this page · raw message
examples/performance-thread/common/lthread_pool.h new file +332 -0
332 lines not on this page · raw message
examples/performance-thread/common/lthread_queue.h new file +302 -0
302 lines not on this page · raw message
examples/performance-thread/common/lthread_sched.c new file +600 -0
600 lines not on this page · raw message
examples/performance-thread/common/lthread_sched.h new file +152 -0
152 lines not on this page · raw message
examples/performance-thread/common/lthread_timer.h new file +79 -0
79 lines not on this page · raw message
examples/performance-thread/common/lthread_tls.c new file +254 -0
254 lines not on this page · raw message
examples/performance-thread/common/lthread_tls.h new file +57 -0
57 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.1.4
Part of the diff is not shown here. View the raw message.
Re: [PATCH v8 2/4] examples: add lthread subsystem forperformance-thread
Please add the new directory in the MAINTAINERS file. Thanks
PATCH v8 3/4 examples: add l3fwd-thread example in performance-thread
In reply to Ian BettsThis commit adds an L3 forwarding application to the performace-thread example.
--- config/defconfig_x86_64-native-linuxapp-gcc | 2 + config/defconfig_x86_64-native-linuxapp-icc | 2 + examples/Makefile | 1 + examples/performance-thread/Makefile | 45 + examples/performance-thread/l3fwd-thread/Makefile | 57 + examples/performance-thread/l3fwd-thread/main.c | 3641 +++++++++++++++++++++ examples/performance-thread/l3fwd-thread/test.sh | 149 + 7 files changed, 3897 insertions(+) create mode 100644 examples/performance-thread/Makefile 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
config/defconfig_x86_64-native-linuxapp-gcc +2 -0
@@ -40,3 +40,5 @@ CONFIG_RTE_ARCH_64=y CONFIG_RTE_TOOLCHAIN="gcc" CONFIG_RTE_TOOLCHAIN_GCC=y + +CONFIG_RTE_PERFORMANCE_THREAD=y
config/defconfig_x86_64-native-linuxapp-icc +2 -0
@@ -40,3 +40,5 @@ CONFIG_RTE_ARCH_64=y CONFIG_RTE_TOOLCHAIN="icc" CONFIG_RTE_TOOLCHAIN_ICC=y + +CONFIG_RTE_PERFORMANCE_THREAD=y
examples/Makefile +1 -0
@@ -77,5 +77,6 @@ DIRS-y += vmdq DIRS-y += vmdq_dcb DIRS-$(CONFIG_RTE_LIBRTE_POWER) += vm_power_manager DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += l2fwd-crypto +DIRS-$(CONFIG_RTE_PERFORMANCE_THREAD) += performance-thread include $(RTE_SDK)/mk/rte.extsubdir.mk
examples/performance-thread/Makefile new file +45 -0
45 lines not on this page · raw message
examples/performance-thread/l3fwd-thread/Makefile new file +57 -0
57 lines not on this page · raw message
examples/performance-thread/l3fwd-thread/main.c new file +3641 -0
2,882 lines not on this page · raw message
examples/performance-thread/l3fwd-thread/test.sh new file +149 -0
149 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.1.4
Part of the diff is not shown here. View the raw message.
Re: [PATCH v8 3/4] examples: add l3fwd-thread example in performance-thread
Hi,
I had no time to check how it works.
I'm just surprised that you introduce a new config option.
2015-12-04 10:34, Ian Betts:
Quoted 23 lines
config/defconfig_x86_64-native-linuxapp-gcc +2
-0@@ -40,3 +40,5 @@ CONFIG_RTE_ARCH_64=y CONFIG_RTE_TOOLCHAIN="gcc" CONFIG_RTE_TOOLCHAIN_GCC=y + +CONFIG_RTE_PERFORMANCE_THREAD=yconfig/defconfig_x86_64-native-linuxapp-icc +2
-0@@ -40,3 +40,5 @@ CONFIG_RTE_ARCH_64=y CONFIG_RTE_TOOLCHAIN="icc" CONFIG_RTE_TOOLCHAIN_ICC=y + +CONFIG_RTE_PERFORMANCE_THREAD=yexamples/Makefile +0
-0
examples/Makefile DIRS-y += vmdq · line 80
Quoted 4 lines
examples/Makefile +1
-0@@ -77,5 +77,6 @@ DIRS-y += vmdq DIRS-y += vmdq_dcb DIRS-$(CONFIG_RTE_LIBRTE_POWER) += vm_power_manager DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += l2fwd-crypto +DIRS-$(CONFIG_RTE_PERFORMANCE_THREAD) += performance-thread
I think this option should be removed.
Re: [PATCH v8 3/4] examples: add l3fwd-thread example in performance-thread
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Monday, December 7, 2015 2:36 AM
To: Betts, Ian
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH v8 3/4] examples: add l3fwd-thread example in performance-thread
Quoted 6 lines
Hi,
Quoted 3 lines
I had no time to check how it works.
I'm just surprised that you introduce a new config option. +DIRS-$(CONFIG_RTE_PERFORMANCE_THREAD) += performance-threadI think this option should be removed.
It is only to ensure that performance-thread example is built, along with all other examples, if you run "make" top level of examples folder.
Also to ensure it is only enabled for x86_64 linux.
Is there is another way ?
Re: [PATCH v8 3/4] examples: add l3fwd-thread example in performance-thread
2015-12-07 04:46, Betts, Ian:
Quoted 10 lines
Quoted 4 lines
Quoted 3 lines
I had no time to check how it works.
I'm just surprised that you introduce a new config option. +DIRS-$(CONFIG_RTE_PERFORMANCE_THREAD) += performance-threadI think this option should be removed.
It is only to ensure that performance-thread example is built, along with all other examples, if you run "make" top level of examples folder.
Also to ensure it is only enabled forx86_64linux.Is there is another way ?
The config options must be avoided for libraries and not used for examples. You can use CONFIG_RTE_ARCH_X86_64.
PATCH v8 4/4 examples: add pthread_shim example to performance thread
In reply to Ian BettsThis commit adds an example that illustrates how to implement a pthread shim with the lthread subsystem included in the performance thread example application.
--- examples/performance-thread/Makefile | 2 + 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 ++++ 5 files changed, 1173 insertions(+) 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
examples/performance-thread/Makefile +2 -0
@@ -39,6 +39,8 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk DIRS-$(CONFIG_RTE_PERFORMANCE_THREAD) += l3fwd-thread +DIRS-$(CONFIG_RTE_PERFORMANCE_THREAD) += pthread_shim +
examples/performance-thread/pthread_shim/Makefile new file +60 -0
60 lines not on this page · raw message
examples/performance-thread/pthread_shim/main.c new file +284 -0
284 lines not on this page · raw message
examples/performance-thread/pthread_shim/pthread_shim.c new file +714 -0
714 lines not on this page · raw message
examples/performance-thread/pthread_shim/pthread_shim.h new file +113 -0
113 lines not on this page · raw message
Signature · 1 line
2.1.4
Quoted 124 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Ian Betts
Sent: Friday, December 4, 2015 11:34
To: [email protected]
Cc: Betts, Ian
Subject: [dpdk-dev] [PATCH v8 0/4] examples: add performance-threadThis 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 ofatomic64_xchgin 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: addpthread_shimexample to performance threadconfig/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
Quoted 2 lines
--
2.1.4
Series Acked-by: Tomasz Kulasek <[email protected]>
Quoted 33 lines · On Fri, 4 Dec 2015 10:34:21 +0000 Ian Betts <[email protected]> wrote:
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 threadPurpose 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.
Quoted 3 lines
Changes in this version
* remove ASM implementation ofatomic64_xchgin favor of builtin__sync_lock_test_and_set()
Looks useful, but this needs more discussion.
Maybe it should be a separate library not tied into DPDK so it gets wider use and testing? Also what are the limitations? What if an lthread did a system call? What about interaction with rte_poll?
Earlier attempts at lightweight threading (fibers) would be worth looking into. http://c2.com/cgi/wiki?CooperativeThreading
Intel Thread Building Blocks
IBM NGPT (now defunct)
There lots of hidden gotcha's here, like preemption (or not), and limitations on interactions with other libraries.
Intel may have some milestone to get it into DPDK 2.2 but really this seems too late...
2015-12-04 10:03, Stephen Hemminger:
Quoted 12 lines
Looks useful, but this needs more discussion.
Maybe it should be a separate library not tied into DPDK so it gets wider use and testing? Also what are the limitations? What if an lthread did a system call? What about interaction with
rte_poll?Earlier attempts at lightweight threading (fibers) would be worth looking into. http://c2.com/cgi/wiki?CooperativeThreading
Intel Thread Building Blocks
IBM NGPT (now defunct)
Quoted 5 lines
There lots of hidden gotcha's here, like preemption (or not), and limitations on interactions with other libraries.
Intel may have some milestone to get it into DPDK 2.2 but really this seems too late...
Yes, sure it is too late to have enough discussions in 2.2 timeframe.
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Friday, December 4, 2015 6:34 PM
To: Stephen Hemminger
Cc: [email protected]; Betts, Ian
Subject: Re: [dpdk-dev] [PATCH v8 0/4] examples: add performance-thread
2015-12-04 10:03, Stephen Hemminger:
Quoted 12 lines
Looks useful, but this needs more discussion.
Maybe it should be a separate library not tied into DPDK so it gets wider use and testing? Also what are the limitations? What if an lthread did a system call? What about interaction with
rte_poll?Earlier attempts at lightweight threading (fibers) would be worth looking into. http://c2.com/cgi/wiki?CooperativeThreading
Intel Thread Building Blocks
IBM NGPT (now defunct)
Quoted 7 lines
There lots of hidden gotcha's here, like preemption (or not), and limitations on interactions with other libraries.
Intel may have some milestone to get it into DPDK 2.2 but really this seems too late...
Quoted 1 line
Quoted 1 line
Yes, sure it is too late to have enough discussions in 2.2 timeframe.
Just to understand what we mean by too late...
The original RFC was issued on 2nd September.
Thus there have been some three months available for discussion, and for people to raise any questions or concerns.
The first patch was available on 30th September, and a number of subsequent patch versions have been issued, meaning the code has been available for review for two months.
As mentioned in the reply to Stephen, there has been no adverse feedback during this period.
/Ian
-----Original Message-----
From: Betts, Ian
Sent: Saturday, December 5, 2015 12:07 PM
To: Thomas Monjalon; Stephen Hemminger
Cc: [email protected]; O'Driscoll, Tim; Richardson, Bruce; Glynn, Michael J
Subject: RE: [dpdk-dev] [PATCH v8 0/4] examples: add performance-thread
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Friday, December 4, 2015 6:34 PM
To: Stephen Hemminger
Cc: [email protected]; Betts, Ian
Subject: Re: [dpdk-dev] [PATCH v8 0/4] examples: add performance-thread
Quoted 10 lines
Intel may have some milestone to get it into DPDK 2.2 but really this seems too late...
Quoted 1 line
Quoted 1 line
Yes, sure it is too late to have enough discussions in 2.2 timeframe
Just to understand what we mean by too late...
The original RFC was issued on 2nd September.
Thus there have been some three months available for discussion, and for people to raise any questions or concerns.
The first patch was available on 30th September, and a number of subsequent patch versions have been issued, meaning the code has been available for review for two month As mentioned in the reply to Stephen, there has been no adverse feedback during this period.
/Ian
Hi Thomas/Stephen
I agree with Ian, how much time is expected for a discussion to happen?
As Ian stated, the feature was stated in our 2.2 planned feature list, we created a RFC over 3 months ago, and there's been code available for review for over 2 months now! (not to mention several version updates, docs, etc.). Given this, I believe that there has been ample time for the community to review and provide feedback rather than waiting until the eve of RC3 and then requesting more time.
In addition, by making it a sample application first people can test it, see if it's useful, and further enhance it. Based on usefulness and feedback, we can then decide whether to make it a DPDK library in a future release, make it a separate library somewhere else, or do nothing further on it
For these reasons, I believe it should be merged into RC3
Regards
Mike
Quoted 30 lines · Michael J
-----Original Message-----
From: Betts, Ian
Sent: Saturday, December 5, 2015 12:07 PM
To: Thomas Monjalon; Stephen Hemminger
Cc: [email protected]; O'Driscoll, Tim; Richardson, Bruce; Glynn, Michael J
Subject: RE: [dpdk-dev] [PATCH v8 0/4] examples: add performance-thread-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Friday, December 4, 2015 6:34 PM
To: Stephen Hemminger
Cc: [email protected]; Betts, Ian
Subject: Re: [dpdk-dev] [PATCH v8 0/4] examples: add performance-threadQuoted 10 lines
Intel may have some milestone to get it into DPDK 2.2 but really this seems too late...
Quoted 1 line
Quoted 1 line
Yes, sure it is too late to have enough discussions in 2.2 timeframe
Just to understand what we mean by too late...
The original RFC was issued on 2nd September.
Thus there have been some three months available for discussion, and for people to raise any questions or concerns.
The first patch was available on 30th September, and a number of subsequent patch versions have been issued, meaning the code has been available for review for two month As mentioned in the reply to Stephen, there has been no adverse feedback during this period.
/IanHi Thomas/Stephen
Quoted 8 lines
I agree with Ian, how much time is expected for a discussion to happen?
As Ian stated, the feature was stated in our 2.2 planned feature list, we created a RFC over 3 months ago, and there's been code available for review for over 2 months now! (not to mention several version updates, docs, etc.). Given this, I believe that there has been ample time for the community to review and provide feedback rather than waiting until the eve of RC3 and then requesting more time.
In addition, by making it a sample application first people can test it, see if it's useful, and further enhance it. Based on usefulness and feedback, we can then decide whether to make it a DPDK library in a future release, make it a separate library somewhere else, or do nothing further on it
For these reasons, I believe it should be merged into RC3
Since it is an example and well documented that is fine. Is there an explicit statement that ABI is not binding for examples?
Quoted 13 lines
Quoted 13 lines
Quoted 10 lines
Intel may have some milestone to get it into DPDK 2.2 but really this seems too late...
Quoted 1 line
Quoted 1 line
Yes, sure it is too late to have enough discussions in 2.2 timeframe
Just to understand what we mean by too late...
The original RFC was issued on 2nd September.
Thus there have been some three months available for discussion, and for people to raise any questions or concerns.
The first patch was available on 30th September, and a number of subsequent patch versions have been issued, meaning the code has been available for review for two month As mentioned in the reply to Stephen, there has been no adverse feedback during this period.
/IanHi Thomas/Stephen
Quoted 8 lines
Quoted 8 lines
I agree with Ian, how much time is expected for a discussion to happen?
As Ian stated, the feature was stated in our 2.2 planned feature list, we created a RFC over 3 months ago, and there's been code available for review for over 2 months now! (not to mention several version updates, docs, etc.). Given this, I believe that there has been ample time for the community to review and provide feedback rather than waiting until the eve of RC3 and then requesting more time.
In addition, by making it a sample application first people can test it, see if it's useful, and further enhance it. Based on usefulness and feedback, we can then decide whether to make it a DPDK library in a future release, make it a separate library somewhere else, or do nothing further on it
For these reasons, I believe it should be merged into RC3
I am not against this idea.
I just say that we have no time anymore for discussions.
There was no review probably because it is "just" an example. Given that the code is huge, it would be better to have some good feedback for its integration. But it does not hurt to integrate anyway. The only problem is the maintenance overload. When we change something in a library, every examples must be updated to keep them working. That's why we must avoid keeping some useless examples.
So this one must be discussed during the 2.3 cycle and will see if we keep it, shrink it, revert it or move to a library.
Quoted 2 lines
Since it is an example and well documented that is fine. Is there an explicit statement that ABI is not binding for examples?
What do you mean by "binding"?
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Saturday, December 5, 2015 9:21 PM
To: Stephen Hemminger; Glynn, Michael J; Betts, Ian
Cc: [email protected]; O'Driscoll, Tim; Richardson, Bruce
Subject: Re: [dpdk-dev] [PATCH v8 0/4] examples: add performance-thread
Quoted 19 lines
Quoted 19 lines
Quoted 11 lines
Intel may have some milestone to get it into DPDK 2.2 but really this seems too late...
Quoted 2 lines
Quoted 2 lines
Yes, sure it is too late to have enough discussions in 2.2 timeframe
Just to understand what we mean by too late...
The original RFC was issued on 2nd September.
Thus there have been some three months available for discussion, and for people to raise any questions or concerns.
The first patch was available on 30th September, and a number of
subsequent patch versions have been issued, meaning the code has been available for review for two month As mentioned in the reply to Stephen, there has been no adverse feedback during this period. /IanHi Thomas/Stephen
I agree with Ian, how much time is expected for a discussion to happen?
As Ian stated, the feature was stated in our 2.2 planned feature list, we created a RFC over 3 months ago, and there's been code available for review for over 2 months now! (not to mention several version updates, docs, etc.). Given this, I believe that there has been ample time for the community to review and provide feedback rather than waiting until the eve of RC3 and then requesting more time.
Quoted 7 lines
Quoted 7 lines
In addition, by making it a sample application first people can test it, see if it's useful, and further enhance it. Based on usefulness and feedback, we can then decide whether to make it a DPDK library in a future release, make it a separate library somewhere else, or do nothing further on it
For these reasons, I believe it should be merged into RC3
I am not against this idea.
I just say that we have no time anymore for discussions.
There was no review probably because it is "just" an example.
Given that the code is huge, it would be better to have some good feedback for its integration. But it does not hurt to integrate anyway. The only problem is the maintenance overload. When we change something in a library, every examples must be updated to keep them working. That's why we must avoid keeping some useless examples.
So this one must be discussed during the 2.3 cycle and will see if we keep it, shrink it, revert it or move to a library.
Quoted 4 lines
Since it is an example and well documented that is fine. Is there an explicit statement that ABI is not binding for examples?
What do you mean by "binding"?
I think these are fair comments.
I do take the point about maintenance overhead, there is no value in dragging along something that is not being used. After making it available and allowing time for users to explore we can gauge the answer best.
Feedback should inform the direction, and whilst we do continue pathfinding activity internally, in fact we had not planned any updates during the 2.3 cycle, precisely to allow time to understand if/how the community would like to see it evolve.
So personally I see 2.4 as an appropriate target to implement whatever we decide.
-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Friday, December 4, 2015 6:04 PM
To: Betts, Ian
Cc: [email protected]; Richardson, Bruce
Subject: Re: [PATCH v8 0/4] examples: add performance-thread
Quoted 5 lines
Looks useful, but this needs more discussion.
Maybe it should be a separate library not tied into DPDK so it gets wider use and testing? Also what are the limitations? What if an lthread did a system call? What about interaction with
rte_poll?
Quoted 7 lines
Earlier attempts at lightweight threading (fibers) would be worth looking into. http://c2.com/cgi/wiki?CooperativeThreading
Intel Thread Building Blocks
IBM NGPT (now defunct)There lots of hidden gotcha's here, like preemption (or not), and limitations on interactions with other libraries.
Intel may have some milestone to get it into DPDK 2.2 but really this seems too late...
These questions are valid and are the reason for making this an example application rather than a component library of DPDK. Making it an example gives people an opportunity to evaluate the concept, if it turns out to be of value it can be taken forward, and if it turns out not to be of much interest we will not evolve it.
There is a very detailed discussion in the accompanying sample app guide, which I believe provides enough information for most interested users to comprehend the scope of what is included, both in terms of the features, the limitations and porting guidance.
With respect to lthreads making system calls ( which is covered at some length in the documentation BTW), well this is the really the same questions as "what if a DPDK EAL thread made a system call ?" i.e. lthreads introduces no danger that does not already exist in a DPDK application.
Several existing fibre libraries were evaluated before starting down this road.
This work itself is heavily influenced by one of those projects : https://github.com/halayli/lthread.
There are a number of negatives with the existing implementations: None of those we looked at are
multicore capable, or at best only allow isolated instances of schedulers to be run on different cores.
The more sophisticated examples provide their own socket APIs with network IO via the kernel stack, which is not interesting for DPDK. Nearly all of them use heavier context switch based on mkcontext and friends.
So far as insufficient time to consider then, this has been in the roadmap for 2.2 all along, and has been available In patchwork for anybody to look at. There has been no adverse comment so far.
PATCH v7 3/4 examples: add l3fwd-thread example in performance-thread
In reply to Ian BettsThis commit adds an L3 forwarding application to the performace-thread example.
--- config/defconfig_x86_64-native-linuxapp-gcc | 3 + config/defconfig_x86_64-native-linuxapp-icc | 3 + examples/Makefile | 1 + examples/performance-thread/Makefile | 44 + examples/performance-thread/l3fwd-thread/Makefile | 57 + examples/performance-thread/l3fwd-thread/main.c | 3641 +++++++++++++++++++++ examples/performance-thread/l3fwd-thread/test.sh | 150 + 7 files changed, 3899 insertions(+) create mode 100644 examples/performance-thread/Makefile 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
config/defconfig_x86_64-native-linuxapp-gcc +2 -0
@@ -40,3 +40,5 @@ CONFIG_RTE_ARCH_64=y CONFIG_RTE_TOOLCHAIN="gcc" CONFIG_RTE_TOOLCHAIN_GCC=y + +CONFIG_RTE_PERFORMANCE_THREAD=y
config/defconfig_x86_64-native-linuxapp-icc +2 -0
@@ -40,3 +40,5 @@ CONFIG_RTE_ARCH_64=y CONFIG_RTE_TOOLCHAIN="icc" CONFIG_RTE_TOOLCHAIN_ICC=y + +CONFIG_RTE_PERFORMANCE_THREAD=y
examples/Makefile +1 -0
@@ -77,5 +77,6 @@ DIRS-y += vmdq DIRS-y += vmdq_dcb DIRS-$(CONFIG_RTE_LIBRTE_POWER) += vm_power_manager DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += l2fwd-crypto +DIRS-$(CONFIG_RTE_PERFORMANCE_THREAD) += performance-thread include $(RTE_SDK)/mk/rte.extsubdir.mk
examples/performance-thread/Makefile new file +44 -0
44 lines not on this page · raw message
examples/performance-thread/l3fwd-thread/Makefile new file +57 -0
57 lines not on this page · raw message
examples/performance-thread/l3fwd-thread/main.c new file +3641 -0
2,883 lines not on this page · raw message
examples/performance-thread/l3fwd-thread/test.sh new file +149 -0
149 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.1.4
Part of the diff is not shown here. View the raw message.
PATCH v7 4/4 examples: add pthread_shim example to performance thread
In reply to Ian BettsThis commit adds an example that illustrates how to implement a pthread shim with the lthread subsystem included in the performance thread example application.
--- examples/performance-thread/Makefile | 2 + 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 ++++ 5 files changed, 1173 insertions(+) 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
examples/performance-thread/Makefile +2 -0
@@ -39,6 +39,8 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk DIRS-$(CONFIG_RTE_PERFORMANCE_THREAD) += l3fwd-thread +DIRS-$(CONFIG_RTE_PERFORMANCE_THREAD) += pthread_shim + include $(RTE_SDK)/mk/rte.extsubdir.mk
examples/performance-thread/pthread_shim/Makefile new file +60 -0
60 lines not on this page · raw message
examples/performance-thread/pthread_shim/main.c new file +284 -0
284 lines not on this page · raw message
examples/performance-thread/pthread_shim/pthread_shim.c new file +714 -0
714 lines not on this page · raw message
examples/performance-thread/pthread_shim/pthread_shim.h new file +113 -0
113 lines not on this page · raw message
Signature · 1 line
2.1.4
Quoted 41 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Ian Betts
Sent: Thursday, December 3, 2015 17:21
To: [email protected]
Cc: Betts, Ian
Subject: [dpdk-dev] [PATCH v7 0/4] examples: add performance-threadThis 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.
Quoted 9 lines
Changes in this version
* fix copyright datesIan 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: addpthread_shimexample to performance thread
--
Quoted 1 line
2.1.4
Series Acked-by: Tomasz Kulasek <[email protected]>