Re: [PATCH 6/6] NLM: Add reference counting to lockd

2008-01-10 Thread Jeff Layton
On Thu, 10 Jan 2008 14:29:22 +1100 Neil Brown <[EMAIL PROTECTED]> wrote: > On Tuesday January 8, [EMAIL PROTECTED] wrote: > > ...and only have lockd exit when the last reference is dropped. > > > > The problem is this: > > > > When a lock that a client is blocking on comes free, lockd does > > t

Re: [PATCH 6/6] NLM: Add reference counting to lockd

2008-01-09 Thread Neil Brown
On Tuesday January 8, [EMAIL PROTECTED] wrote: > ...and only have lockd exit when the last reference is dropped. > > The problem is this: > > When a lock that a client is blocking on comes free, lockd does this in > nlmsvc_grant_blocked(): > > nlm_async_call(block->b_call, NLMPROC_GRANTED_MS

Re: [PATCH 6/6] NLM: Add reference counting to lockd

2008-01-09 Thread Jeff Layton
On Wed, 9 Jan 2008 18:48:14 + Christoph Hellwig <[EMAIL PROTECTED]> wrote: > On Wed, Jan 09, 2008 at 01:36:21PM -0500, Jeff Layton wrote: > > I don't see a good alternative though. We need to be able to drop > > the and check the refcount in nlmsvc_unlink_block. That function is > > called fro

Re: [PATCH 6/6] NLM: Add reference counting to lockd

2008-01-09 Thread Christoph Hellwig
On Wed, Jan 09, 2008 at 01:36:21PM -0500, Jeff Layton wrote: > I don't see a good alternative though. We need to be able to drop the > and check the refcount in nlmsvc_unlink_block. That function is called > from lockd, and we can't have lockd call kthread_stop on itself. > > If you see a better w

Re: [PATCH 6/6] NLM: Add reference counting to lockd

2008-01-09 Thread Jeff Layton
On Wed, 9 Jan 2008 17:47:07 + Christoph Hellwig <[EMAIL PROTECTED]> wrote: > On Tue, Jan 08, 2008 at 02:33:18PM -0500, Jeff Layton wrote: > > ...and only have lockd exit when the last reference is dropped. > > > > The problem is this: > > > > When a lock that a client is blocking on comes fr

Re: [PATCH 6/6] NLM: Add reference counting to lockd

2008-01-09 Thread Christoph Hellwig
On Tue, Jan 08, 2008 at 02:33:18PM -0500, Jeff Layton wrote: > ...and only have lockd exit when the last reference is dropped. > > The problem is this: > > When a lock that a client is blocking on comes free, lockd does this in > nlmsvc_grant_blocked(): > > nlm_async_call(block->b_call, NLMP

Re: [PATCH 6/6] NLM: Add reference counting to lockd

2008-01-08 Thread Jeff Layton
On Tue, 08 Jan 2008 10:52:19 -0500 Wendy Cheng <[EMAIL PROTECTED]> wrote: > Jeff Layton wrote: > > > >> The previous patch removes a kill_proc(... SIGKILL), this one > >> adds it back. > >> That makes me wonder if the intermediate state is 'correct'. > >> > >> But I also wonder what "correct" mea

Re: [PATCH 6/6] NLM: Add reference counting to lockd

2008-01-08 Thread Peter Staubach
Jeff Layton wrote: On Tue, 8 Jan 2008 17:46:33 +1100 Neil Brown <[EMAIL PROTECTED]> wrote: The comments about patch 5/6 seem sane. I'll plan to incorporate them in the respin... On Saturday January 5, [EMAIL PROTECTED] wrote: @@ -357,7 +375,18 @@ lockd_down(void) goto

Re: [PATCH 6/6] NLM: Add reference counting to lockd

2008-01-08 Thread Wendy Cheng
Jeff Layton wrote: The previous patch removes a kill_proc(... SIGKILL), this one adds it back. That makes me wonder if the intermediate state is 'correct'. But I also wonder what "correct" means. Do we want all locks to be dropped when the last nfsd thread dies? The answer is presumably eithe

Re: [PATCH 6/6] NLM: Add reference counting to lockd

2008-01-08 Thread Jeff Layton
On Tue, 8 Jan 2008 17:46:33 +1100 Neil Brown <[EMAIL PROTECTED]> wrote: The comments about patch 5/6 seem sane. I'll plan to incorporate them in the respin... > On Saturday January 5, [EMAIL PROTECTED] wrote: > > @@ -357,7 +375,18 @@ lockd_down(void) > > goto out; > > } > > wa

Re: [PATCH 6/6] NLM: Add reference counting to lockd

2008-01-07 Thread Neil Brown
On Saturday January 5, [EMAIL PROTECTED] wrote: > @@ -357,7 +375,18 @@ lockd_down(void) > goto out; > } > warned = 0; > - kthread_stop(nlmsvc_task); > + if (atomic_sub_return(1, &nlmsvc_ref) != 0) > + printk(KERN_WARNING "lockd_down: lockd is waiting fo