summaryrefslogtreecommitdiff
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorGrigoriy Orlov <gluk@cvs.openbsd.org>2001-10-11 08:07:13 +0000
committerGrigoriy Orlov <gluk@cvs.openbsd.org>2001-10-11 08:07:13 +0000
commit3114560bb67cbcaa1578333a39b2f8db9c0430a1 (patch)
tree4e672ae226e801a50f6bd50e74217d6c57dfa574 /sys/kern/init_main.c
parent4956de05c4137ac410e3524aa9d2cde93a5b41ef (diff)
Count pages not buffers. This fixes deadlock condition which mainly
occurs on the fs with large block size. We can have situation where numcleanbufs < locleanbufs and numdirtybufs < hidirtybufs. So, buffer flushing daemon never wakeups and other processes asleep forever waiting for a clean buffers. We count pages only for the dirty buffers which are on freelist(BQ_DIRTY). niklas@ found this. Rename flasher to cleaner. Suggested by costa@. Discussed with niklas@, costa@, millert@, art@. Ok deraadt@.
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index fb294afb8a4..6f671250c98 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_main.c,v 1.78 2001/09/29 20:09:34 gluk Exp $ */
+/* $OpenBSD: init_main.c,v 1.79 2001/10/11 08:07:12 gluk Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
@@ -133,7 +133,7 @@ int main __P((void *));
void check_console __P((struct proc *));
void start_init __P((void *));
void start_pagedaemon __P((void *));
-void start_flusher __P((void *));
+void start_cleaner __P((void *));
void start_update __P((void *));
void start_reaper __P((void *));
void start_crypto __P((void *));
@@ -414,9 +414,9 @@ main(framep)
if (kthread_create(start_reaper, NULL, NULL, "reaper"))
panic("fork reaper");
- /* Create process 4, the flusher daemon kernel thread. */
- if (kthread_create(start_flusher, NULL, NULL, "flusher"))
- panic("fork flusher");
+ /* Create process 4, the cleaner daemon kernel thread. */
+ if (kthread_create(start_cleaner, NULL, NULL, "cleaner"))
+ panic("fork cleaner");
/* Create process 5, the update daemon kernel thread. */
if (kthread_create(start_update, NULL, NULL, "update"))
@@ -620,7 +620,7 @@ start_update(arg)
}
void
-start_flusher(arg)
+start_cleaner(arg)
void *arg;
{
buf_daemon(curproc);