mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Neil Brown <neilb@suse.de>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>, arjan <arjan@infradead.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] nfsd: lockdep annotation
Date: Thu, 24 Aug 2006 08:54:13 +0200	[thread overview]
Message-ID: <1156402453.3382.57.camel@twins> (raw)
In-Reply-To: <17645.17252.217583.660976@cse.unsw.edu.au>

On Thu, 2006-08-24 at 16:12 +1000, Neil Brown wrote:
> On Wednesday August 23, a.p.zijlstra@chello.nl wrote:
> > Hi,
> > 
> > while doing a kernel make modules_install install over an NFS mount.
> > (
> > 
> > =============================================
> > [ INFO: possible recursive locking detected ]
> > ---------------------------------------------
> 
> Thanks for the patch.  I had a patch to fix this in my queue, but I
> just hadn't got around to submitting it yet :-(
> Never mind, we'll go with yours and Andrew already has it.
> 
> I had flags the fh_lock in nfsd_setattr a I_MUTEX_CHILD which you
> didn't however I see that isn't needed (Why do we have PARENT and
> CHILD and NORMAL.... you would think that any two would do ??)

I_MUTEX_CHILD is only used in renames. All other childs are left
unannotated, it feels a bit sloppy (and it probably is) but it works
out. Unannotated lock operations are a separate class on their own, as
are I_MUTEX_NORMAL (used when you don't feel like figuring out which
would be the proper level, and there is no further nesting AFAIK).

This way you'll end up with PARENT -> {NORMAL, unannotated} which is as
valid as PARENT -> CHILD.
The only danger would be if you also have a locking sequence like CHILD
-> PARENT, that could go unnoticed, because the other direction is not
from CHILD. This could hide real deadlocks.

/me looks at Arjan, did I get it right?

> However there is a bit missing: the fh_lock in nfsd_proc_create
> in nfsproc.c needs I_MUTEX_PARENT - I'll send a separate patch to fix
> that.

Ah, right, must've overlooked it.

Thanks


  reply	other threads:[~2006-08-24  6:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-23 10:48 Peter Zijlstra
2006-08-24  6:12 ` Neil Brown
2006-08-24  6:54   ` Peter Zijlstra [this message]
2006-08-24  7:35   ` Arjan van de Ven
2006-08-24  7:50     ` Neil Brown

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=1156402453.3382.57.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=neilb@suse.de \
    /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®