From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751666AbbESW1K (ORCPT ); Tue, 19 May 2015 18:27:10 -0400 Received: from mail-ig0-f170.google.com ([209.85.213.170]:35876 "EHLO mail-ig0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751080AbbESW1H (ORCPT ); Tue, 19 May 2015 18:27:07 -0400 Message-ID: <555BB8B6.6070607@gmail.com> Date: Tue, 19 May 2015 16:27:02 -0600 From: David Ahern User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Namhyung Kim , Arnaldo Carvalho de Melo CC: 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 References: <1431909055-21442-1-git-send-email-namhyung@kernel.org> <1431909055-21442-39-git-send-email-namhyung@kernel.org> In-Reply-To: <1431909055-21442-39-git-send-email-namhyung@kernel.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? yes, I still need to find time to take if for a test drive; maybe by the end of the week. David