Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752690AbbEKQsm (ORCPT ); Mon, 11 May 2015 12:48:42 -0400 Received: from mga11.intel.com ([192.55.52.93]:34083 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752265AbbEKQsk (ORCPT ); Mon, 11 May 2015 12:48:40 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,408,1427785200"; d="scan'208";a="569594009" Date: Mon, 11 May 2015 09:48:39 -0700 From: Andi Kleen To: Stephane Eranian Cc: Peter Zijlstra , Andi Kleen , LKML Subject: Re: [PATCH 9/9] x86, perf: Move PMU ACK after LBR read Message-ID: <20150511164839.GB13605@tassilo.jf.intel.com> References: <1431285767-27027-1-git-send-email-andi@firstfloor.org> <1431285767-27027-10-git-send-email-andi@firstfloor.org> <20150511162354.GA21418@twins.programming.kicks-ass.net> <20150511163605.GB21418@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1906 Lines: 48 On Mon, May 11, 2015 at 09:43:41AM -0700, Stephane Eranian wrote: > On Mon, May 11, 2015 at 9:36 AM, Peter Zijlstra wrote: > > On Mon, May 11, 2015 at 09:32:33AM -0700, Stephane Eranian wrote: > >> >> This is a minimal change. In principle the ACK could be moved much later. > >> > > >> > Right, so the more complete change would be to use the new and improved > >> > FREEZE_ON_PMI and reenable both the LBRs and the CTRs with the > >> > STATUS_RESET MSR, right? > >> > > >> > Does it make sense to have a new handle_irq() routine for that? > >> > >> Were we not already using FREEZE_ON_PMI with LBR (except for one > >> erratum on HSW)? > > > > That's FREEZE_LBRS_ON_PMI, I was referring to FREEZE_PERFMON_ON_PMI, > > which we've not used so far. > > > Ah, yes that one was not used so far. I don't quite remember why. > I think with PEBS, you don't need it or it should be off or something like this. The LBR freeze should work with call stack mode if you use PEBS events. So in theory we could allow call-stack lbr for kernel with such a restriction. But we have a working kernel backtrace anyways, so it's not really critical. > > > I think Andi tried using it before, but there's some issues with it on > > v3, but v4 should have fixed all that. > > > I was referring to a LBR issue on v3 (HSW) and call stack mode. > > > Andi can you perhaps explain what the problem with FREEZE_PERFMON_ON_PMI > > on v3 was again? I'm not sure why we never used it. The update of the DEBUGCTL can race with other operations, but it's rather obscure. But I would not do it right now. -Andi -- ak@linux.intel.com -- Speaking for myself only -- 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/