[dpdk-dev] [PATCH v3 00/35] mempool: rework memory allocation

Thomas Monjalon thomas.monjalon at 6wind.com
Fri May 20 11:09:08 CEST 2016


2016-05-20 11:42, Panu Matilainen:
> Just noticed this series "breaks" --no-huge as a regular user, commit 
> 593a084afc2b to be exact:
> 
> mmap(NULL, 4194304, PROT_READ|PROT_WRITE, 
> MAP_PRIVATE|MAP_ANONYMOUS|MAP_LOCKED, 0, 0) = -1 EAGAIN (Resource 
> temporarily unavailable)
> write(1, "EAL: rte_eal_hugepage_init: mmap"..., 76EAL: 
> rte_eal_hugepage_init: mmap() failed: Resource temporarily unavailable
> 
> "Breaks" in quotes because I guess it always was broken (as the 
> non-locked pages might not be in physical memory) and because its
> possible to adjust resourse limits to allow the operation to succeed.
> If you're root, that is.
> 
> I was just looking into making the test-suite runnable by a regular user 
> with no special privileges,

I have the same dream, to make sure every developer can run the unit tests
easily and quickly.

> primarily to make it possible to run the 
> testsuite as part of rpm package builds (in %check), and no special 
> setup or extra privileges can be assumed there. Such tests are of course 
> of limited coverage but still better than nothing, and --no-huge was my 
> ticket there. Talk about bad timing :)
> 
> It'd be fine to have limited subset of tests to run when non-privileged 
> but since this one lives inside rte_eal_init() it practically prevents 
> everything, unless I'm missing some other magic switch or such. Thoughts?

This change was done for mbuf allocation because they are passed to the
hardware. We should not have any hardware constraint in the unit tests.
So I'd say it is a requirement for the memory rework. We must be capable
to allocate some locked pages if required, and some standard pages for
other usages.
Please jump in this thread:
	http://dpdk.org/ml/archives/dev/2016-April/037444.html


More information about the dev mailing list