Skip to content

Improve running DPDK without hugetlbfs mounpoint

Anatoly Burakov dpdk-dev 3 versions – Applied

Status from this message: Applied, tha nks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest9 patches 14 repliesApplied
  2. v29 patches 0 repliesSuperseded
  3. v18 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- Fixed single file segments mode for fd offsets

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/9fbarray: fix detach in noshconf modelib/librte_eal/common/eal_common_fbarray.c+4 -01 reply
2/9eal: don't allow legacy mode with in-memory modelib/librte_eal/common/eal_common_options.c+6 -02 replies
3/9mem: raise maximum fd limit unconditionallylib/librte_eal/linuxapp/eal/eal_memory.c+20 -01 reply
4/9memalloc: rename lock list to fd listlib/librte_eal/linuxapp/eal/eal_memalloc.c+37 -291 reply
5/9memalloc: track page fd's in non-single file modelib/librte_eal/linuxapp/eal/eal_memalloc.c+25 -191 reply
6/9memalloc: add EAL-internal API to get and set segment fd'slib/librte_eal/bsdapp/eal/eal_memalloc.c lib/librte_eal/common/eal_common_memory.c lib/librte_eal/common/eal_memalloc.h +2 more+109 -212 replies
7/9mem: add external API to retrieve page fd from EALlib/librte_eal/bsdapp/eal/eal_memalloc.c lib/librte_eal/common/eal_common_memory.c lib/librte_eal/common/eal_memalloc.h +3 more+118 -91 reply
8/9mem: allow querying offset into segment fdlib/librte_eal/bsdapp/eal/eal_memalloc.c lib/librte_eal/common/eal_common_memory.c lib/librte_eal/common/eal_memalloc.h +3 more+134 -01 reply
9/9mem: support using memfd segments for in-memory modelib/librte_eal/common/eal_common_options.c lib/librte_eal/linuxapp/eal/eal_memalloc.c+235 -361 reply

Reviews trailers per patch

8 of 9 patches have a Reviewed-by or Acked-by.

PatchMaxime Coquelin
1/9R-b
2/9R-b
3/9R-b
4/9R-b
5/9R-b
6/9
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/9] Improve running DPDK without hugetlbfs mounpoint

This patchset further improves DPDK support for running without hugetlbfs mountpoints.

First of all, it enables using memfd-created hugepages in in-memory mode. This way, instead of anonymous hugepages, we can get proper fd's for each page (or for the entire segment, if we're using single-file segments). Memfd will be used automatically if support for it was compiled and is available at runtime, however DPDK will fall back to using anonymous hugepages if such support is not available.

The other thing this patchset does is exposing segment fd's through an external API. There is a lot of ugliness in current virtio/vhost code that deals with finding hugepage files through procfs, while all virtio really needs are fd's referring to the pages, and their offsets. Using this API, virtio will be able to access segment fd's directly, without the procfs magic.

As a bonus, because we enabled use of memfd (given that sufficiently recent kernel version is used), once virtio support for getting segment fd's using the new API is implemented, virtio will also be able to work without having hugetlbfs mountpoints.

Virtio support is not provided in this patchset, coordination and implementation of it is up to virtio maintainers.

Once virtio support for this is in place, DPDK will have one less barrier for adoption in container space.

v2->v3:
- Fixed single file segments mode for fd offsets

v1->v2:
- Added a new API to retrieve segment offset into its fd

Anatoly Burakov (9):
fbarray: fix detach in noshconf mode
eal: don't allow legacy mode with in-memory mode
mem: raise maximum fd limit unconditionally
memalloc: rename lock list to fd list
memalloc: track page fd's in non-single file mode
memalloc: add EAL-internal API to get and set segment fd's
mem: add external API to retrieve page fd from EAL
mem: allow querying offset into segment fd
mem: support using memfd segments for in-memory mode

 lib/librte_eal/bsdapp/eal/eal_memalloc.c   |  19 +
 lib/librte_eal/common/eal_common_fbarray.c |   4 +
 lib/librte_eal/common/eal_common_memory.c  | 107 ++++-
 lib/librte_eal/common/eal_common_options.c |  12 +-
 lib/librte_eal/common/eal_memalloc.h       |  11 +
 lib/librte_eal/common/include/rte_memory.h |  97 +++++
 lib/librte_eal/linuxapp/eal/eal_memalloc.c | 452 +++++++++++++++++----
 lib/librte_eal/linuxapp/eal/eal_memory.c   |  64 ++-
 lib/librte_eal/rte_eal_version.map         |   4 +
 9 files changed, 672 insertions(+), 98 deletions(-)
Signature · 1 line
2.17.1