Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfsclient/nfs_clnfsiod.c
Show All 12 Lines | |||||
* than the new minimum, create some more. | * than the new minimum, create some more. | ||||
*/ | */ | ||||
for (i = nfs_iodmin - ncl_numasync; i > 0; i--) | for (i = nfs_iodmin - ncl_numasync; i > 0; i--) | ||||
nfs_nfsiodnew_sync(); | nfs_nfsiodnew_sync(); | ||||
out: | out: | ||||
NFSUNLOCKIOD(); | NFSUNLOCKIOD(); | ||||
return (0); | return (0); | ||||
} | } | ||||
SYSCTL_PROC(_vfs_nfs, OID_AUTO, iodmin, CTLTYPE_UINT | CTLFLAG_RW, 0, | SYSCTL_PROC(_vfs_nfs, OID_AUTO, iodmin, | ||||
CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, 0, | |||||
sizeof (nfs_iodmin), sysctl_iodmin, "IU", | sizeof (nfs_iodmin), sysctl_iodmin, "IU", | ||||
"Min number of nfsiod kthreads to keep as spares"); | "Min number of nfsiod kthreads to keep as spares"); | ||||
static int | static int | ||||
sysctl_iodmax(SYSCTL_HANDLER_ARGS) | sysctl_iodmax(SYSCTL_HANDLER_ARGS) | ||||
{ | { | ||||
int error, i; | int error, i; | ||||
int iod, newmax; | int iod, newmax; | ||||
Show All 19 Lines | |||||
if (ncl_iodwant[iod] == NFSIOD_AVAILABLE) | if (ncl_iodwant[iod] == NFSIOD_AVAILABLE) | ||||
wakeup(&ncl_iodwant[iod]); | wakeup(&ncl_iodwant[iod]); | ||||
iod--; | iod--; | ||||
} | } | ||||
out: | out: | ||||
NFSUNLOCKIOD(); | NFSUNLOCKIOD(); | ||||
return (0); | return (0); | ||||
} | } | ||||
SYSCTL_PROC(_vfs_nfs, OID_AUTO, iodmax, CTLTYPE_UINT | CTLFLAG_RW, 0, | SYSCTL_PROC(_vfs_nfs, OID_AUTO, iodmax, | ||||
CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, 0, | |||||
sizeof (ncl_iodmax), sysctl_iodmax, "IU", | sizeof (ncl_iodmax), sysctl_iodmax, "IU", | ||||
"Max number of nfsiod kthreads"); | "Max number of nfsiod kthreads"); | ||||
static int | static int | ||||
nfs_nfsiodnew_sync(void) | nfs_nfsiodnew_sync(void) | ||||
{ | { | ||||
int error, i; | int error, i; | ||||
Show All 12 Lines |