From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753031AbcJFHY2 (ORCPT ); Thu, 6 Oct 2016 03:24:28 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:47509 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750868AbcJFHY1 (ORCPT ); Thu, 6 Oct 2016 03:24:27 -0400 Date: Thu, 6 Oct 2016 09:24:15 +0200 From: Peter Zijlstra To: Jiri Olsa Cc: Michael Ellerman , Michael Neuling , Paul Mackerras , Jiri Olsa , lkml , Ingo Molnar , Alexander Shishkin , Jan Stancek Subject: Re: [PATCH] perf powerpc: Don't call perf_event_disable from atomic context Message-ID: <20161006072415.GF3568@worktop.programming.kicks-ass.net> References: <1474466134-21823-1-git-send-email-jolsa@kernel.org> <20160923163747.GE5012@twins.programming.kicks-ass.net> <20161003132932.GA28947@krava> <20161003134740.GC3117@twins.programming.kicks-ass.net> <87shsc4tzm.fsf@concordia.ellerman.id.au> <20161005080921.GB6467@krava> <20161005195338.GB28329@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161005195338.GB28329@krava> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 05, 2016 at 09:53:38PM +0200, Jiri Olsa wrote: > On Wed, Oct 05, 2016 at 10:09:21AM +0200, Jiri Olsa wrote: > > On Tue, Oct 04, 2016 at 03:29:33PM +1100, Michael Ellerman wrote: > > > > SNIP > > > > > Which is where we cope with the possibility that we couldn't emulate the > > > instruction that hit the breakpoint. Seems that is not an issue on x86, > > > or it's handled elsewhere? > > > > > > We should fix emulate_step() if it failed to emulate something it > > > should have, but there will always be the possibility that it fails. > > > > > > Instead of calling perf_event_disable() we could just add a flag to > > > arch_hw_breakpoint that says we hit an error on the event, and block > > > reinstalling it in arch_install_hw_breakpoint(). > > > > ok, might be easier.. I'll check on that > > so staring on that I think disabling is the right way here.. > > we need the event to be unscheduled and not scheduled back > again, I don't see better way at the moment OK, can you resend the patch with updated Changelog that explains these things?