From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752432AbbETAOy (ORCPT ); Tue, 19 May 2015 20:14:54 -0400 Received: from lgeamrelo04.lge.com ([156.147.1.127]:47333 "EHLO lgeamrelo04.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752229AbbETAOg (ORCPT ); Tue, 19 May 2015 20:14:36 -0400 X-Original-SENDERIP: 10.177.220.203 X-Original-MAILFROM: namhyung@kernel.org Date: Wed, 20 May 2015 09:05:12 +0900 From: Namhyung Kim To: David Ahern Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , Adrian Hunter , Andi Kleen , Frederic Weisbecker , Stephane Eranian Subject: Re: [PATCH 38/40] perf session: Handle index files generally Message-ID: <20150520000512.GC22713@sejong> References: <1431909055-21442-1-git-send-email-namhyung@kernel.org> <1431909055-21442-39-git-send-email-namhyung@kernel.org> <555BB8B6.6070607@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <555BB8B6.6070607@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On Tue, May 19, 2015 at 04:27:02PM -0600, David Ahern wrote: > On 5/17/15 6:30 PM, Namhyung Kim wrote: > >The current code assumes that the number of index item and cpu are > >matched so it creates that number of threads. But it's not the case > >of non-system-wide session or data came from different machine. > > > >Just creates threads at most number of online cpus and process data. > > -----8<----- > > >@@ -1717,6 +1742,7 @@ int perf_session__process_events_mt(struct perf_session *session, void *arg) > > int err, i, k; > > int nr_index = session->header.nr_index; > > u64 size = perf_data_file__size(file); > >+ int nr_thread = sysconf(_SC_NPROCESSORS_ONLN); > > It's not clear to me how this multi-threaded perf is going to work on large > systems especially this patch if a system has holes in the active cpus. e.g, > > # lscpu > Architecture: sparc64 > CPU op-mode(s): 32-bit, 64-bit > Byte Order: Big Endian > CPU(s): 704 > On-line CPU(s) list: 32-63,128-223,256-351,384-479,576-831,864-927,960-1023 > Thread(s) per core: 12 > Core(s) per socket: 18 > Socket(s): 3 > NUMA node(s): 4 > NUMA node0 CPU(s): 32-63,128-223 > NUMA node1 CPU(s): 256-351,384-479 > NUMA node2 CPU(s): 576-767 > NUMA node3 CPU(s): 768-831,864-927,960-1023 > > So you are going to spawn 704 threads? Each thread handles a per-cpu buffer? Oh, I need to add an option (and probably a config variable too) to specify number of thread to run. > > yes, I still need to find time to take if for a test drive; maybe by the end > of the week. Oh, it'd be very nice if you can test and share the numbers on such a large machine. I'll send the --num-thread option patch soon on top of this series for you. :) Thanks, Namhyung > > David > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/