From: Ben Myers <bpm@sgi.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH 1/2] knfsd: nfsd_max_connections module parameter
Date: Mon, 22 Feb 2010 15:54:42 -0600 [thread overview]
Message-ID: <20100222215442.8481.92759.stgit@case> (raw)
In-Reply-To: <20100222215349.8481.80700.stgit@case>
Decouple the maximum number of nfs client connections from the number of server
threads by adding the nfsd_max_connections module parameter. Note that the
default remains the current formula: (nr_threads+3) * 20.
Signed-off-by: Ben Myers <bpm@sgi.com>
---
fs/nfsd/nfsctl.c | 6 ++++++
fs/nfsd/nfssvc.c | 3 +++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 0f0e77f..981366d 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -16,6 +16,9 @@
#include "nfsd.h"
#include "cache.h"
+/* Default to use existing settings in svc_check_conn_limits */
+unsigned int nfsd_max_connections = 0;
+
/*
* We have a single directory with 9 nodes in it.
*/
@@ -1447,5 +1450,8 @@ static void __exit exit_nfsd(void)
MODULE_AUTHOR("Olaf Kirch <okir-pn4DOG8n3UYbFoVRYvo4fw@public.gmane.org>");
MODULE_LICENSE("GPL");
+
+module_param(nfsd_max_connections, uint, 0644);
+
module_init(init_nfsd)
module_exit(exit_nfsd)
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 171699e..a21fd4e 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -275,11 +275,14 @@ int nfsd_create_serv(void)
return err;
}
+extern unsigned int nfsd_max_connections;
static int nfsd_init_socks(int port)
{
int error;
if (!list_empty(&nfsd_serv->sv_permsocks))
return 0;
+
+ nfsd_serv->sv_maxconn = nfsd_max_connections;
error = svc_create_xprt(nfsd_serv, "udp", PF_INET, port,
SVC_SOCK_DEFAULTS);
next prev parent reply other threads:[~2010-02-22 21:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-22 21:54 [PATCH 0/2] knfsd: support larger numbers of clients Ben Myers
2010-02-22 21:54 ` Ben Myers [this message]
2010-02-22 21:54 ` [PATCH 2/2] sunrpc: socket buffer size module parameter Ben Myers
2010-02-23 1:33 ` Chuck Lever
2010-02-23 16:12 ` bpm
2010-02-23 20:09 ` Chuck Lever
2010-02-23 20:48 ` bpm
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=20100222215442.8481.92759.stgit@case \
--to=bpm@sgi.com \
--cc=linux-nfs@vger.kernel.org \
/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 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.