[dpdk-dev] [PATCH 2/4] mem: add API to obstain memory-backed file info
p.fedin at samsung.com
Tue Jan 12 12:37:54 CET 2016
> So are you suggesting to not introduce --single-file option but instead
> AFAIK --single-file was trying to workaround the limitation of just
> being able to map 8 fds.
Heh, yes, you're right... Indeed, sorry, i was not patient enough, i see it uses hpi->hugedir instead of using /dev/shm... I was confused by the code path... It seemed that --single-file is an alias to --no-hugepages.
And the patch still changes mmap() mode to SHARED unconditionally, which is not good in terms of backwards compability (and this is explicitly noticed in the cover letter).
So, let's try to sort out...
a) By default we should still have MAP_PRIVATE
b) Let's say that we need --shared-mem in order to make it MAP_SHARED. This can be combined with --no-hugepages if necessary (this is what i tried to implement based on the old RFC).
c) Let's say that --single-file uses hugetlbfs but maps everything via single file. This still can be combined with --shared-mem.
wouldn't this be more clear, more straightforward and implication-free?
And if we agree on that, we could now try to decrease number of options:
a) We could imply MAP_SHARED if cvio is used, because shared memory is mandatory in this case.
b) (c) above again raises a question: doesn't it make CONFIG_RTE_EAL_SIGLE_FILE_SEGMENTS obsolete? Or may be we could use that one instead of --single-file (however i'm not a fan of compile-time configuration like this)?
Samsung Electronics Research center Russia
More information about the dev