From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751447AbdBFRTY (ORCPT ); Mon, 6 Feb 2017 12:19:24 -0500 Received: from one.firstfloor.org ([193.170.194.197]:36263 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750950AbdBFRTX (ORCPT ); Mon, 6 Feb 2017 12:19:23 -0500 Date: Mon, 6 Feb 2017 09:19:21 -0800 From: Andi Kleen To: Alexander Shishkin Cc: Andi Kleen , Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, vince@deater.net, eranian@google.com, Arnaldo Carvalho de Melo , Borislav Petkov , Thomas Gleixner Subject: Re: [PATCH] perf/x86/intel/pt: Allow disabling branch tracing Message-ID: <20170206171921.GG26852@two.firstfloor.org> References: <87inosaoi1.fsf@ashishki-desk.ger.corp.intel.com> <20170206144140.14402-1-alexander.shishkin@linux.intel.com> <87efzbjopq.fsf@firstfloor.org> <87mvdz8fue.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mvdz8fue.fsf@ashishki-desk.ger.corp.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 06, 2017 at 06:05:29PM +0200, Alexander Shishkin wrote: > Andi Kleen writes: > > > Alexander Shishkin writes: > > > >> Now that Intel PT supports more types of trace content than just branch > >> tracing, it may be useful to allow the user to disable branch tracing > >> when it is not needed. > >> > >> The special case is BDW, where not setting BranchEn is not supported. > >> > >> This is slightly trickier than necessary, because up to this moment > >> the driver has been setting BranchEn automatically and the userspace > >> assumes as much. Instead of reversing the semantics of BranchEn, we > >> introduce a 'passthrough' bit, which will forego the default and allow > >> the user to set BranchEn to their heart's content. > > > > cpu/passthrough=1,branchen=1/ seems far uglier/more complicanted to me > > than the original cpu/nobranch=1/ > > It's /passthrough=1,branch=0/ or simply /passthrough=1/. Ok, but still you have to list exactly to which flags passthrough applies to, and it will only ever be branchen. So basically you turned nobranch=1 into two more difficult to explain flags without any future advantage. That is why nobranch=1 is better. It is far easier to explain and logical to the user. -Andi