Subject: Re: I/O priorities
To: Aidan Cully <aidan@kublai.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 06/20/2002 10:56:52
On Thu, 20 Jun 2002, Aidan Cully wrote:

> On Thu, Jun 20, 2002 at 03:01:46PM +0200, Wojciech Puchar wrote:
> > > Maybe an I/O scheduler makes sense as a solution to this problem?  Or
> > > would that be Too Much Effort?  If so, another solution might be to

I think that an i/o scheduler is the long-term solution to this problem.
It won't make 1.6 (it's WAY too late for that), but it's what we should
do.

> > > restrict the percentage of available buffers a given process can use
> > > for read/write...  Keep it small enough, and you wouldn't need to wait
> > > seconds for dd if=/dev/zero to flush all of its buffers.
> >
> > seconds sound cool. but does it mean per-process queues???
>
> I don't think so.  Write ordering should be preserved, but if a process

We don't need to preserve write ordering. All we promise (from the point
of view of file systems and write(2)) is that writes (and reads) are
atomic. That means for instance that if two writes covering the same part
of disk are issued at about the same time (call them A and B), it looks
like either A completed then B, or B completed then A. Thus if they say
overlap two sectors, those two sectors have data wholely from write A or
write B. We don't permit the case where part of the overlap is from one
write and part from the other.

Take care,

Bill