linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Jiri Olsa <jolsa@redhat.com>, Michael Neuling <mikey@neuling.org>,
	Paul Mackerras <paulus@samba.org>, Jiri Olsa <jolsa@kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jan Stancek <jstancek@redhat.com>,
	Will Deacon <will.deacon@arm.com>
Subject: Re: [PATCH] perf powerpc: Don't call perf_event_disable from atomic context
Date: Tue, 4 Oct 2016 09:06:18 +0200	[thread overview]
Message-ID: <20161004070618.GL3318@worktop.controleur.wifipass.org> (raw)
In-Reply-To: <87shsc4tzm.fsf@concordia.ellerman.id.au>

On Tue, Oct 04, 2016 at 03:29:33PM +1100, Michael Ellerman wrote:
> Peter Zijlstra <peterz@infradead.org> writes:
> > So it would be good to also explain why PPC needs this in the first
> > place.
> 
> Unfortunately I don't really know the code, and the original author is AWOL.
> 
> But AFAICS perf_event_disable() is only called here:
> 
> 	if (!stepped) {
> 		WARN(1, "Unable to handle hardware breakpoint. Breakpoint at "
> 			"0x%lx will be disabled.", info->address);
> 		perf_event_disable(bp);
> 		goto out;
> 	}
> 
> 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?

I don't think x86 ever needs to emulate things on hw breakpoint
(although I could be mistaken), but I would expect ARM to maybe need
so, and I couldn't find a disable there either.

Will?

> 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().

Possible..

  reply	other threads:[~2016-10-04  7:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 13:55 [PATCH] perf powerpc: Don't call perf_event_disable from atomic context Jiri Olsa
2016-09-23 16:37 ` Peter Zijlstra
2016-10-03 13:29   ` Jiri Olsa
2016-10-03 13:47     ` Peter Zijlstra
2016-10-04  4:29       ` Michael Ellerman
2016-10-04  7:06         ` Peter Zijlstra [this message]
2016-10-10 13:19           ` Will Deacon
2016-10-05  8:09         ` Jiri Olsa
2016-10-05 19:53           ` Jiri Olsa
2016-10-06  7:24             ` Peter Zijlstra
2016-10-06 12:33               ` [PATCHv2] " Jiri Olsa
2016-10-24 12:26                 ` Peter Zijlstra
2016-10-24 15:49                   ` Jiri Olsa
2016-10-25  6:40                 ` [lkp] [perf powerpc] 18d1796d0b: [No primary change] kernel test robot
2016-10-25  9:06                   ` Peter Zijlstra
2016-10-26  2:09                     ` [LKP] " Huang, Ying
2016-10-26  9:48                       ` [PATCHv3] perf powerpc: Don't call perf_event_disable from atomic context Jiri Olsa
2016-10-26 15:12                         ` Peter Zijlstra
2016-10-26 15:24                           ` Jiri Olsa
2016-10-28 10:10                         ` [tip:perf/urgent] perf/powerpc: Don't call perf_event_disable() " tip-bot for Jiri Olsa
2016-10-04  4:08 ` [PATCH] perf powerpc: Don't call perf_event_disable " Michael Ellerman
2016-10-05  8:08   ` Jiri Olsa
2016-10-05  8:21   ` Jan Stancek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161004070618.GL3318@worktop.controleur.wifipass.org \
    --to=peterz@infradead.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=jstancek@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikey@neuling.org \
    --cc=mingo@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).