mbox series

[v2,0/5] Allow using virtio without hugepages

Message ID cover.1544546363.git.anatoly.burakov@intel.com (mailing list archive)
Headers show
Series Allow using virtio without hugepages | expand

Message

Anatoly Burakov Dec. 11, 2018, 4:43 p.m. UTC
It is already possible to use both DPDK in general and
virtio specifically, without hugetlbfs mounts, but
currently virtio cannot be used without hugepage memory
(i.e. with a --no-huge EAL switch) due to the fact that
it needs to share memory with the backend.

This patchset uses memfd to create actual files backing
anonymous memory. This enabled virtio to work not only
without hugetlbfs, but without hugepages altogether,
which could be useful in Cloud Native scenarios.

v2:
- Fixed segment fd list not being initialized
- Added some segment fd API fixes
- Added unit test for segment fd API

Anatoly Burakov (5):
  mem: fix error code for segment fd API for external segs
  memalloc: check for memfd support in segment fd API
  memalloc: allow setting up segment list fd's
  mem: use memfd for no-huge mode
  test: add segment fd API test

 doc/guides/rel_notes/release_19_02.rst     | 13 +++++
 lib/librte_eal/bsdapp/eal/eal_memalloc.c   |  6 ++
 lib/librte_eal/common/eal_common_memory.c  | 12 ++++
 lib/librte_eal/common/eal_memalloc.h       |  4 ++
 lib/librte_eal/linuxapp/eal/eal_memalloc.c | 66 +++++++++++++++++++---
 lib/librte_eal/linuxapp/eal/eal_memory.c   | 54 +++++++++++++++++-
 test/test/test_memory.c                    | 43 ++++++++++++++
 7 files changed, 188 insertions(+), 10 deletions(-)

Comments

Tiwei Bie Dec. 13, 2018, 4:53 a.m. UTC | #1
On Tue, Dec 11, 2018 at 04:43:27PM +0000, Anatoly Burakov wrote:
> It is already possible to use both DPDK in general and
> virtio specifically, without hugetlbfs mounts, but
> currently virtio cannot be used without hugepage memory
> (i.e. with a --no-huge EAL switch) due to the fact that
> it needs to share memory with the backend.
> 
> This patchset uses memfd to create actual files backing
> anonymous memory. This enabled virtio to work not only
> without hugetlbfs, but without hugepages altogether,
> which could be useful in Cloud Native scenarios.

Nice work!

Acked-by: Tiwei Bie <tiwei.bie@intel.com>

> 
> v2:
> - Fixed segment fd list not being initialized
> - Added some segment fd API fixes
> - Added unit test for segment fd API
> 
> Anatoly Burakov (5):
>   mem: fix error code for segment fd API for external segs
>   memalloc: check for memfd support in segment fd API
>   memalloc: allow setting up segment list fd's
>   mem: use memfd for no-huge mode
>   test: add segment fd API test
> 
>  doc/guides/rel_notes/release_19_02.rst     | 13 +++++
>  lib/librte_eal/bsdapp/eal/eal_memalloc.c   |  6 ++
>  lib/librte_eal/common/eal_common_memory.c  | 12 ++++
>  lib/librte_eal/common/eal_memalloc.h       |  4 ++
>  lib/librte_eal/linuxapp/eal/eal_memalloc.c | 66 +++++++++++++++++++---
>  lib/librte_eal/linuxapp/eal/eal_memory.c   | 54 +++++++++++++++++-
>  test/test/test_memory.c                    | 43 ++++++++++++++
>  7 files changed, 188 insertions(+), 10 deletions(-)
> 
> -- 
> 2.17.1