Re: [RFC][DATA] re "ongoing vm suckage"

From: Rik van Riel (riel@conectiva.com.br)
Date: Fri Aug 03 2001 - 22:34:37 EST


On Fri, 3 Aug 2001, Ben LaHaise wrote:

> See, after applying this patch, it no longer deadlocks on io. The
> jerky interactive performance still exists,

Would something like this help ?

(yes, there's a small SMP race, but since the system survives
the starvation bug today that isn't critical)

--- ./ll_rw_blk.c.batch Sat Aug 4 00:30:55 2001
+++ ./ll_rw_blk.c Sat Aug 4 00:33:48 2001
@@ -1031,15 +1031,19 @@

         for (i = 0; i < nr; i++) {
                 struct buffer_head *bh = bhs[i];
+ static int queued_sector_waiters;

                 /*
                  * don't lock any more buffers if we are above the high
                  * water mark. instead start I/O on the queued stuff.
                  */
- if (atomic_read(&queued_sectors) >= high_queued_sectors) {
+ if (atomic_read(&queued_sectors) >= high_queued_sectors
+ || queued_sector_waiters) {
                         run_task_queue(&tq_disk);
+ queued_sector_waiters = 1;
                         wait_event(blk_buffers_wait,
                          atomic_read(&queued_sectors) < low_queued_sectors);
+ queued_sector_waiters = 0;
                 }

                 /* Only one thread can actually submit the I/O. */

Rik

--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...

http://www.surriel.com/ http://distro.conectiva.com/

Send all your spam to aardvark@nl.linux.org (spam digging piggy)

- 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 : Tue Aug 07 2001 - 21:00:31 EST