Re: [PATCH] Time sliced CFQ #2

Con Kolivas
2004-12-06T02:00:01Z

[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]

Jeff Sipek wrote:
> On Sun, Dec 05, 2004 at 07:58:45PM +0100, Jens Axboe wrote:
>
>>It should be really easy to try some rudimentary prio io support - just
>>scale the time slice based on process priority. A few lines of code
>>change, and io priority now follows process cpu scheduler priority. To
>>work really well, the code probably needs a few more limits besides just
>>slice time.
>
>
> I started working on the rudimentary io prio code, and it got me thinking...
> Why use the cpu scheduler priorities? Wouldn't it make more sense to add
> io_prio to task_struct? This way you can have a process which you know needs
> a lot of CPU but not as much io, or the other way around.

That is the design the Jens' original ioprio code used which we used in
-ck for quite a while. What myself and -ck users found, though, was that
being tied to cpu 'nice' meant that most tasks behaved pretty much as
we'd expect based on one sys call.

I think what is ideal is to have both. First the ioprio should be set to
what the cpu 'nice' level is as a sort of global "this is the priority
of this task" setting. Then it should also support changing of this
priority with a different call separate from the cpu nice. That way we
can take into account access privileges of the caller making it
impossible to set a high ioprio if the task itself is heavily niced by a
superuser and so on.

Cheers,
Con

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]