diff options
author | ed <ed@FreeBSD.org> | 2008-07-22 21:27:22 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2008-07-22 21:27:22 +0000 |
commit | 1e4302f67a0633f03c9696f8aa7766fd9e23c79e (patch) | |
tree | 4fe889d36172171178190558d3aff2196e25613c /sys/rpc | |
parent | dfa80a42e2ec65b03668ded45b03bb01e80460ed (diff) | |
download | FreeBSD-src-1e4302f67a0633f03c9696f8aa7766fd9e23c79e.zip FreeBSD-src-1e4302f67a0633f03c9696f8aa7766fd9e23c79e.tar.gz |
Move the NFS/RPC code away from lbolt.
The kernel has a special wchan called `lbolt', which is triggered each
second. It doesn't seem to be used a lot and it seems pretty redundant,
because we can specify a timeout value to the *sleep() routines. In an
attempt to eventually remove lbolt, make the NFS/RPC code use a timeout
of `hz' when trying to reconnect.
Only the TTY code (not MPSAFE TTY) and the VFS syncer seem to use lbolt
now.
Reviewed by: attilio, jhb
Approved by: philip (mentor), alfred, dfr
Diffstat (limited to 'sys/rpc')
-rw-r--r-- | sys/rpc/rpcclnt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/rpc/rpcclnt.c b/sys/rpc/rpcclnt.c index ba41a3c..01f8cd0 100644 --- a/sys/rpc/rpcclnt.c +++ b/sys/rpc/rpcclnt.c @@ -183,6 +183,7 @@ static u_int32_t rpcclnt_xid = 0; static u_int32_t rpcclnt_xid_touched = 0; struct rpcstats rpcstats; int rpcclnt_ticks; +static int fake_wchan; SYSCTL_NODE(_kern, OID_AUTO, rpc, CTLFLAG_RD, 0, "RPC Subsystem"); @@ -597,7 +598,7 @@ rpcclnt_reconnect(rep, td) while ((error = rpcclnt_connect(rpc, td)) != 0) { if (error == EINTR || error == ERESTART) RPC_RETURN(EINTR); - tsleep(&lbolt, PSOCK, "rpccon", 0); + tsleep(&fake_wchan, PSOCK, "rpccon", hz); } /* @@ -2003,7 +2004,7 @@ rpcclnt_cancelreqs(rpc) splx(s); if (task == NULL) return (0); - tsleep(&lbolt, PSOCK, "nfscancel", 0); + tsleep(&fake_wchan, PSOCK, "nfscancel", hz); } return (EBUSY); } |