From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 14 Oct 2013 17:19:58 +1100 From: Michael Ellerman To: Anshuman Khandual Subject: Re: [PATCH] powerpc, perf: Configure BHRB filter before enabling PMU interrupts Message-ID: <20131014061958.GA8300@concordia> References: <1381120226-14838-1-git-send-email-khandual@linux.vnet.ibm.com> <20131008042137.GE31666@concordia> <5253B26E.3020800@linux.vnet.ibm.com> <20131009012130.GA23780@concordia> <5254DFA8.2050100@linux.vnet.ibm.com> <20131009060321.GB28160@concordia> <52566A4E.2000409@linux.vnet.ibm.com> <20131011021131.GA26561@concordia> <52577F5C.6000704@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <52577F5C.6000704@linux.vnet.ibm.com> Cc: linuxppc-dev@ozlabs.org, mikey@neuling.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, Oct 11, 2013 at 10:02:28AM +0530, Anshuman Khandual wrote: > On 10/11/2013 07:41 AM, Michael Ellerman wrote: > > On Thu, Oct 10, 2013 at 02:20:22PM +0530, Anshuman Khandual wrote: > > > >> Even I think this is not right. Instruction sampling should have been > >> enabled before we enable PMU interrupts. Else there is a small window > >> of time where we could have the PMU enabled with events (which requires > >> sampling) without the sampling itself being enabled in MMCRA. > > > > Yes I agree. That's a separate bug, which we'll need to test on all the book3s > > platforms we have perf support for. > > Okay, I guess any platform which supports sampling will definitely want to have > it enabled before we can set the events to count on PMU. Can you think of any > problem which can arise if we move it before the enabling the PMU back ? Else > we can fix this easily. In theory it should be a trivial change. But hardware can behave in strange ways, it's possible on some old chip we need to do it the current way for some reason. So although I don't think it will be a problem, it could be, so we will need to test it thoroughly. cheers