From 411e1480fd01d788056fb7502cf031af059cbd7f Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Mon, 10 Jan 2000 00:07:24 +0000 Subject: [PATCH] Remove the P_BUFEXHAUST flag from the syncer process (leaving it only on the buf_daemon process). The problem is that when the syncer process starts running the worklist, it wants to delete lots of files. It does this by VFS_VGET'ing the vnodes, clearing the blocks in them and bdwrite'ing the buffer. It can process close to a thousand files per second which generates a large number of dirty buffers. So, giving it special priviledge at the buffer trough leads to trouble as the buf_daemon does occationally need a free buffer to proceed and if the syncer has used every last one up, we are toast. --- sys/kern/vfs_export.c | 2 -- sys/kern/vfs_subr.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 54c7ad1d501..4e6123e2c39 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -981,8 +981,6 @@ sched_sync(void) EVENTHANDLER_REGISTER(shutdown_pre_sync, shutdown_kproc, p, SHUTDOWN_PRI_LAST); - p->p_flag |= P_BUFEXHAUST; - for (;;) { kproc_suspend_loop(p); diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 54c7ad1d501..4e6123e2c39 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -981,8 +981,6 @@ sched_sync(void) EVENTHANDLER_REGISTER(shutdown_pre_sync, shutdown_kproc, p, SHUTDOWN_PRI_LAST); - p->p_flag |= P_BUFEXHAUST; - for (;;) { kproc_suspend_loop(p);