[lkml]   [2001]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: VM in 2.4.7-pre hurts...
On Mon, Jul 09, 2001 at 09:03:33PM -0700, Linus Torvalds wrote:
> No. Playing with the bh count for those two makes the rules be the same
> for everybody, because the sync_io handler needs it, and then we might as
> well just make it a general rule: IO in-flight shows up as an elevated
> count. It also makes sense from a "reference count" standpoint - the

At least for the kiobuf case the notion of IO in flight is hold in the
iobuf->io_count, about the reference count there isn't a reference count
at all on those bh, they're just an array of ram in the iobuf.

Infact the b_count is also never read, exactly because the notion of
reference-count/in-flight-I/O doesn't belong there.

One valid argument is to do the same thing before all sumbit_bh which
doesn't seem to have a big value to me at the moment, maybe I'm wrong
in the long term but certainly at this moment that sounds more like
wasted cpu than cleaner code.

so I guess I'd prefer something like this:

--- 2.4.7pre5/fs/buffer.c.~1~ Tue Jul 10 03:55:21 2001
+++ 2.4.7pre5/fs/buffer.c Tue Jul 10 06:52:38 2001
@@ -2006,7 +2006,6 @@

kiobuf = bh->b_private;
- put_bh(bh);
end_kio_request(kiobuf, uptodate);

@@ -2131,7 +2130,6 @@
offset += size;

- get_bh(tmp);
submit_bh(rw, tmp);
* Wait for IO if we have got too much

(personally I guess I'd still prefer to do the same for the async-IO
handler, but for it at least the b_count is checked eventually by
somebody [try_to_free_pages] so it somehow make more sense even if in
practice it isn't not needed there either)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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