From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] mem: fix division by zero in no-NUMA mode Date: Mon, 26 Nov 2018 15:37:18 +0100 Message-ID: <24892453.gmzSld7mhP@xps> References: <294f089848bf803ff134979c612bbf28e0e2e6b9.1543229588.git.anatoly.burakov@intel.com> <73443011-2b32-ce73-ef0d-896858f7503d@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, "Hunt, David" , stable@dpdk.org To: Anatoly Burakov Return-path: In-Reply-To: <73443011-2b32-ce73-ef0d-896858f7503d@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 26/11/2018 12:14, Hunt, David: > Hi Anatoly, > > On 26/11/2018 10:57 AM, Anatoly Burakov wrote: > > When RTE_EAL_NUMA_AWARE_HUGEPAGES is set to "n", not all memtypes > > will be valid, because we skip some due to not supporting other > > NUMA nodes, leading to a division by zero error down the line > > because the necessary memtype fields weren't populated. > > > > Fix it by limiting number of memtypes to number of memtypes we > > have actually created. > > > > Fixes: 1dd342d0fdc4 ("mem: improve segment list preallocation") > > Cc: stable@dpdk.org > > > > Signed-off-by: Anatoly Burakov > > Fixes the issue on my machine. vm_power_manager crashes with floating point > exception without patch, starts successfully with patch. > > Tested-by: David Hunt Applied (in last minute), thanks