[dpdk-dev] [PATCH v2 4/5] mem: use memfd for no-huge mode
Burakov, Anatoly
anatoly.burakov at intel.com
Thu Dec 13 12:36:45 CET 2018
On 13-Dec-18 4:59 AM, Tiwei Bie wrote:
> On Tue, Dec 11, 2018 at 04:43:31PM +0000, Anatoly Burakov wrote:
>> 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 at intel.com>
>> ---
>>
>> Notes:
>> v2:
>> - Detect memfd support at compile time
>> - Change memfd-related log level to debug
>>
>> doc/guides/rel_notes/release_19_02.rst | 5 +++
>> lib/librte_eal/linuxapp/eal/eal_memory.c | 54 +++++++++++++++++++++++-
>> 2 files changed, 57 insertions(+), 2 deletions(-)
>>
>> diff --git a/doc/guides/rel_notes/release_19_02.rst b/doc/guides/rel_notes/release_19_02.rst
>> index 960098582..420d51b5b 100644
>> --- a/doc/guides/rel_notes/release_19_02.rst
>> +++ b/doc/guides/rel_notes/release_19_02.rst
>> @@ -23,6 +23,11 @@ DPDK Release 19.02
>> New Features
>> ------------
>>
>> +* **Support for using VirtIO without hugepages**
>> +
>> + The --no-huge mode was augmented to use memfd-backed memory (on systems that
>> + support memfd), to allow using VirtIO-based NICs without hugepages.
>
> It would be better to say virtio-user here, because virtio NICs
> e.g. the one emulated by QEMU, could be something quite different.
Thanks, will fix!
>
>> +
>> .. This section should contain new features added in this release.
>> Sample format:
>>
> [...]
>
--
Thanks,
Anatoly
More information about the dev
mailing list