From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755085AbbJUP0M (ORCPT ); Wed, 21 Oct 2015 11:26:12 -0400 Received: from mga14.intel.com ([192.55.52.115]:23001 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753232AbbJUP0L (ORCPT ); Wed, 21 Oct 2015 11:26:11 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,712,1437462000"; d="scan'208";a="668863924" Date: Wed, 21 Oct 2015 08:26:08 -0700 From: Andi Kleen To: Peter Zijlstra Cc: Andi Kleen , linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner Subject: Re: [PATCH] x86, perf: Use INST_RETIRED.PREC_DIST for cycles:pp on Skylake Message-ID: <20151021152608.GG15102@tassilo.jf.intel.com> References: <1445295496-8550-1-git-send-email-andi@firstfloor.org> <20151020113608.GC17308@twins.programming.kicks-ass.net> <20151020222844.GK3533@two.firstfloor.org> <20151021080947.GA2881@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151021080947.GA2881@worktop.programming.kicks-ass.net> 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 > Right, but suppose one user (root) would be sampling machine wide with > PEBS whilst another user is using it just on his one task. The root case is likely perf top which does not use PEBS. > > > And you having killed the flag bits for PEBS events precludes people > > > from using this manually, right? I think we want to exempt .inv=1 > > > .cmask=16 from that general rule on general utility value. > > > > I don't want to do this for every event. It has caused problems > > in the past. There's also no reason to use the other events. > > But it does allow users to play around with alternative encodings for > cycles etc.. We've made use of this in the past when SNB turned out to > have broken the event. If they want to violate the SDM they can hack the kernel. It's risky to do as you well know. > > > We could maybe abuse .precise_ip = 3 for this? > > > > I implemented this now, even though it's ugly. > > Agreed, its not ideal. So it turns out that UOPS_RETIRED.ALL+pebs only works by accident on Skylake. It's not in the specification. So on Skylake it has to be unconditional for any cycles:p On earlier parts it can be only for three p to handle your unlikely scenario. -Andi -- ak@linux.intel.com -- Speaking for myself only