public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Ingo Molnar <mingo@elte.hu>, Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, Milton Miller <miltonm@bga.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Entry conditions for perf_event_do_pending?
Date: Wed, 13 Jan 2010 15:14:45 +1100	[thread overview]
Message-ID: <20100113041445.GA17829@brick.ozlabs.ibm.com> (raw)

We're seeing some perf-related crashes on powerpc related to having
irqs in an inconsistent state (soft-enable vs. hard-enable
vs. trace-irqs state) when entering perf_event_do_pending().
We're fixing that, but along the way we have struck a question about
what conditions are required on entry to perf_event_do_pending.

Its use of __get_cpu_var implies that it at least needs to be called
with either interrupts or preemption disabled.  Does it in fact need
to be called with irqs off?  Do we need to call irq_enter()/irq_exit()
around it?  Are there any other requirements that people can think of?

Paul.

             reply	other threads:[~2010-01-13  4:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13  4:14 Paul Mackerras [this message]
2010-01-13  9:27 ` Entry conditions for perf_event_do_pending? Peter Zijlstra
2010-01-21 13:54   ` [tip:perf/urgent] perf: Fix perf_event_do_pending() fallback callsite tip-bot for Peter Zijlstra

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=20100113041445.GA17829@brick.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miltonm@bga.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /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