lkml.org 
[lkml]   [2002]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: One more bio for for floppy users in 2.5.33..

On Thu, 5 Sep 2002, Andrew Morton wrote:
> Linus Torvalds wrote:
> >
> > ...
> > I would suggest:
> >
> > - add a "nr of sectors completed" argument to the "bi_end_io()" function,
> > so that it looks like
> >
> > void xxx_bio_end_io(struct bio *bio, unsigned long completed)
> > {
> > /*
> > * Old completion handlers that don't understand it
> > * should just return immediately for partial bio
> > * completion notifiers
> > */
> > if (bio->b_size)
> > return;
> > ...
> > }
> >
> > which would allow things like mpage_end_io_read() to unlock pages as
> > they complete, instead of unlocking them all in one go.
>
> It's a feature! We don't want to have to soak up 20,000 context
> switches a second just reading a file from an 80MB/sec disk.

You didn't think it through.

The current behaviour is a BUG.

A fast disk driver will _never ever_ do a partial request completion. A
high-performance subsystem will put in the scatter-gather list and say
"go" to the controller, and the controller will send exactly one interrupt
back when it is all done.

So for such a system, you'd never see partial completions anyway.

Partial completions are a feature of slow hardware. And slow hardware is
exactly when we want to know about it.

So my approach has no downsides, only upsides.

Linus

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

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