summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_bio.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-01-15 20:57:21 +0000
committerpeter <peter@FreeBSD.org>2002-01-15 20:57:21 +0000
commitf71468f39bb7c66ce628f2a2906227d37d28308b (patch)
treef4a1ce25c9982650e180ecb7815af23a4f3fd99f /sys/nfsclient/nfs_bio.c
parente31ed9b278286759f128e806c324c7ab06d4b2e7 (diff)
downloadFreeBSD-src-f71468f39bb7c66ce628f2a2906227d37d28308b.zip
FreeBSD-src-f71468f39bb7c66ce628f2a2906227d37d28308b.tar.gz
Revise the nfsiod auto tuning code. Now both the upper and lower limits
are specifyable by sysctl and are respected. Submitted by: Maxime Henrion <mux@sneakerz.org>
Diffstat (limited to 'sys/nfsclient/nfs_bio.c')
-rw-r--r--sys/nfsclient/nfs_bio.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c
index 3905118..1b607dc 100644
--- a/sys/nfsclient/nfs_bio.c
+++ b/sys/nfsclient/nfs_bio.c
@@ -1143,7 +1143,7 @@ again:
/*
* Find a free iod to process this request.
*/
- for (iod = 0; iod < NFS_MAXASYNCDAEMON; iod++)
+ for (iod = 0; iod < nfs_numasync; iod++)
if (nfs_iodwant[iod]) {
gotiod = TRUE;
break;
@@ -1158,6 +1158,19 @@ again:
gotiod = TRUE;
}
+ if (gotiod) {
+ /*
+ * Found one, so wake it up and tell it which
+ * mount to process.
+ */
+ NFS_DPF(ASYNCIO, ("nfs_asyncio: waking iod %d for mount %p\n",
+ iod, nmp));
+ nfs_iodwant[iod] = (struct proc *)0;
+ nfs_iodmount[iod] = nmp;
+ nmp->nm_bufqiods++;
+ wakeup((caddr_t)&nfs_iodwant[iod]);
+ }
+
/*
* If none are free, we may already have an iod working on this mount
* point. If so, it will process our request.
@@ -1177,17 +1190,6 @@ again:
*/
if (gotiod) {
/*
- * Found one, so wake it up and tell it which
- * mount to process.
- */
- NFS_DPF(ASYNCIO, ("nfs_asyncio: waking iod %d for mount %p\n",
- iod, nmp));
- nfs_iodwant[iod] = (struct proc *)0;
- nfs_iodmount[iod] = nmp;
- nmp->nm_bufqiods++;
- wakeup((caddr_t)&nfs_iodwant[iod]);
-
- /*
* Ensure that the queue never grows too large. We still want
* to asynchronize so we block rather then return EIO.
*/
OpenPOWER on IntegriCloud