From: Jesse Barnes <jbarnes@sgi.com>
To: Christoph Hellwig <hch@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lock assertion macros for 2.5.28
Date: Fri, 26 Jul 2002 11:05:09 -0700 [thread overview]
Message-ID: <20020726180509.GA793994@sgi.com> (raw)
In-Reply-To: <20020726185416.A18629@infradead.org>
On Fri, Jul 26, 2002 at 06:54:16PM +0100, Christoph Hellwig wrote:
> On Fri, Jul 26, 2002 at 10:42:58AM -0700, Jesse Barnes wrote:
> > On Fri, Jul 26, 2002 at 04:09:18PM +0400, Joshua MacDonald wrote:
> > > In reiser4 we are looking forward to having a MUST_NOT_HOLD (i.e.,
> > > spin_is_not_locked) assertion for kernel spinlocks. Do you know if any
> > > progress has been made in that direction?
> >
> > Well, I had that in one version of the patch, but people didn't think
> > it would be useful. Maybe you'd like to check out Oliver's comments
> > at http://marc.theaimsgroup.com/?l=linux-kernel&m=102644431806734&w=2
> > and respond? If there's demand for MUST_NOT_HOLD, I'd be happy to add
> > it since it should be easy. But if you're using it to enforce lock
> > ordering as Oliver suggests, then there are probably more robust
> > solutions.
>
> Why don't you just generalize the scsi version that already support this?
>
> reinventing the wheel everywhere..
Well, I wouldn't go that far. The macros are really simple and
implementing a MUST_NOT_HOLD should be easy too. It could also be
done in a much more useful way than how ASSERT_LOCK works, by tracking
where the locks where acquired for example.
Did you check out the thread above? Having ASSERT_LOCK(&lock, 0)
doesn't seem that useful by itself. A lot of the scsi code does
things like:
ASSERT_LOCK(&lock, 0);
...
spin_lock(&lock);
What does that buy you? The suggestions for tracking where the lock
was acquired (in the thread above) seem much more useful.
Thanks,
Jesse
next prev parent reply other threads:[~2002-07-26 18:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-25 23:30 Jesse Barnes
2002-07-26 5:11 ` Marcin Dalecki
2002-07-26 17:40 ` Jesse Barnes
2002-07-27 13:59 ` Daniel Phillips
2002-07-26 12:09 ` Joshua MacDonald
2002-07-26 17:42 ` Jesse Barnes
2002-07-26 17:54 ` Christoph Hellwig
2002-07-26 18:05 ` Jesse Barnes [this message]
2002-07-27 13:56 ` Daniel Phillips
2002-07-26 19:38 ` Robert Love
2002-08-02 15:17 ` Joshua MacDonald
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=20020726180509.GA793994@sgi.com \
--to=jbarnes@sgi.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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®