Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752746AbbLNRHj (ORCPT ); Mon, 14 Dec 2015 12:07:39 -0500 Received: from mail-pf0-f169.google.com ([209.85.192.169]:35361 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752416AbbLNRHf (ORCPT ); Mon, 14 Dec 2015 12:07:35 -0500 Date: Tue, 15 Dec 2015 02:06:54 +0900 From: Namhyung Kim To: David Ahern Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Jiri Olsa , LKML , Frederic Weisbecker , Andi Kleen , Stephane Eranian , Adrian Hunter Subject: Re: [PATCHSET 00/16] perf top: Add multi-thread support (v1) Message-ID: <20151214170654.GC23614@danjae.kornet> References: <1449734015-9148-1-git-send-email-namhyung@kernel.org> <20151210080118.GA8664@gmail.com> <5E6F0F13-9696-45F1-A0E8-CA0B95020D10@gmail.com> <20151211081141.GA21600@gmail.com> <566AE54B.1010702@gmail.com> <20151214092613.GL6357@twins.programming.kicks-ass.net> <566ED644.2010601@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <566ED644.2010601@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2615 Lines: 61 Hi David, On Mon, Dec 14, 2015 at 07:46:28AM -0700, David Ahern wrote: > On 12/14/15 2:26 AM, Peter Zijlstra wrote: > >On Fri, Dec 11, 2015 at 08:01:31AM -0700, David Ahern wrote: > >>On 12/11/15 1:11 AM, Ingo Molnar wrote: > >>> > >>>* Namhyung Kim wrote: > >>> > >>>>IIRC David said that thread per cpu seems too much especially on a large system > >>>>(like ~1024 cpu). [...] > >>> > >>>Too much in what fashion? For recording I think it's the fastest, most natural > >>>model - anything else will create cache line bounces. > >> > >>The intrusiveness of perf on the system under observation. I understand > >>there are a lot of factors that go into it. > > > >So I can see some of that, if every cpu has its own thread then every > >cpu will occasionally schedule that thread. Whereas if there were less, > >you'd not have that. > > > >Still, I think it makes sense to implement it, we need the multi-file > >option anyway. Once we have that, we can also implement a per-node > >option, which should be a fairly simple hybrid of the two approaches. > > > >The thing is, perf-record is really struggling on big machines. > > I've gone from the 1024-cpu sparc systems earlier this year down to small > PPC and Rangeley-based switches. For both ends of the scale (and in between) > I constantly struggle with the options to manage memory, cpu and disk > consumption. > > There definitely needs to be options (e.g., multi-threaded on/off). For the > threading options I get the appeal for 1-thread per cpu but other options > make sense as well -- 1 thread per core, 1 per NUMA node. perf has the CPU > topology so should not be too difficult. I think we can use --num-thread option to control multi-threading: 1 for disabling and others for enabling. In the current implementation, using 1 thread still use same logic so 1 reader + 1 collector will be created as well as 1 display thread. Not sure it'd be better special casing 1 thread to use different code path. Anyway, I think it'd be nice to have per-core, per-socket and per-node options and per-core is a good default then. > > If you have 1-thread per cpu that means you are pinning the threads to the > cpu? That brings in additional permissions problems. Did you mean setting sched affinity? It seems not a privileged operation doing it for its own threads.. Thanks, Namhyung -- 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/