Re: [rfc][patch] remove racy sync_page?

Arjan van de Ven
2006-05-31T12:36:25Z

On Wed, 2006-05-31 at 14:31 +0200, Helge Hafting wrote:
> Linus Torvalds wrote:
> > On Wed, 31 May 2006, Nick Piggin wrote:
> >
> >> The requests can only get merged if contiguous requests from the upper
> >> layers come down, right?
> >>
> >
> > It has nothing to do with merging. It has to do with IO patterns.
> >
> > Seeking.
> >
> > Seeking is damn expensive - much more so than command issue. People forget
> > that sometimes.
> >
> > If you can sort the requests so that you don't have to seek back and
> > forth, that's often a HUGE win.
> >
> > Yes, the requests will still be small, and yes, the IO might happen in 4kB
> > chunks, but it happens a lot faster if you do it in a good elevator
> > ordering and if you hit the track cache than if you seek back and forth.
> >
> This is correct, but doesn't really explain why plugging might be good.
>
> If requests go to disk immediately and the disk is able to keep
> up with the seeks, then plugging doesn't help. This is a low-bandwith
> case of course, but servicing each request immediately will
> keep the latency lower.

only for writes. afaik for reads and other synchronous beasts we already
unplug immediately anyway.

In addition unplugging happens after like 3 or 4 requests and after a
few miliseconds, whatever comes first ... so you never wait really long
(on a "what a seek costs" scale) anyway