Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760095AbcJSSht convert rfc822-to-8bit (ORCPT ); Wed, 19 Oct 2016 14:37:49 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:45772 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759838AbcJSShr (ORCPT ); Wed, 19 Oct 2016 14:37:47 -0400 Date: Wed, 19 Oct 2016 20:37:17 +0200 From: Sebastian Andrzej Siewior To: Davidlohr Bueso Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Jiri Olsa , Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH 2/2 v2] perf bench futex: add NUMA support Message-ID: <20161019183717.hsdvutfsizxk3gb6@linutronix.de> References: <20161016190803.3392-1-bigeasy@linutronix.de> <20161016190803.3392-2-bigeasy@linutronix.de> <20161017143821.GO12815@kernel.org> <20161017150123.GA18595@krava> <20161017150442.GQ12815@kernel.org> <20161017153331.pkzaij5a3ma5c5s5@linutronix.de> <20161019181616.GC30561@linux-80c1.suse> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20161019181616.GC30561@linux-80c1.suse> User-Agent: NeoMutt/20161014 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 951 Lines: 26 On 2016-10-19 11:16:16 [-0700], Davidlohr Bueso wrote: > On Mon, 17 Oct 2016, Sebastian Andrzej Siewior wrote: > > > By default the application uses malloc() and all available CPUs. This > > patch introduces NUMA support which means: > > - memory is allocated node local via numa_alloc_local() > > - all CPUs of the specified NUMA node are used. This is also true if the > > number of threads set is greater than the number of CPUs available on > > this node. > > Can't we just use numactl to bind cpus and memory to be node-local? something like numactl --cpunodebind=$NODE --membind=$NODE perf … ? This should work for memory however since we use pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpu); we would need to query the affinity mask, and deploy threads based on that mask. Using NUMA support within this bench-tool has also the side effect that the output gives all the option used. > Thanks, > Davidlohr Sebastian