From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Holasek Subject: Re: [PATCH] libnuma: disable caching of node cpusmasks Date: Tue, 16 Jun 2015 16:40:53 +0200 Message-ID: <20150616144053.GH3650@localhost.localdomain> References: <1434122172-26560-1-git-send-email-pholasek@redhat.com> <20150612153001.GW19417@two.firstfloor.org> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <20150612153001.GW19417@two.firstfloor.org> Sender: linux-numa-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Andi Kleen Cc: linux-numa@vger.kernel.org, Filipe Brandenburger , Cliff Wickman On Fri, 12 Jun 2015, Andi Kleen wrote: > > @@ -1329,25 +1321,12 @@ numa_node_to_cpus_v2(int node, struct bitmask *buffer) > > size_t len = 0; > > struct bitmask *mask; > > > > - if (!node_cpu_mask_v2) > > - init_node_cpu_mask_v2(); > > - > > if (node > nnodes) { > > errno = ERANGE; > > return -1; > > } > > numa_bitmask_clearall(buffer); > > > > - if (node_cpu_mask_v2[node]) { > > I was playing around with info (http://fbinfer.com/) earlier, and ran it over > numactl, and it complained about exactly this line: it can reference NULL > when the memory allocation above fails. So it's good to remove it. > > Would be good to see how much performance difference it makes though. > Do you have any data? If it's significant may need to do a time out > or similar. > I did simple comparison for 1 million of numa_node_to_cpus() calls and disabled caching extended time three times (from 10 seconds to 30). -- Petr Holasek pholasek@redhat.com