From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] eal: change default per socket memory allocation Date: Wed, 14 May 2014 11:15:34 +0200 Message-ID: <4867043.OXANNGufED@xps13> References: <1399642242-19725-1-git-send-email-david.marchand@6wind.com> <1FD9B82B8BF2CF418D9A1000154491D9740AADF4@ORSMSX102.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: dev-VfR2kkLFssw@public.gmane.org To: Didier Pallard Return-path: In-Reply-To: <1FD9B82B8BF2CF418D9A1000154491D9740AADF4-P5GAC/sN6hlcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" > Currently, if there is more memory in hugepages than the amount reque= sted 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 dp= dk 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...=20 > Change this behaviour to allocate memory on all sockets where some co= res are > configured, spreading the memory amongst sockets using following rati= o per > socket: > N=B0 of cores configured on the socket / Total number of configured > cores * requested memory >=20 > This algorithm is used when memory amount is specified globally using= -m > option. Per socket memory allocation can always be done using --socke= t-mem > option. =20 > Changes included in v2: > - only update linux implementation as bsd looks not to be ready for n= uma > - if new algorithm fails, then defaults to previous behaviour >=20 > Signed-off-by: Didier Pallard > Signed-off-by: David Marchand >=20 > Acked-by: Venky Venkatesan Applied for version 1.7.0. Thanks --=20 Thomas