From 5b8db00bae39e5ecd9bafb05478cca5b42564ab1 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Wed, 2 Jul 2014 16:11:22 -0400 Subject: nfsd: add a new /proc/fs/nfsd/max_connections file Currently, the maximum number of connections that nfsd will allow is based on the number of threads spawned. While this is fine for a default, there really isn't a clear relationship between the two. The number of threads corresponds to the number of concurrent requests that we want to allow the server to process at any given time. The connection limit corresponds to the maximum number of clients that we want to allow the server to handle. These are two entirely different quantities. Break the dependency on increasing threads in order to allow for more connections, by adding a new per-net parameter that can be set to a non-zero value. The default is still to base it on the number of threads, so there should be no behavior change for anyone who doesn't use it. Cc: Trond Myklebust Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields --- fs/nfsd/netns.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fs/nfsd/netns.h') diff --git a/fs/nfsd/netns.h b/fs/nfsd/netns.h index d32b3aa6600d..113e1aa9b0e8 100644 --- a/fs/nfsd/netns.h +++ b/fs/nfsd/netns.h @@ -102,6 +102,12 @@ struct nfsd_net { */ struct timeval nfssvc_boot; + /* + * Max number of connections this nfsd container will allow. Defaults + * to '0' which is means that it bases this on the number of threads. + */ + unsigned int max_connections; + struct svc_serv *nfsd_serv; }; -- cgit v1.2.3