diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2014-10-08 07:33:15 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2014-10-08 07:33:15 +0000 |
commit | eebbc0d31a819cbb77bdeaea780aa18ea9bad45c (patch) | |
tree | 761ad08e46bdaf92d5b89ae152d3c0a6ca922111 /sys/kern | |
parent | 21e1dd4c7c1171c6aa014264738cb4ac62ef12d2 (diff) |
Now that the cleaner yields the cpu, we can stop checking
to see if we've hogged the cpu for >1 second.
okay miod@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_bio.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 37b8e32c3b4..c26b69d414a 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_bio.c,v 1.162 2014/09/09 07:07:39 blambert Exp $ */ +/* $OpenBSD: vfs_bio.c,v 1.163 2014/10/08 07:33:14 blambert Exp $ */ /* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */ /* @@ -998,7 +998,6 @@ buf_get(struct vnode *vp, daddr_t blkno, size_t size) void buf_daemon(struct proc *p) { - struct timeval starttime, timediff; struct buf *bp = NULL; int s, pushed = 0; @@ -1021,10 +1020,7 @@ buf_daemon(struct proc *p) tsleep(&bd_req, PRIBIO - 7, "cleaner", 0); } - getmicrouptime(&starttime); - while ((bp = bufcache_getdirtybuf())) { - struct timeval tv; if (UNCLEAN_PAGES < lodirtypages && bcstats.kvaslots_avail > 2 * RESERVE_SLOTS && @@ -1059,13 +1055,7 @@ buf_daemon(struct proc *p) sched_pause(); - /* Never allow processing to run for more than 1 sec */ - getmicrouptime(&tv); - timersub(&tv, &starttime, &timediff); s = splbio(); - if (timediff.tv_sec) - break; - } } } |