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>,
steved@redhat.com, Ingo Molnar <mingo@elte.hu>,
Trond Myklebust <trond.myklebust@fys.uio.no>
Subject: Re: [PATCH] lockdep: annotate nfs/nfsd in-kernel sockets
Date: Mon, 09 Oct 2006 10:12:01 +0200 [thread overview]
Message-ID: <1160381521.2792.129.camel@taijtu> (raw)
In-Reply-To: <17705.40741.552103.194329@cse.unsw.edu.au>
On Mon, 2006-10-09 at 11:00 +1000, Neil Brown wrote:
> On Friday October 6, a.p.zijlstra@chello.nl wrote:
> >
> > Stick NFS sockets in their own class to avoid some lockdep warnings.
> > NFS sockets are never exposed to user-space, and will hence not trigger
> > certain code paths that would otherwise pose deadlock scenarios.
>
> I'm a bit bothered that the changelog entry does mention what sort of
> lockdep warning are begin avoided,
These:
http://lkml.org/lkml/2006/7/13/84
> and that 'svc_reclassify_socket'
> doesn't contain the work 'lock', yet is it really the locks that are
> being reclassified.
Hmm, good point, shall I do s/reclassify_socket/reclassify_sock_lock/ ?
> However
>
> Acked-by: NeilBrown <neilb@suse.de>
>
> NeilBrown
>
> > +
> > +static inline void svc_reclassify_socket(struct socket *sock)
> > +{
> > + struct sock *sk = sock->sk;
> > + BUG_ON(sk->sk_lock.owner != NULL);
> > + switch (sk->sk_family) {
> > + case AF_INET:
> > + sock_lock_init_class_and_name(sk,
> > + "slock-AF_INET-NFSD", &svc_slock_key[0],
> > + "sk_lock-AF_INET-NFSD", &svc_key[0]);
> > + break;
> > +
> > + case AF_INET6:
> > + sock_lock_init_class_and_name(sk,
> > + "slock-AF_INET6-NFSD", &svc_slock_key[1],
> > + "sk_lock-AF_INET6-NFSD", &svc_key[1]);
> > + break;
> > +
> > + default:
> > + BUG();
> > + }
> > +}
next prev parent reply other threads:[~2006-10-09 8:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-06 15:01 Peter Zijlstra
2006-10-09 1:00 ` Neil Brown
2006-10-09 8:12 ` Peter Zijlstra [this message]
2006-10-09 8:24 ` Neil Brown
2006-10-09 8:54 ` Peter Zijlstra
2006-10-09 11:57 ` Steve Dickson
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=1160381521.2792.129.camel@taijtu \
--to=a.p.zijlstra@chello.nl \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=neilb@suse.de \
--cc=steved@redhat.com \
--cc=trond.myklebust@fys.uio.no \
/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®