projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
7d29aec
)
kernel - Fix vkernel lwp stuck thread bug
author
Matthew Dillon <dillon@apollo.backplane.com>
Tue, 4 Jan 2011 04:22:47 +0000 (20:22 -0800)
committer
Matthew Dillon <dillon@apollo.backplane.com>
Tue, 4 Jan 2011 04:22:47 +0000 (20:22 -0800)
* Fix a tsleep hz / 100 which calculates to 0 due to the vkernel's 20hz
tick rate. This could cause threads running under the vkernel to get
stuck.
sys/kern/vfs_bio.c
patch
|
blob
|
blame
|
history
diff --git
a/sys/kern/vfs_bio.c
b/sys/kern/vfs_bio.c
index
55b5207
..
2c26b85
100644
(file)
--- a/
sys/kern/vfs_bio.c
+++ b/
sys/kern/vfs_bio.c
@@
-2043,7
+2043,8
@@
restart:
/*
* Sanity Checks
*/
- KASSERT(bp->b_qindex == qindex, ("getnewbuf: inconsistent queue %d bp %p", qindex, bp));
+ KASSERT(bp->b_qindex == qindex,
+ ("getnewbuf: inconsistent queue %d bp %p", qindex, bp));
/*
* Note: we no longer distinguish between VMIO and non-VMIO
@@
-2081,7
+2082,7
@@
restart:
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT) != 0) {
spin_unlock(&bufqspin);
- tsleep(&bd_request, 0, "gnbxxx", hz / 100);
+ tsleep(&bd_request, 0, "gnbxxx", (hz + 99) / 100);
goto restart;
}
if (bp->b_qindex != qindex) {