lkml.org 
[lkml]   [2000]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] 2.2.17pre9 interactiveness under high IO
From
Date
>>>>> "marcelo" == Marcelo Tosatti <marcelo@conectiva.com.br> writes:

marcelo> On Mon, 3 Jul 2000, Jens Axboe wrote:
>> 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).

marcelo> if (!req) {
marcelo> if (rw_ahead)
marcelo> goto end_io;
marcelo> req = __get_request_wait(max_req, bh->b_rdev);
marcelo> }

marcelo> In case we fail to find a free request, bh->b_end_io is called, and
marcelo> it unlocks the buffer.

Think what can happen if bh->b_end_io is set as _async handler, it
wolud unlock the buffer and more things that you don't want posibly
for it to do.

Later, Juan.

--
In theory, practice and theory are the same, but in practice they
are different -- Larry McVoy

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

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.887 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site