Re: stochastic fair queueing in the elevator [Re: [BENCHMARK] 2.4.20-ck3 / aa / rmap with contest]

Andrea Arcangeli
2003-02-10T07:59:29Z

On Mon, Feb 10, 2003 at 06:41:14PM +1100, Nick Piggin wrote:
> Andrea Arcangeli wrote:
>
> >On Mon, Feb 10, 2003 at 03:58:26PM +1100, Nick Piggin wrote:
> >
> >>Jakob Oestergaard wrote:
> >>
> >>
> >>>On Sun, Feb 09, 2003 at 08:33:43PM -0800, Andrew Morton wrote:
> >>>
> >>>
> >>>>David Lang <david.lang@digitalinsight.com> wrote:
> >>>>
> >>>>
> >>>>>note that issuing a fsync should change all pending writes to
> >>>>>'syncronous'
> >>>>>as should writes to any partition mounted with the sync option, or
> >>>>>writes
> >>>>>to a directory with the S flag set.
> >>>>>
> >>>>>
> >>>>We know, at I/O submission time, whether a write is to be waited upon.
> >>>>That's in writeback_control.sync_mode.
> >>>>
> >>>>That, combined with an assumption that "all reads are synchronous" would
> >>>>allow the outgoing BIOs to be appropriately tagged.
> >>>>
> >>>>
> >>>This may be a terribly stupid question, if so pls. just tell me :)
> >>>
> >>>I assume read-ahead requests go elsewhere? Or do we assume that someone
> >>>is waiting for them as well?
> >>>
> >>>If we assume they are synchronous, that would be rather unfair
> >>>especially on multi-user systems - and the 90% accuracy that Rik
> >>>suggested would seem exaggerated to say the least (accuracy would be
> >>>more like 10% on a good day).
> >>>
> >>>
> >>Remember that readahead gets scaled down quickly if it isn't
> >>getting hits. It is also likely to be sequential and in the
> >>track buffer, so it is a small cost.
> >>
> >>Huge readahead is a problem however anticipatory scheduling
> >>will hopefully allow good throughput for multiple read streams
> >>without requiring much readahead.
> >>
> >
> >the main purpose of readahead is to generate 512k scsi commands when you
> >read a file with a 4k user buffer, anticipatory scheduling isn't very
> >related to readahead.
> >
> You seem to be forgetting things like seek time.

I didn't say it's the only purpose. Of course there's no hope for
merging in the metadata dependent reads of the fs where anticipatory
scheduling does its best, and infact they don't even attempt to do any
readhaead. BTW, one thing that should definitely do readhaead and it's
not doing that (at least in 2.4) is the readdir path, again to generate
big commands, no matter the seeks. It was lost with the directory in
pagecache.

Andrea