linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Nathan Scott <nathans@sgi.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
	Matthew Wilcox <matthew@wil.cx>,
	linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com,
	Arjan van de Ven <arjan@infradead.org>
Subject: Re: [LOCKDEP] xfs: possible recursive locking detected
Date: Wed, 5 Jul 2006 08:46:51 +0200	[thread overview]
Message-ID: <20060705064651.GA28084@elte.hu> (raw)
In-Reply-To: <20060705152652.F1521039@wobbly.melbourne.sgi.com>


* Nathan Scott <nathans@sgi.com> wrote:

> >  fs/xfs/xfs_mount.h:#define   AIL_LOCK_DESTROY(x)     spinlock_destroy(x)
> >  fs/xfs/linux-2.6/spin.h:#define      spinlock_destroy(lock)
> > 
> > needs to change and we need to implement spinlock_destroy(), a'ka 
> > mutex_destroy()? [which i added recently too]
> 
> Hmm, don't think so - only if you needed to change all other spinlock 
> uses in the kernel to have a teardown too?  Can't see that in current 
> git trees, anyway, so I expect that to be OK as is.

i should have formulated this as a question: should i implement 
spin_lock_destroy()? A few months ago i implemented mutex_destroy() for 
XFS's use, and now we could do it for spinlocks too.

Right now the only upstream requirement wrt. spinlock disposal is that 
it should not be in locked state when it's destroyed. (PREEMPT_RT in the 
-rt tree needed that semantic detail too and there were a handful of 
places in the kernel that freed held locks - we fixed those up in the
past year or so.)

spin_lock_destroy() would work like mutex_destroy(): the magic number in 
the lock is overwritten and hence no further locking API will allow the 
use of that lock from that point on. (up until the lock is reinitialized 
via spin_lock_init())

	Ingo

  reply	other threads:[~2006-07-05  6:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-04  0:41 [LOCKDEP] xfs: possible recursive locking detected Alexey Dobriyan
2006-07-04  1:18 ` Matthew Wilcox
2006-07-04  1:25   ` Nathan Scott
2006-07-04  6:32     ` Ingo Molnar
2006-07-04  6:56       ` Nathan Scott
2006-07-04  8:41       ` Ingo Molnar
2006-07-04  9:11         ` Nathan Scott
2006-07-04  9:12           ` Ingo Molnar
2006-07-05  3:23             ` Nathan Scott
2006-07-05  4:44               ` Arjan van de Ven
2006-07-04  9:57           ` Ingo Molnar
2006-07-04 13:03             ` Ingo Molnar
2006-07-05  5:26               ` Nathan Scott
2006-07-05  6:46                 ` Ingo Molnar [this message]
2006-07-05  6:58                   ` Nathan Scott
2006-07-05  3:37             ` Nathan Scott
     [not found]         ` <20060704191100.C1497438__38681.8935432986$1152004607$gmane$org@wobbly.melbourne.sgi.com>
2006-07-04 12:42           ` Andi Kleen

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=20060705064651.GA28084@elte.hu \
    --to=mingo@elte.hu \
    --cc=adobriyan@gmail.com \
    --cc=arjan@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=nathans@sgi.com \
    --cc=xfs@oss.sgi.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;
as well as URLs for NNTP newsgroup(s).