02/04/2019 19:23, Alejandro Lucero:
> On Tue, Apr 2, 2019 at 5:13 PM Burakov, Anatoly <anatoly.bura...@intel.com>
> wrote:
> > On 31-Mar-19 9:43 AM, Shahaf Shuler wrote:
> > > patch[1] added an address hint as starting address for 64 bit systems in
> > > case an explicit base virtual address was not set by the user.
> > >
> > > The justification for such hint was to help devices that work in VA
> > > mode and has a address range limitation to work smoothly with the eal
> > > memory subsystem.
> > >
> > > While the base address value selected may work fine for the eal
> > > initialization, it easily breaks when trying to register external memory
> > > using rte_extmem_register API.
> > >
> > > Trying to register anonymous memory on RH x86_64 machine took several
> > > minutes, during them the function eal_get_virtual_area repeatedly
> > > scanned for a good VA candidate.
> > >
> > > The attempt to guess which VA address will be free for mapping will
> > > always result in not portable, error prone code:
> > > * different application may use different libraries along w/ DPDK. One
> > >    can never guess which library was called first and how much virtual
> > >    memory it consumed.
> > > * external memory can be registered at any time in the application run
> > >    time.
> > >
> > > In order not to break the existing secondary process design, this patch
> > > only limits the max number of tries that will be done with the
> > > address hint.
> > > When the number of tries exceeds the threshold the code
> > > will use the suggested address from kernel.
> > >
> > > Fixes: 1df21702873d ("mem: use address hint for mapping hugepages")
> > > Cc: sta...@dpdk.org
> > > Cc: alejandro.luc...@netronome.com
> > >
> > > [1] commit 1df21702873d ("mem: use address hint for mapping hugepages")
> > >
> > > Signed-off-by: Shahaf Shuler <shah...@mellanox.com>
> > > ---
> > >
> > > On v2:
> > >   * instead of a complete remove of the hint limit the number of tries
> > we allow.
> > > ---
> >
> > LGTM
> >
> > Tested-by: Anatoly Burakov <anatoly.bura...@intel.com>
> >
> > We can always increase the number of tries later :)
> >
> This is also fine for me.
> If the map address is not within the supported range by a device with
> addressing limitations, the device will not be used.
> Not sure how this is likely to happen, but I guess if it is become a
> problem, another solution should be implemented.
> 
> Acked-by: Alejandro Lucero <alejandro.luc...@netronome.com>

Applied, thanks



Reply via email to