Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752356Ab0AMEOx (ORCPT ); Tue, 12 Jan 2010 23:14:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751500Ab0AMEOw (ORCPT ); Tue, 12 Jan 2010 23:14:52 -0500 Received: from ozlabs.org ([203.10.76.45]:55303 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751482Ab0AMEOv (ORCPT ); Tue, 12 Jan 2010 23:14:51 -0500 Date: Wed, 13 Jan 2010 15:14:45 +1100 From: Paul Mackerras To: Ingo Molnar , Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Milton Miller , Benjamin Herrenschmidt Subject: Entry conditions for perf_event_do_pending? Message-ID: <20100113041445.GA17829@brick.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 854 Lines: 17 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/