summaryrefslogtreecommitdiff
path: root/doc/guides/prog_guide/multi_proc_support.rst
diff options
context:
space:
mode:
authorAnatoly Burakov <anatoly.burakov@intel.com>2018-05-25 14:41:02 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-05-28 02:14:49 +0200
commitb31739328354b1f4068fc24cceb3f06434d19b74 (patch)
tree047a0efeff4089c42d08e2e03275bf9419885c85 /doc/guides/prog_guide/multi_proc_support.rst
parentcc789005fc66f96f1471ceb53be4044ba9dbcd74 (diff)
downloaddpdk-b31739328354b1f4068fc24cceb3f06434d19b74.zip
dpdk-b31739328354b1f4068fc24cceb3f06434d19b74.tar.gz
dpdk-b31739328354b1f4068fc24cceb3f06434d19b74.tar.xz
doc: update guides for memory subsystem
Document new command-line switches and the principles behind the new memory subsystem. Also, replace outdated malloc heap picture. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Diffstat (limited to 'doc/guides/prog_guide/multi_proc_support.rst')
-rw-r--r--doc/guides/prog_guide/multi_proc_support.rst19
1 files changed, 15 insertions, 4 deletions
diff --git a/doc/guides/prog_guide/multi_proc_support.rst b/doc/guides/prog_guide/multi_proc_support.rst
index 371d028..46a00ec 100644
--- a/doc/guides/prog_guide/multi_proc_support.rst
+++ b/doc/guides/prog_guide/multi_proc_support.rst
@@ -63,6 +63,10 @@ and point to the same objects, in both processes.
Refer to `Multi-process Limitations`_ for details of
how Linux kernel Address-Space Layout Randomization (ASLR) can affect memory sharing.
+ If the primary process was run with ``--legacy-mem`` or
+ ``--single-file-segments`` switch, secondary processes must be run with the
+ same switch specified. Otherwise, memory corruption may occur.
+
.. _figure_multi_process_memory:
.. figure:: img/multi_process_memory.*
@@ -116,8 +120,13 @@ The rte part of the filenames of each of the above is configurable using the fil
In addition to specifying the file-prefix parameter,
any DPDK applications that are to be run side-by-side must explicitly limit their memory use.
-This is done by passing the -m flag to each process to specify how much hugepage memory, in megabytes,
-each process can use (or passing ``--socket-mem`` to specify how much hugepage memory on each socket each process can use).
+This is less of a problem on Linux, as by default, applications will not
+allocate more memory than they need. However if ``--legacy-mem`` is used, DPDK
+will attempt to preallocate all memory it can get to, and memory use must be
+explicitly limited. This is done by passing the ``-m`` flag to each process to
+specify how much hugepage memory, in megabytes, each process can use (or passing
+``--socket-mem`` to specify how much hugepage memory on each socket each process
+can use).
.. note::
@@ -144,8 +153,10 @@ There are a number of limitations to what can be done when running DPDK multi-pr
Some of these are documented below:
* The multi-process feature requires that the exact same hugepage memory mappings be present in all applications.
- The Linux security feature - Address-Space Layout Randomization (ASLR) can interfere with this mapping,
- so it may be necessary to disable this feature in order to reliably run multi-process applications.
+ This makes secondary process startup process generally unreliable. Disabling
+ Linux security feature - Address-Space Layout Randomization (ASLR) may
+ help getting more consistent mappings, but not necessarily more reliable -
+ if the mappings are wrong, they will be consistently wrong!
.. warning::