From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [Intel-gfx] [PATCH] drm/i915: move i915_trace_irq_get() out of the tracing macro Date: Mon, 24 Jun 2013 09:31:04 +0200 Message-ID: <20130624073104.GC5823@phenom.ffwll.local> References: <1371809753-16052-1-git-send-email-bigeasy@linutronix.de> <20130621110849.GQ14531@cantiga.alporthouse.com> <51C44C3B.1090604@linutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <51C44C3B.1090604@linutronix.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Sebastian Andrzej Siewior Cc: Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Jun 21, 2013 at 02:51:07PM +0200, Sebastian Andrzej Siewior wrote: > On 06/21/2013 01:08 PM, Chris Wilson wrote: > > On Fri, Jun 21, 2013 at 12:15:53PM +0200, Sebastian Andrzej Siewior wrote: > >> There is a report on RT about "BUG: scheduling while atomic" because the > >> sleeping lock is taken in tracing context. This patch simply moves > >> locking operation out of the tracing macro. > > > > No. This enables the IRQ, as well as making a number of > > very expensively serialised read, unconditionally. > > Ach in case CONFIG_TRACING is enabled but the tracepoint itself is > disabled. In that case it is probably best to drop this tracepoint from > -RT. Iirc when we've last discussed this with Thomas Gleixner he mentioned that there's a setup/teardown hook when enabling/disabling a tracepoint. We could use that to enable/disable interrupts. Needs a notch of logic rework though since the auto-irq disable code needs adjusting ... And on a 2nd look that trace_irq_seqno logic looks a bit broken anyway. It's somewhere on my todo list, but patches very much welcome. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch