Here's some more sleeps that use lbolt that could use &nowake and a
timeout for 1 second.
There are some trickier lbolt sleeps in the tty code that I have
omitted, plus the lbolt sleep in the vfs syncer thread.
Otherwise, lbolt is dead with this patch.
ok?
Index: uvm/uvm_fault.c
===================================================================
RCS file: /cvs/src/sys/uvm/uvm_fault.c,v
retrieving revision 1.109
diff -u -p -r1.109 uvm_fault.c
--- uvm/uvm_fault.c 8 Dec 2020 12:26:31 -0000 1.109
+++ uvm/uvm_fault.c 25 Dec 2020 19:31:15 -0000
@@ -1121,7 +1121,8 @@ uvm_fault_lower(struct uvm_faultinfo *uf
KASSERT(result != VM_PAGER_PEND);
if (result == VM_PAGER_AGAIN) {
- tsleep_nsec(&lbolt, PVM, "fltagain2", INFSLP);
+ tsleep_nsec(&nowake, PVM, "fltagain2",
+ SEC_TO_NSEC(1));
return ERESTART;
}
Index: nfs/nfs_vfsops.c
===================================================================
RCS file: /cvs/src/sys/nfs/nfs_vfsops.c,v
retrieving revision 1.125
diff -u -p -r1.125 nfs_vfsops.c
--- nfs/nfs_vfsops.c 10 Jan 2020 10:33:35 -0000 1.125
+++ nfs/nfs_vfsops.c 25 Dec 2020 19:31:16 -0000
@@ -522,7 +522,8 @@ nfs_decode_args(struct nfsmount *nmp, st
if (nmp->nm_sotype == SOCK_DGRAM)
while (nfs_connect(nmp, NULL)) {
printf("nfs_args: retrying connect\n");
- tsleep_nsec(&lbolt, PSOCK, "nfscon", INFSLP);
+ tsleep_nsec(&nowake, PSOCK, "nfscon",
+ SEC_TO_NSEC(1));
}
}
Index: nfs/nfs_socket.c
===================================================================
RCS file: /cvs/src/sys/nfs/nfs_socket.c,v
retrieving revision 1.136
diff -u -p -r1.136 nfs_socket.c
--- nfs/nfs_socket.c 21 Jan 2020 00:18:13 -0000 1.136
+++ nfs/nfs_socket.c 25 Dec 2020 19:31:16 -0000
@@ -408,7 +408,7 @@ nfs_reconnect(struct nfsreq *rep)
while ((error = nfs_connect(nmp, rep)) != 0) {
if (error == EINTR || error == ERESTART)
return (EINTR);
- tsleep_nsec(&lbolt, PSOCK, "nfsrecon", INFSLP);
+ tsleep_nsec(&nowake, PSOCK, "nfsrecon", SEC_TO_NSEC(1));
}
/*