On Fri, Aug 02, 2013 at 02:57:26PM -0400, Steven Rostedt wrote: > The other thing you can do is not run perf while this is going on. URL Clas-3286 2d.h. 1us : local_clock <-perf_event_update_userpage URL Clas-3286 2d.h. 2us : watchdog_overflow_callback <-__perf_event_overflow URL Clas-3286 2d.h. 3us : arch_trigger_all_cpu_backtrace_handler <-nmi_handle.isra.0 URL Clas-3286 2d.h. 3us : perf_ibs_nmi_handler <-nmi_handle.isra.0 URL Clas-3286 2d.h. 3us : perf_ibs_handle_irq <-perf_ibs_nmi_handler URL Clas-3286 2d.h. 4us : perf_ibs_handle_irq <-perf_ibs_nmi_handler So they're not running perf as such; it looks to be the NMI watchdog. It also looks like they're actually triggering the NMI watchdog -- arch_trigger_all_cpu_backtrace_handler() will cause unconditional 'fun' on all CPUS. Weirdly the report doesn't actually say this; one would think that an NMI watchdog trigger would be a fair clue that something isn't right. You can disable that with: echo 0 > /proc/sys/kernel/nmi_watchdog This also raises the question why those events even bother calculating time values; there's no (possible) consumer for them at all. --- Subject: perf: Do not compute time values unnecessarily We should not be calling calc_timer_values() for events that do not actually have an mmap()'ed userpage. Signed-off-by: Peter Zijlstra <peterz@xxxxxxxxxxxxx> --- kernel/events/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 916cf1f..8643069 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -3665,6 +3665,10 @@ void perf_event_update_userpage(struct perf_event *event) u64 enabled, running, now; rcu_read_lock(); + rb = rcu_dereference(event->rb); + if (!rb) + goto unlock; + /* * compute total_time_enabled, total_time_running * based on snapshot values taken when the event @@ -3675,12 +3679,8 @@ void perf_event_update_userpage(struct perf_event *event) * NMI context */ calc_timer_values(event, &now, &enabled, &running); - rb = rcu_dereference(event->rb); - if (!rb) - goto unlock; userpg = rb->user_page; - /* * Disable preemption so as to not let the corresponding user-space * spin too long if we get preempted. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html