netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Wolfgang Walter <wolfgang.walter@studentenwerk.mhn.de>
Cc: Neil Brown <neilb@suse.de>,
	netdev@vger.kernel.org, nfs@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, trond.myklebust@fys.uio.no
Subject: Re: [patch] sunrpc: make closing of old temporary sockets work	(was: problems with lockd in 2.6.22.6)
Date: Wed, 12 Sep 2007 15:55:12 -0400	[thread overview]
Message-ID: <20070912195512.GC13792@fieldses.org> (raw)
In-Reply-To: <200709122140.57783.wolfgang.walter@studentenwerk.mhn.de>

On Wed, Sep 12, 2007 at 09:40:57PM +0200, Wolfgang Walter wrote:
> On Wednesday 12 September 2007, J. Bruce Fields wrote:
> > On Wed, Sep 12, 2007 at 04:14:06PM +0200, Neil Brown wrote:
> > > So it is in 2.6.21 and later and should probably go to .stable for .21
> > > and .22.
> > > 
> > > Bruce:  for you :-)
> > 
> > OK, thanks!  But, (as is alas often the case) I'm still confused:
> > 
> > >  		if (!test_and_set_bit(SK_OLD, &svsk->sk_flags))
> > >  			continue;
> > > -		if (atomic_read(&svsk->sk_inuse) || test_bit(SK_BUSY, &svsk->sk_flags))
> > > +		if (atomic_read(&svsk->sk_inuse) > 1
> > > +		    || test_bit(SK_BUSY, &svsk->sk_flags))
> > >  			continue;
> > >  		atomic_inc(&svsk->sk_inuse);
> > >  		list_move(le, &to_be_aged);
> > 
> > What is it that ensures svsk->sk_inuse isn't incremented or SK_BUSY set
> > after that test?  Not all the code that does either of those is under
> > the same serv->sv_lock lock that this code is.
> > 
> 
> This should not matter - SK_CLOSED may be set at any time.
> 
> svc_age_temp_sockets only detaches the socket, sets SK_CLOSED and then 
> enqueues it. If SK_BUSY is set its already enqueued and svc_sock_enqueue 
> ensures that it is not enqueued twice.

Oh, got it.  And the list manipulation is safe thanks to sv_lock.  Neat,
thanks.  Can you verify that this solves your problem?

--b.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2007-09-12 19:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-12 12:07 [patch] sunrpc: make closing of old temporary sockets work (was: problems with lockd in 2.6.22.6) Wolfgang Walter
2007-09-12 13:37 ` J. Bruce Fields
2007-09-12 14:24   ` J. Bruce Fields
2007-09-12 14:37   ` [NFS] " Wolfgang Walter
2007-09-12 14:14 ` Neil Brown
2007-09-12 18:42   ` J. Bruce Fields
2007-09-12 19:40     ` Wolfgang Walter
2007-09-12 19:55       ` J. Bruce Fields [this message]
2007-09-12 22:18         ` Wolfgang Walter
2007-09-14  9:12         ` Wolfgang Walter
2007-09-14 14:29           ` J. Bruce Fields

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=20070912195512.GC13792@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=netdev@vger.kernel.org \
    --cc=nfs@lists.sourceforge.net \
    --cc=trond.myklebust@fys.uio.no \
    --cc=wolfgang.walter@studentenwerk.mhn.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;
as well as URLs for NNTP newsgroup(s).