From: Greg Banks <gnb@sgi.com>
To: Neil Brown <neilb@suse.de>
Cc: Thomas Talpey <Thomas.Talpey@netapp.com>,
Linux NFS Mailing List <nfs@lists.sourceforge.net>,
Peter Leckie <pleckie@melbourne.sgi.com>
Subject: Re: [RFC,PATCH 8/14] knfsd: centralise SK_CLOSE handling
Date: Fri, 18 May 2007 16:36:14 +1000 [thread overview]
Message-ID: <20070518063614.GH5104@sgi.com> (raw)
In-Reply-To: <17996.13702.484468.777723@notabene.brown>
On Thu, May 17, 2007 at 08:59:18PM +1000, Neil Brown wrote:
> On Thursday May 17, gnb@sgi.com wrote:
> >
> > Centralise the handling of the SK_CLOSE bit to that future
> > sunrpc server transport implementations will be easier to
> > write correctly. The bit should now not be manipulated
> > directly, inline exist to wrap that. Also, the sko_recvfrom
> > method does not need to check for SK_CLOSE anymore, that's
> > handled in core code.
> ...
> >
> > if (svsk) {
> > - svc_sock_enqueue(svsk);
> > + /*
> > + * We're always called in nfsd context so we
> > + * don't have to muck around with SK_CLOSE.
> > + */
> > + svc_delete_socket(svsk);
> > svc_sock_put(svsk);
> > }
>
> I'm not convinced that this is right.
I believe it is right, but I'll admit it's not obvious enough ;-)
> svc_delete_socket has a comment:
> /*
> * We used to delete the svc_sock from whichever list
> * it's sk_ready node was on, but we don't actually
> * need to. This is because the only time we're called
> * while still attached to a queue, the queue itself
> * is about to be destroyed (in svc_destroy).
> */
> and I think this change invalidate the premise of that comment.
The hunk above, which now calls svc_delete_socket() directly,
is in svc_tcp_accept(), which is only ever called from svc_recv()
*after* the svc_sock has been dequeued from the pool. At this
point the svc_sock is not attached to a queue by sk_ready. So
the premise of the comment is still valid.
I'll improve the comment to read:
/*
* We're always called in nfsd context when not
* attached to a queue by sk_ready, so can call
* svc_delete_socket() directly and not have to
* muck around with SK_CLOSE.
*/
BTW, I have a patch that moves that code out of svc_tcp_accept()
into more generic code, so that RDMA connection transports are also
subject to a connection limit. Coming soon.
Greg.
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
Apparently, I'm Bedevere. Which MPHG character are you?
I don't speak for SGI.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2007-05-18 6:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-16 19:25 [RFC,PATCH 8/14] knfsd: centralise SK_CLOSE handling Greg Banks
2007-05-17 10:59 ` Neil Brown
2007-05-18 6:36 ` Greg Banks [this message]
2007-05-20 23:56 ` Greg Banks
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=20070518063614.GH5104@sgi.com \
--to=gnb@sgi.com \
--cc=Thomas.Talpey@netapp.com \
--cc=neilb@suse.de \
--cc=nfs@lists.sourceforge.net \
--cc=pleckie@melbourne.sgi.com \
/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