[PATCH] run_task_queue(&tq_disk) only if we written data to disk

From: Marcelo Tosatti (marcelo@conectiva.com.br)
Date: Mon Feb 19 2001 - 17:05:56 EST


Hi,

This patch makes page_launder() do actual disk IO
(run_task_queue(&tq_disk)) only if IO was queued in the page freeing
loop.

If we freed enough clean pages without needing do to any disk IO, there is
no need to call run_task_queue(&tq_disk).

 
--- linux/mm/vmscan.c.orig Mon Feb 19 20:46:23 2001
+++ linux/mm/vmscan.c Mon Feb 19 20:47:21 2001
@@ -657,12 +657,13 @@
        }
 
        /*
- * We have to make sure the data is actually written to
- * the disk now, otherwise we'll never get enough clean
- * pages and the system will keep queueing dirty pages
+ * If we written something to disk, we have to make sure the data
is
+ * actually written to the disk now, otherwise we'll never get
enough
+ * clean pages and the system will keep queueing dirty pages
         * for flushing.
         */
- run_task_queue(&tq_disk);
+ if (launder_loop)
+ run_task_queue(&tq_disk);
 
        /*
         * Return the amount of pages we freed or made freeable.

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



This archive was generated by hypermail 2b29 : Fri Feb 23 2001 - 21:00:21 EST