On 13-Jul-18 1:13 PM, Thomas Monjalon wrote:
13/07/2018 12:27, Anatoly Burakov:
This command-line option will cause DPDK to operate entirely in
memory and not create any shared files at runtime, including any
shared configuration or hugetlbfs files. This is useful for debug
purposes, as well as for certain use cases like containers or
automatic memory cleanup.
Currently, this option acts as a strict superset of --no-shconf and
--huge-unlink commands.
Signed-off-by: Anatoly Burakov <anatoly.bura...@intel.com>
I would like to see some support or review for this feature.
While the justification for it can be use-cases like running a DPDK
process without worrying about cleaning up its hugepages afterwards
(somewhat less of a concern since 18.05 but still a concern if primary
crashes), it is really fixing the no-shconf/huge-unlink options to not
be half-measures.
Both of these options effectively disable secondary processes, but don't
do it in a consistent way - huge-unlink cleans up hugepages after
allocating them, but leaves shared config on. No-shconf disables shared
config, but leaves hugepages in place. Since 18.05, huge-unlink didn't
work anyway (wasn't implemented, which was my omission), and due to EAL
now relying on fbarray's to store some data, no-shconf wasn't working
correctly either because even though shared config wasn't created, two
primaries still couldn't share a prefix with --no-shconf (see the first
patch).
So, this patchset is really an acknowledgement of the fact that both
huge-unlink and no-shconf options are really there to disable secondary
processes and stop leaving files on the file system. I just went one
step further, and instead of allocating-and-then-removing hugepages
we're not creating them in the first place, and map them anonymously
instead.
--
Thanks,
Anatoly