Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751580AbdISOYL (ORCPT ); Tue, 19 Sep 2017 10:24:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:60446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751462AbdISOYK (ORCPT ); Tue, 19 Sep 2017 10:24:10 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C64EC21BCE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Date: Tue, 19 Sep 2017 11:24:05 -0300 From: Arnaldo Carvalho de Melo To: "Liang, Kan" Cc: Jiri Olsa , "peterz@infradead.org" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , "jolsa@kernel.org" , "namhyung@kernel.org" , "Hunter, Adrian" , "Odzioba, Lukasz" , "ak@linux.intel.com" Subject: Re: [PATCH RFC V2 00/10] perf top optimization Message-ID: <20170919142405.GA29668@kernel.org> References: <1505096603-215017-1-git-send-email-kan.liang@intel.com> <20170918085708.GC17203@krava> <20170918130100.GF14469@kernel.org> <20170919081901.GA4231@krava> <37D7C6CF3E00A74B8858931C1DB2F077537C3FFB@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077537C3FFB@SHSMSX103.ccr.corp.intel.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1530 Lines: 33 Em Tue, Sep 19, 2017 at 12:39:47PM +0000, Liang, Kan escreveu: > > On Mon, Sep 18, 2017 at 10:01:00AM -0300, Arnaldo Carvalho de Melo wrote: > > > Em Mon, Sep 18, 2017 at 10:57:08AM +0200, Jiri Olsa escreveu: > > > > he proposed solution and it was changed&posted by Arnaldo in here: > > > > https://marc.info/?l=linux-kernel&m=149132267410294&w=2 > > > > but looks like it never got merged > > > > could you please add this or similar code before you add the locking > > > > code/overhead in? > > > I'm rehashing that patch and adding it on top of what is in my > > > perf/core branch, will push soon, for now you can take a look at > > tmp.perf/core. > > checked the code.. one nit, could we have single threaded by default? > > only one command is multithreaded atm, it could call perf_set_multihreaded > > instead of all current related commands call perf_set_singlethreaded > I agree with single threaded as default setting, also I think we need both > functions, perf_set_multihreaded and perf_set_singlethreaded. > Perf tools probably be half single threaded and half multithreaded. > E.g. the perf top optimization. Only the events synthesize codes are > multithreaded. So we have to set multithreaded first, then change it > to single threaded. Ok, agreed with both of you, i.e. I'll make it single threaded by default, and provide both functions, this way we get a default that is what most tools use, and a way to select multithreaded mode for when it is needed, then going back to single threaded. - Arnaldo