numam-dpdk/lib/librte_eal
Didier Pallard 937cca79c9 mem: change default per socket memory allocation
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
If this new algorithm fails, it defaults to previous behaviour.

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.

It is implemented only for Linux as BSD part looks not to be ready for NUMA.

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Venky Venkatesan <venky.venkatesan@intel.com>
2014-05-14 11:06:49 +02:00
..
bsdapp pci: rework interrupt fd init and fix fd leak 2014-05-13 13:20:47 +02:00
common version: 1.7.0-rc0 2014-05-13 10:11:17 +02:00
linuxapp mem: change default per socket memory allocation 2014-05-14 11:06:49 +02:00
Makefile add FreeBSD support 2014-02-25 21:29:18 +01:00