* [RFC, PATCH 1/5] knfsd: completely centralise deferral handling
@ 2007-05-23 14:32 Greg Banks
0 siblings, 0 replies; only message in thread
From: Greg Banks @ 2007-05-23 14:32 UTC (permalink / raw)
To: Neil Brown; +Cc: Linux NFS Mailing List, Thomas Talpey, Peter Leckie
Pull all the deferred request logic up into the generic code so
that transport-specified code does not need to be aware of it.
Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
---
net/sunrpc/svcsock.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
Index: linux/net/sunrpc/svcsock.c
===================================================================
--- linux.orig/net/sunrpc/svcsock.c 2007-05-23 21:39:49.835887107 +1000
+++ linux/net/sunrpc/svcsock.c 2007-05-23 21:40:00.030560270 +1000
@@ -754,11 +754,6 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
(serv->sv_nrthreads+3) * serv->sv_max_mesg,
(serv->sv_nrthreads+3) * serv->sv_max_mesg);
- if ((rqstp->rq_deferred = svc_deferred_dequeue(svsk))) {
- svc_sock_received(svsk);
- return svc_deferred_recv(rqstp);
- }
-
svc_sock_clear_data_ready(svsk);
while ((err = kernel_recvmsg(svsk->sk_sock, &msg, NULL,
0, 0, MSG_PEEK | MSG_DONTWAIT)) < 0 ||
@@ -1153,11 +1148,6 @@ svc_tcp_recvfrom(struct svc_rqst *rqstp)
test_bit(SK_CONN, &svsk->sk_flags),
test_bit(SK_CLOSE, &svsk->sk_flags));
- if ((rqstp->rq_deferred = svc_deferred_dequeue(svsk))) {
- svc_sock_received(svsk);
- return svc_deferred_recv(rqstp);
- }
-
if (test_and_clear_bit(SK_CHNGBUF, &svsk->sk_flags))
/* sndbuf needs to have room for one request
* per thread, otherwise we can stall even when the
@@ -1538,6 +1528,10 @@ svc_recv(struct svc_rqst *rqstp, long ti
} else if (test_bit(SK_LISTENER, &svsk->sk_flags)) {
svsk->sk_type->st_accept(svsk);
svc_sock_received(svsk);
+ } else if ((rqstp->rq_deferred = svc_deferred_dequeue(svsk))) {
+ dprintk("svc: rqstp=%p got deferred request on svsk=%p\n", rqstp, svsk);
+ svc_sock_received(svsk);
+ len = svc_deferred_recv(rqstp);
} else {
dprintk("svc: server %p, pool %u, socket %p, inuse=%d\n",
rqstp, pool->sp_id, svsk, atomic_read(&svsk->sk_inuse));
--
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-05-23 14:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-23 14:32 [RFC, PATCH 1/5] knfsd: completely centralise deferral handling Greg Banks
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.