Remove hard limits on number of accepting NFS connections.

Limits of 5 connections set long ago creates problems for SPEC benchmark.
Make the NFS follow system-wide maximum.

MFC after:	1 week
This commit is contained in:
Alexander Motin 2015-04-07 10:25:27 +00:00
parent fbc48c2bfb
commit 80867e61d8
3 changed files with 5 additions and 5 deletions

View File

@ -168,7 +168,7 @@ svc_tp_create(
taddr = uaddr2taddr(nconf, uaddr);
bind.addr = *taddr;
free(taddr, M_RPC);
bind.qlen = SOMAXCONN;
bind.qlen = -1;
xprt = svc_tli_create(pool, NULL, nconf, &bind, 0, 0);
free(bind.addr.buf, M_RPC);
} else {
@ -256,7 +256,7 @@ svc_tli_create(
goto freedata;
}
}
solisten(so, SOMAXCONN, curthread);
solisten(so, -1, curthread);
} else {
if (bindresvport(so,
(struct sockaddr *)bindaddr->addr.buf)) {

View File

@ -177,7 +177,7 @@ svc_vc_create(SVCPOOL *pool, struct socket *so, size_t sendsize,
xprt_register(xprt);
solisten(so, SOMAXCONN, curthread);
solisten(so, -1, curthread);
SOCKBUF_LOCK(&so->so_rcv);
xprt->xp_upcallset = 1;

View File

@ -626,7 +626,7 @@ main(int argc, char **argv)
bindhost[i]);
nfsd_exit(1);
}
if (listen(tcpsock, 5) < 0) {
if (listen(tcpsock, -1) < 0) {
syslog(LOG_ERR, "listen failed");
nfsd_exit(1);
}
@ -701,7 +701,7 @@ main(int argc, char **argv)
bindhost[i]);
nfsd_exit(1);
}
if (listen(tcp6sock, 5) < 0) {
if (listen(tcp6sock, -1) < 0) {
syslog(LOG_ERR, "listen failed");
nfsd_exit(1);
}