mem: do not use lockfiles for single file segments mode
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 29 Mar 2019 17:55:29 +0000 (17:55 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 2 Apr 2019 14:07:25 +0000 (16:07 +0200)
commit1e3380a2f48c6ca87528578f9665e89115bef05f
treeec7b1b19e99264a91786be9cebcfe11da6fce8e4
parent848cbff836394695cd9da372e70c8486f5a4e30a
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>
doc/guides/prog_guide/env_abstraction_layer.rst
lib/librte_eal/common/eal_filesystem.h
lib/librte_eal/linux/eal/eal_memalloc.c