Re: [dpdk-dev] [PATCH 1/2] eal/ppc: fix mmap for memory initialization

2017-04-20 Thread Thomas Monjalon
13/04/2017 10:14, Sergio Gonzalez Monroy: > On 06/04/2017 11:06, Chao Zhu wrote: > > On IBM POWER platform, when mapping /dev/zero file to hugepage memory > > space, mmap will not respect the requested address hint. This will cause > > the memory initilization for the second process fails. This pat

Re: [dpdk-dev] [PATCH 1/2] eal/ppc: fix mmap for memory initialization

2017-04-20 Thread Thomas Monjalon
06/04/2017 12:06, Chao Zhu: > On IBM POWER platform, when mapping /dev/zero file to hugepage memory > space, mmap will not respect the requested address hint. This will cause > the memory initilization for the second process fails. This patch adds > the required mmap flags to make it work. Beside t

Re: [dpdk-dev] [PATCH 1/2] eal/ppc: fix mmap for memory initialization

2017-04-13 Thread Sergio Gonzalez Monroy
On 06/04/2017 11:06, Chao Zhu wrote: On IBM POWER platform, when mapping /dev/zero file to hugepage memory space, mmap will not respect the requested address hint. This will cause the memory initilization for the second process fails. This patch adds the required mmap flags to make it work. Besid

Re: [dpdk-dev] [PATCH 1/2] eal/ppc: fix mmap for memory initialization

2017-04-12 Thread Chao Zhu
Sergio, Thanks for the comments! On POWER, if it doesn't specify the MAP_HUGETLB flag when doing mapping, it may get the addresses from other regions. However, the address space size of hugepages is exactly the same as the value specified by user when doing initialization. There will be not enough

Re: [dpdk-dev] [PATCH 1/2] eal/ppc: fix mmap for memory initialization

2017-04-06 Thread Sergio Gonzalez Monroy
Hi Chao, You mentioned that 'mmap will not respect the requested address hint', how does the proposed change solves that? Is it that hugepages map to a specific VA region, and without MAP_HUGETLB you may get address from wrong region? If mmap were to respect the hinted address, we could do

[dpdk-dev] [PATCH 1/2] eal/ppc: fix mmap for memory initialization

2017-04-06 Thread Chao Zhu
On IBM POWER platform, when mapping /dev/zero file to hugepage memory space, mmap will not respect the requested address hint. This will cause the memory initilization for the second process fails. This patch adds the required mmap flags to make it work. Beside this, users need to set the nr_overco