xfs
[Top] [All Lists]

Re: [LOCKDEP] xfs: possible recursive locking detected

To: Nathan Scott <nathans@xxxxxxx>
Subject: Re: [LOCKDEP] xfs: possible recursive locking detected
From: Ingo Molnar <mingo@xxxxxxx>
Date: Wed, 5 Jul 2006 08:46:51 +0200
Cc: Alexey Dobriyan <adobriyan@xxxxxxxxx>, Matthew Wilcox <matthew@xxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, Arjan van de Ven <arjan@xxxxxxxxxxxxx>
In-reply-to: <20060705152652.F1521039@xxxxxxxxxxxxxxxxxxxxxxxx>
References: <20060704004116.GA7612@xxxxxxxxxxxxxxxxxxxxxx> <20060704011858.GG1605@xxxxxxxxxxxxxxxx> <20060704112503.H1495869@xxxxxxxxxxxxxxxxxxxxxxxx> <20060704063225.GA2752@xxxxxxx> <20060704084143.GA12931@xxxxxxx> <20060704191100.C1497438@xxxxxxxxxxxxxxxxxxxxxxxx> <20060704095743.GA21480@xxxxxxx> <20060704130338.GA4354@xxxxxxx> <20060705152652.F1521039@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
* Nathan Scott <nathans@xxxxxxx> 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


<Prev in Thread] Current Thread [Next in Thread>