From: Jeff Layton <jlayton@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-nfs@vger.kernel.org, nfsv4@linux-nfs.org
Subject: Re: [PATCH] NLM: hold BKL when clearing global lockd task and serv vars
Date: Mon, 7 Apr 2008 13:40:41 -0400 [thread overview]
Message-ID: <20080407134041.34f93fbd@tleilax.poochiereds.net> (raw)
In-Reply-To: <20080407164500.GA17728@infradead.org>
On Mon, 7 Apr 2008 12:45:01 -0400
Christoph Hellwig <hch@infradead.org> wrote:
> On Mon, Apr 07, 2008 at 09:38:34AM -0400, Jeff Layton wrote:
> > The global task and serv pointers for lockd are normally protected by
> > the nlmsvc_mutex. The exception is when the lockd exits abnormally. When
> > this occurs, these variables are cleared without any locking.
>
> Shouldn't we get rid of the case where it exits abnormally instead?
>
Not a bad idea. After chatting with Christoph a bit on IRC, I suppose
we have 2 options if we want to pursue this. When we get an unexpected
error from svc_recv(), we could:
1) sleep for a bit and then retry
2) call schedule() and sleep until kthread_stop shuts down the thread
I think #1 is probably the best option. It's certainly the more fault
tolerant. That also fixes another potential problem -- right now if the
thread exits and the nlmsvc_users count isn't 0, then we can
potentially BUG() on the next lockd_up/lockd_down.
Any thoughts on what an appropriate sleep timeout should be when this
happens? I was thinking 1s or so...
Trond, Bruce, any thoughts?
--
Jeff Layton <jlayton@redhat.com>
next prev parent reply other threads:[~2008-04-07 17:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-07 13:38 [PATCH] NFS: hold BKL when clearing nfs_callback_info.task Jeff Layton
2008-04-07 13:38 ` [PATCH] NLM: hold BKL when clearing global lockd task and serv vars Jeff Layton
2008-04-07 16:45 ` Christoph Hellwig
2008-04-07 17:40 ` Jeff Layton [this message]
2008-04-07 17:56 ` J. Bruce Fields
2008-04-07 19:08 ` Tom Tucker
2008-04-07 20:22 ` Jeff Layton
2008-04-07 20:50 ` J. Bruce Fields
2008-04-08 13:21 ` Jeff Layton
2008-04-08 16:28 ` J. Bruce Fields
2008-04-08 17:02 ` Jeff Layton
2008-04-08 19:16 ` Jeff Layton
2008-04-08 20:08 ` Chuck Lever
2008-04-08 20:20 ` Jeff Layton
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=20080407134041.34f93fbd@tleilax.poochiereds.net \
--to=jlayton@redhat.com \
--cc=hch@infradead.org \
--cc=linux-nfs@vger.kernel.org \
--cc=nfsv4@linux-nfs.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