mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davide Libenzi <davidel@xmailserver.org>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	<hch@lst.de>, Benjamin LaHaise <bcrl@redhat.com>
Subject: Re: interrupt checks for spinlocks
Date: Sun, 3 Nov 2002 17:39:29 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0211031731270.954-100000@blue1.dev.mcafeelabs.com> (raw)
In-Reply-To: <20021104003906.GB12891@holomorphy.com>

On Sun, 3 Nov 2002, William Lee Irwin III wrote:

> On Sun, 3 Nov 2002, William Lee Irwin III wrote:
> [...]
> >> 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.).
>
> On Sun, Nov 03, 2002 at 04:15:46PM -0800, Davide Libenzi wrote:
> > 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 )
>
> That would appear to require cycle detection, but it sounds like a
> potential breakthrough usage of graph algorithms in the kernel.
> (I've always been told graph algorithms would come back to haunt me.)
> Or maybe not, deadlock detection has been done before.
>
> A separate patch/feature/whatever for deadlock detection could do that
> nicely, though. What I've presented here is meant only to flag far more
> trivial errors with interrupt enablement/disablement than the full
> deadlock detection problem.

It's not realy a graph Bill.  Each task has a list of acquired locks (
by address ). You keep __LINE__ and __FILE__ with you list items. When
there's a deadlock you'll have somewhere :

   TSK#N	TSK#M
   -------------
   ...		...
   LCK#I	LCK#J
   ...		...
-> LCK#J	LCK#I

Then with a SysReq key you dump the list of acquired locks for each task
who's spinning for a lock. IMO it might be usefull ...



- Davide




  reply	other threads:[~2002-11-04  1:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-03 22:08 William Lee Irwin III
2002-11-04  0:15 ` Davide Libenzi
2002-11-04  0:39   ` William Lee Irwin III
2002-11-04  1:39     ` Davide Libenzi [this message]
2002-11-04  1:39       ` William Lee Irwin III
2002-11-04  5:18       ` Randy.Dunlap
2002-11-04 15:47         ` Davide Libenzi
2002-11-04 13:31     ` Alan Cox
     [not found] <mailman.1036362421.16883.linux-kernel2news@redhat.com>
     [not found] ` <200211040028.gA40S8600593@devserv.devel.redhat.com>
     [not found]   ` <20021104002813.GZ16347@holomorphy.com>
2002-11-04  0:42     ` Pete Zaitcev
2002-11-04  0:53       ` William Lee Irwin III
2002-11-04  1:18         ` Robert Love
2002-11-04  1:42           ` William Lee Irwin III
2002-11-04  3:01             ` Robert Love
2002-11-04  3:04               ` William Lee Irwin III
2002-11-04  3:22               ` William Lee Irwin III
2002-11-04  3:36               ` Zwane Mwaikambo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0211031731270.954-100000@blue1.dev.mcafeelabs.com \
    --to=davidel@xmailserver.org \
    --cc=bcrl@redhat.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®