let bdflush to sleep

Andrea Arcangeli (andrea@suse.de)
Mon, 1 Nov 1999 19:39:02 +0100 (CET)


In my buffer flushing stuff I made bdflush to wakeup each 5 sec. That's
not necessary. bdflush can sleep all the time unless there are too much
dirty buffers.

Patch against 2.3.25pre3:

--- 2.3.25pre3-i386/fs/buffer.c.~1~ Mon Nov 1 18:44:06 1999
+++ 2.3.25pre3-i386/fs/buffer.c Mon Nov 1 18:56:58 1999
@@ -2505,10 +2505,10 @@
/*
* If there are still a lot of dirty buffers around,
* skip the sleep and flush some more. Otherwise, we
- * sleep for a while.
+ * go to sleep waiting a wakeup.
*/
if (balance_dirty_state(NODEV) < 0)
- schedule_timeout(5*HZ);
+ schedule();
/* Remember to mark us as running otherwise
the next schedule will block. */
__set_current_state(TASK_RUNNING);

Andrea

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/