Skip to content

eal: add memory pre-allocation from existing files

Dmitry Kozlyuk dpdk-dev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest3 patches 15 repliesIn review
  2. v53 patches 4 repliesSuperseded
  3. v43 patches 0 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3eal/linux: make hugetlbfs analysis reusablelib/eal/linux/eal_hugepage_info.c lib/eal/linux/eal_hugepage_info.h+135 -572 replies
2/3eal: add memory pre-allocation from existing filesdoc/guides/linux_gsg/linux_eal_parameters.rst lib/eal/common/eal_common_dynmem.c lib/eal/common/eal_common_options.c +10 more+441 -137 replies
3/3app/test: add allocator performance autotestapp/test/meson.build app/test/test_malloc_perf.c+163 -03 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchViacheslav OvsiienkoJohn Levon
1/3R-b R-b
2/3
3/3R-b

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

Read the v6 thread

Cover letter [dpdk-dev] [PATCH v6 0/3] eal: add memory pre-allocation from existing files

Hugepage allocation from the system takes time, resulting in slow startup or sporadic delays later. Most of the time spent in kernel is zero-filling memory for security reasons, which may be irrelevant in a controlled environment. The bottleneck is memory access speed, so for speeduup the amount of memory cleared must be reduced. We propose a new EAL option --mem-file FILE1,FILE2,... to quickly allocate dirty pages from existing files and clean it as necessary. A new malloc_perf_autotest is provided to estimate the impact. More details are explained in relevant patches.

v6: fix copyright line (Thomas), add SPDX header for the new test file
(BTW, why didn't the CI complain in previous versions?)
v5: rebase
v4: getmntent() -> getmntent_r(), better error detection (John Levon)
v3: fix hugepage mount point detection
v2: fix CI failures

Dmitry Kozlyuk (2):
eal/linux: make hugetlbfs analysis reusable
app/test: add allocator performance autotest

Viacheslav Ovsiienko (1):
eal: add memory pre-allocation from existing files

 app/test/meson.build                          |   2 +
 app/test/test_malloc_perf.c                   | 161 +++++++++
 doc/guides/linux_gsg/linux_eal_parameters.rst |  17 +
 lib/eal/common/eal_common_dynmem.c            |   6 +
 lib/eal/common/eal_common_options.c           |  23 ++
 lib/eal/common/eal_internal_cfg.h             |   4 +
 lib/eal/common/eal_memalloc.h                 |   8 +-
 lib/eal/common/eal_options.h                  |   2 +
 lib/eal/common/malloc_elem.c                  |   5 +
 lib/eal/common/malloc_heap.h                  |   8 +
 lib/eal/common/rte_malloc.c                   |  16 +-
 lib/eal/include/rte_memory.h                  |   4 +-
 lib/eal/linux/eal.c                           |  28 ++
 lib/eal/linux/eal_hugepage_info.c             | 158 ++++++---
 lib/eal/linux/eal_hugepage_info.h             |  39 +++
 lib/eal/linux/eal_memalloc.c                  | 328 +++++++++++++++++-
 16 files changed, 739 insertions(+), 70 deletions(-)
 create mode 100644 app/test/test_malloc_perf.c
 create mode 100644 lib/eal/linux/eal_hugepage_info.h
Signature · 1 line
2.25.1