[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
buf_daemon() improvement
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: buf_daemon() improvement
- From: Pedro Martelletto <pbastos_(_at_)_inf_(_dot_)_puc-rio_(_dot_)_br>
- Date: Tue, 2 Nov 2004 11:32:05 -0200
greetings,
please test this and send feedback to me. it should avoid the cleaner
from running when it doesn't really need to, improving a bit performance
under heavy disk load.
cheers,
-p.
Index: vfs_bio.c
===================================================================
RCS file: /cvs/src/sys/kern/vfs_bio.c,v
retrieving revision 1.71
diff -u -r1.71 vfs_bio.c
--- vfs_bio.c 2004/11/01 15:55:38 1.71
+++ vfs_bio.c 2004/11/02 13:13:21
@@ -880,6 +880,12 @@
for (;;) {
if (numdirtypages < hidirtypages) {
tsleep(&bd_req, PRIBIO - 7, "cleaner", 0);
+ /*
+ * Between being awaken and actually running, the
+ * situation might have changed (due to the syncer
+ * being ran, for example), so do the check again.
+ */
+ continue;
}
getmicrouptime(&starttime);
Visit your host, monkey.org