mem: use memfd for no-huge mode
authorAnatoly Burakov <anatoly.burakov@intel.com>
Thu, 13 Dec 2018 11:43:18 +0000 (11:43 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 20 Dec 2018 21:58:25 +0000 (22:58 +0100)
commitc75f535ac52b5fe2379b37df9358820a2c31f2a6
tree86ae5c5be4a2ab6f3ea1bc051901dc859bc0ee64
parentdf7722c75bedbff62686ad16951c4ad78d25611f
mem: use memfd for no-huge mode

When running in no-huge mode, we anonymously allocate our memory.
While this works for regular NICs and vdev's, it's not suitable
for memory sharing scenarios such as virtio with vhost_user
backend.

To fix this, allocate no-huge memory using memfd, and register
it with memalloc just like any other memseg fd. This will enable
using rte_memseg_get_fd() API with --no-huge EAL flag.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
doc/guides/rel_notes/release_19_02.rst
lib/librte_eal/linuxapp/eal/eal_memory.c