Skip to contentSkip to conversation

sunrpc: remove svc_check_conn_limits

RFC PATCH New Jeff Layton 1 participant 1 message Oct 15, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 sunrpc: remove svc_check_conn_limits

Here's a patch for the purposes of discussion. It compiles and seems to work, but I haven't done any stress testing of it (not sure I have a big enough setup to cause the code in svc_check_conn_limits to fire).

----------------[snip]------------------

svc_check_conn_limits is called whenever we get a new connection from a client. If the number of "tmpsocks" is more than this formula, older connections get dropped. We also spew a printk to warn the admin that they should increase the number of threads (though that's not possible with services like lockd):

    (serv->sv_nrthreads+3)*20

We only do this check for listening services, so we never call this check on a UDP receive. As best I can tell, this check was intended to prevent us from overloading the receive buffers. For TCP though, the receive buffers are pretty much set to a size regardless of the number of threads (3 * serv->sv_max_mesg).

Since increasing the number of threads doesn't have any affect on the receive buffer size for TCP, and we don't call this check for UDP, it doesn't seem to make much sense to keep this check at all.

This patch just removes it, and some other code that should no longer be needed with it gone.

It seems to compile and work, but I've not stress-tested this at all. I'd also appreciate some comment from someone more familiar with the RDMA code to make sure that I'm not breaking anything there by removing this.

Thoughts, comments and suggestions are greatly appreciated here...

---
 include/linux/sunrpc/svc.h |    1 -
 net/sunrpc/svc_xprt.c      |   48 --------------------------------------------
 2 files changed, 0 insertions(+), 49 deletions(-)
include/linux/sunrpc/svc.h +0 -1
index 3afe7fb..9a7543a 100644
@@ -64,7 +64,6 @@ struct svc_serv {
 
 	struct list_head	sv_permsocks;	/* all permanent sockets */
 	struct list_head	sv_tempsocks;	/* all temporary sockets */
-	int			sv_tmpcnt;	/* count of temporary sockets */
 	struct timer_list	sv_temptimer;	/* timer for aging temporary sockets */
 	sa_family_t		sv_family;	/* listener's address family */
 
net/sunrpc/svc_xprt.c +0 -48

69 lines not on this page · raw message

Signature · 1 line
1.5.5.1