> Currently, if there is more memory in hugepages than the amount requested by > dpdk application, the memory is allocated by taking as much memory as > possible from each socket, starting from first one. For example if a > system is configured with 8 GB in 2 sockets (4 GB per socket), and dpdk is > requesting only 4GB of memory, all memory will be taken in socket 0 (that > have exactly 4GB of free hugepages) even if some cores are configured on > socket 1, and there are free hugepages on socket 1... > Change this behaviour to allocate memory on all sockets where some cores are > configured, spreading the memory amongst sockets using following ratio per > socket: > N? of cores configured on the socket / Total number of configured > cores * requested memory > > This algorithm is used when memory amount is specified globally using -m > option. Per socket memory allocation can always be done using --socket-mem > option.
> Changes included in v2: > - only update linux implementation as bsd looks not to be ready for numa > - if new algorithm fails, then defaults to previous behaviour > > Signed-off-by: Didier Pallard <didier.pallard at 6wind.com> > Signed-off-by: David Marchand <david.marchand at 6wind.com> > > Acked-by: Venky Venkatesan <Venky.venkatesan at intel.com> Applied for version 1.7.0. Thanks -- Thomas