summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAnatoly Burakov <anatoly.burakov@intel.com>2019-03-29 17:55:29 +0000
committerThomas Monjalon <thomas@monjalon.net>2019-04-02 16:07:25 +0200
commit1e3380a2f48c6ca87528578f9665e89115bef05f (patch)
treeec7b1b19e99264a91786be9cebcfe11da6fce8e4 /doc
parent848cbff836394695cd9da372e70c8486f5a4e30a (diff)
downloaddpdk-draft-windows-1e3380a2f48c6ca87528578f9665e89115bef05f.zip
dpdk-draft-windows-1e3380a2f48c6ca87528578f9665e89115bef05f.tar.gz
dpdk-draft-windows-1e3380a2f48c6ca87528578f9665e89115bef05f.tar.xz
mem: do not use lockfiles for single file segments mode
Due to internal glibc limitations [1], DPDK may exhaust internal file descriptor limits when using smaller page sizes, which results in inability to use system calls such as select() by user applications. Single file segments option stores lock files per page to ensure that pages are deleted when there are no more users, however this is not necessary because the processes will be holding onto the pages anyway because of mmap(). Thus, removing pages from the filesystem is safe even though they may be used by some other secondary process. As a result, single file segments mode no longer stores inordinate amounts of segment fd's, and the above issue with fd limits is solved. However, this will not work for legacy mem mode. For that, simply document that using bigger page sizes is the only option. [1] https://mails.dpdk.org/archives/dev/2019-February/124386.html Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/guides/prog_guide/env_abstraction_layer.rst18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst
index c134636..6a04c3c 100644
--- a/doc/guides/prog_guide/env_abstraction_layer.rst
+++ b/doc/guides/prog_guide/env_abstraction_layer.rst
@@ -214,6 +214,24 @@ Normally, these options do not need to be changed.
can later be mapped into that preallocated VA space (if dynamic memory mode
is enabled), and can optionally be mapped into it at startup.
++ Segment file descriptors
+
+On Linux, in most cases, EAL will store segment file descriptors in EAL. This
+can become a problem when using smaller page sizes due to underlying limitations
+of ``glibc`` library. For example, Linux API calls such as ``select()`` may not
+work correctly because ``glibc`` does not support more than certain number of
+file descriptors.
+
+There are two possible solutions for this problem. The recommended solution is
+to use ``--single-file-segments`` mode, as that mode will not use a file
+descriptor per each page, and it will keep compatibility with Virtio with
+vhost-user backend. This option is not available when using ``--legacy-mem``
+mode.
+
+Another option is to use bigger page sizes. Since fewer pages are required to
+cover the same memory area, fewer file descriptors will be stored internally
+by EAL.
+
Support for Externally Allocated Memory
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~