Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 3 Nov 2002 19:04:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 3 Nov 2002 19:04:17 -0500 Received: from x35.xmailserver.org ([208.129.208.51]:18320 "EHLO x35.xmailserver.org") by vger.kernel.org with ESMTP id ; Sun, 3 Nov 2002 19:04:17 -0500 X-AuthUser: davidel@xmailserver.org Date: Sun, 3 Nov 2002 16:15:46 -0800 (PST) From: Davide Libenzi X-X-Sender: davide@blue1.dev.mcafeelabs.com To: William Lee Irwin III cc: Linux Kernel Mailing List , , Benjamin LaHaise Subject: Re: interrupt checks for spinlocks In-Reply-To: <20021103220816.GY16347@holomorphy.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1228 Lines: 32 On Sun, 3 Nov 2002, William Lee Irwin III wrote: > I recently thought about interrupt disablement and locking again, or > at least such as has gone about in various places, and I got scared. > > Hence, a wee addition to CONFIG_DEBUG_SPINLOCK: > > (1) check that spinlocks are not taken in interrupt context without > interrupts disabled > (2) taint spinlocks taken in interrupt context > (3) check for tainted spinlocks taken without interrupts disabled > (4) check for spinlocking calls unconditionally disabling (and > hence later re-enabling) interrupts with interrupts disabled > > The only action taken is printk() and dump_stack(). No arch code has > been futzed with to provide irq tainting yet. Looks like a good way > to shake out lurking bugs to me (somewhat like may_sleep() etc.). Wouldn't it be interesting to keep a ( per task ) list of acquired spinlocks to be able to diagnose cross locks in case of stall ? ( obviously under CONFIG_DEBUG_SPINLOCK ) - Davide - 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/