Re: [PATCH] 2.2.17pre9 interactiveness under high IO

From: Jens Axboe (axboe@suse.de)
Date: Sun Jul 02 2000 - 19:13:55 EST


On Sat, Jul 01 2000, Marcelo Tosatti wrote:
> Hi,
>
> This silly patch avoids that by making ll_rw_block() ignore the IO if the
> request queue is full, causing the process to search for more freeable
> pages instead blocking.
>
> --- fs/buffer.c.orig Sat Jul 1 20:49:19 2000
> +++ fs/buffer.c Sat Jul 1 20:28:36 2000
> @@ -1517,7 +1517,7 @@
> if (wait)
> __wait_on_buffer(p);
> } else if (buffer_dirty(p))
> - ll_rw_block(WRITE, 1, &p);
> + ll_rw_block(WRITEA, 1, &p);
> } while (tmp != bh);
>
> do {

This is wrong -- if the buffer is not queued because we are out of
free request slots, it has still already been locked at this point
(and _Req). So what happens the next time someone calls
sync_page_buffers on this buffer head? It finds the buffer locked,
assumed it has been queued, and does __wait_on_buffer(). Boom,
you're stuck.

-- 
* Jens Axboe <axboe@suse.de>
* SuSE Labs

- 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/



This archive was generated by hypermail 2b29 : Fri Jul 07 2000 - 21:00:13 EST