linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH tip/rt/head] perf: Mark software events as irqsafe
@ 2010-10-18 18:38 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; only message in thread
From: Arnaldo Carvalho de Melo @ 2010-10-18 18:38 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Clark Williams, Ingo Molnar, Peter Zijlstra,
	Linux Kernel Mailing List, linux-rt-users

From: Peter Zijlstra <peterz@infradead.org>

Noticed while using 'perf top' on a machine without a supported PMU on
2.6.33.7-rt29, when top falls back to using the "cpu-clock" software
event.

Reproduced on other machines where the problem was masked due to the
existence and use of hardware events, by explicitely asking for a
software event using:

perf top -e cpu-clock

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@infradead.org>

diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 6dfaf5b..b9fbc17 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -4238,6 +4238,7 @@ static void perf_swevent_start_hrtimer(struct perf_event *event)
 	struct hw_perf_event *hwc = &event->hw;
 
 	hrtimer_init(&hwc->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
+	hwc->hrtimer.irqsafe = 1;
 	hwc->hrtimer.function = perf_swevent_hrtimer;
 	if (hwc->sample_period) {
 		u64 period;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-18 19:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-18 18:38 [PATCH tip/rt/head] perf: Mark software events as irqsafe Arnaldo Carvalho de Melo

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