From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754841AbcJETxo (ORCPT ); Wed, 5 Oct 2016 15:53:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58982 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753449AbcJETxn (ORCPT ); Wed, 5 Oct 2016 15:53:43 -0400 Date: Wed, 5 Oct 2016 21:53:38 +0200 From: Jiri Olsa To: Michael Ellerman Cc: Peter Zijlstra , 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: <20161005195338.GB28329@krava> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161005080921.GB6467@krava> User-Agent: Mutt/1.7.0 (2016-08-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 05 Oct 2016 19:53:42 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 jirka