Subject: Re: I/O priorities
To: Aidan Cully <aidan@kublai.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 06/20/2002 17:17:35
On Thu, Jun 20, 2002 at 09:15:41AM -0400, Aidan Cully wrote:
> I don't think so. Write ordering should be preserved, but if a process
> tries to schedule a write when no buffers are available to it (but
> would be available to other processes) then it would block. A process
> would need keep track of how many buffers it's using for I/O so that
> it would know to block when it's using too many. A buffer would need to
> know which process it's coming from, so that it could lower the process
> buffer count on free(), and wake the process up if necessary.
On second though, I'm not sure it's really the way to go. I can't see why
a process writing couldn't use all RAM if it's the only one writing.
We could limit the buffers size if we detect a sequencial I/O and we know the
whole file won't fit in RAM, though.
I think the idea of I/O scheduler, with an algorithm similar to the one
used for the CPU scheduler (processes doing a lot of I/O having their I/O
priority lowered) is the way to go.
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--