cfq + io priorities
Quoted 1 line
A process has an assigned io nice level, anywhere from 0 to 20. Both of
OK, I ask THE question : why not using the normal nice level, via current->static_prio ?
This way, cdrecord would be RT even in IO, and nice -19 updatedb would have a minimal impact on the system.
Quoted 2 lines
these end values are "special" - 0 means the process is only allowed to do io if the disk is idle, and 20 means the process io is considered
So a process with ioprio == 0 can be forever starved. As it's not done this way for nice -19 tasks (unlike FreeBSD), wouldn't it be safer to give a very long deadline to ioprio == 0 requests ?
Thanks for making something I have been dreaming of for a long time :)
Guillaume
Quoted 6 lines · Guillaume Chazarain
Quoted 1 line
A process has an assigned io nice level, anywhere from 0 to 20. Both of
OK, I ask THE question : why not using the normal nice level, via
current->static_prio?
This way, cdrecord would be RT even in IO, and nice -19 updatedb would have a minimal impact on the system.
I don't want to tie io prioritites to cpu priorities, that's a design decision.
Quoted 4 lines
Quoted 2 lines
these end values are "special" - 0 means the process is only allowed to do io if the disk is idle, and 20 means the process io is considered
So a process with ioprio == 0 can be forever starved. As it's not
Yes
Quoted 2 lines
done this way for nice -19 tasks (unlike FreeBSD), wouldn't it be safer to give a very long deadline to ioprio == 0 requests ?
ioprio == 0 means idle IO. It follows from that that you can risk infinite starvation if other io is happening. Otherwise it would not be idle io :-)
CFQ doesn't assign request deadlines. That would be another way of handling starvation.
Quoted 1 line
Thanks for making something I have been dreaming of for a long time :)
Me too :)
Signature · 1 line
Jens Axboe
Hi!
Quoted 7 lines
Quoted 4 lines
OK, I ask THE question : why not using the normal nice level, via
current->static_prio?
This way, cdrecord would be RT even in IO, and nice -19 updatedb would have a minimal impact on the system.I don't want to tie io prioritites to cpu priorities, that's a design decision.
OTOH it might make sense to make "nice" command set both by default.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
these end values are "special" - 0 means the process is only allowed to do io if the disk is idle, and 20 means the process io is considered
So a process with ioprio == 0 can be forever starved. As it's not
Yes
If semaphore is held over disk io somewhere (quota code? journaling?) you have ugly possibility of priority inversion there.
Quoted 3 lines
Quoted 1 line
Thanks for making something I have been dreaming of for a long time :)
Me too :)
Yep, another thanx from me...
Signature · 2 lines
Pavel Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need...
Quoted 7 lines · Pavel Machek
Hi!
Quoted 5 lines
Quoted 4 lines
OK, I ask THE question : why not using the normal nice level, via
current->static_prio?
This way, cdrecord would be RT even in IO, and nice -19 updatedb would have a minimal impact on the system.
Quoted 5 lines
Quoted 2 lines
I don't want to tie io prioritites to cpu priorities, that's a design decision.
OTOH it might make sense to make "nice" command set both by default.
The syscall actually.
Users and developers alike, expect "nice" to mean "nice".
Having cpu_nice and io_nice too would be nice for completeness, if for some unfathomable reason someone would want to set the one and not the other.
All in my humble oppinion, of course :)
Signature · 6 lines
................................................................ : [email protected] : And I see the elder races, : :.........................: putrid forms of man : : Jakob Østergaard : See him rise and claim the earth, : : OZ9ABN : his downfall is at hand. : :.........................:............{Konkhra}...............:
Quoted 7 lines · Pavel Machek
Hi!
Quoted 5 lines
Quoted 4 lines
OK, I ask THE question : why not using the normal nice level, via
current->static_prio?
This way, cdrecord would be RT even in IO, and nice -19 updatedb would have a minimal impact on the system.
Quoted 5 lines
Quoted 2 lines
I don't want to tie io prioritites to cpu priorities, that's a design decision.
OTOH it might make sense to make "nice" command set both by default.
Yes, I can probably be talked into that.
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
these end values are "special" - 0 means the process is only allowed to do io if the disk is idle, and 20 means the process io is considered
So a process with ioprio == 0 can be forever starved. As it's not
Yes
If semaphore is held over disk io somewhere (quota code? journaling?) you have ugly possibility of priority inversion there.
Indeed yes. That's a general problem with all the io priorities though, RT io might end up waiting for nice 10 io etc. Dunno what to do about this yet...
Signature · 1 line
Jens Axboe
Hi!
Quoted 4 lines
Quoted 2 lines
OTOH it might make sense to make "nice" command set both by default.
Yes, I can probably be talked into that.
Good.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
these end values are "special" - 0 means the process is only allowed to do io if the disk is idle, and 20 means the process io is considered
So a process with ioprio == 0 can be forever starved. As it's not
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Yes
If semaphore is held over disk io somewhere (quota code? journaling?) you have ugly possibility of priority inversion there.
Indeed yes. That's a general problem with all the io priorities though, RT io might end up waiting for nice 10 io etc. Dunno what to do about this yet...
Well, traditional (== scheduler) solution is not to have idle classes and not guarantee anything about realtime classes.
At least idle class can not be used to hold important semaphore forever (even low-priority prosses receive enough time not to hold important semaphores too long)... I believe you should do the same (== get rid of idle class for now, and clearly state that realtime ones are not _guaranteed_ anything).
Pavel
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]
Quoted 7 lines · Pavel Machek
Quoted 6 lines
Quoted 2 lines
If semaphore is held over disk io somewhere (quota code? journaling?) you have ugly possibility of priority inversion there.
Indeed yes. That's a general problem with all the io priorities though, RT io might end up waiting for nice 10 io etc. Dunno what to do about this yet...
Quoted 8 lines
Well, traditional (== scheduler) solution is not to have idle classes and not guarantee anything about realtime classes.
At least idle class can not be used to hold important semaphore forever (even low-priority prosses receive enough time not to hold important semaphores too long)... I believe you should do the same (== get rid of idle class for now, and clearly state that realtime ones are not _guaranteed_ anything).
That's not doing something about it, that's giving up... I'm not giving any guarentees in the first place, just 'best effort'.
You could allow idle prio to proceed, if it holds a resource that could potentially block others.
Signature · 1 line
Jens Axboe
Hi!
Quoted 7 lines
Quoted 5 lines
At least idle class can not be used to hold important semaphore forever (even low-priority prosses receive enough time not to hold important semaphores too long)... I believe you should do the same (== get rid of idle class for now, and clearly state that realtime ones are not _guaranteed_ anything).
That's not doing something about it, that's giving up...
:-) Yes. That's what we do for scheduler, already. [And its better to give up than to have DoS security hole, right?]
Quoted 2 lines
You could allow idle prio to proceed, if it holds a resource that could potentially block others.
I guess you can't push this for 2.6. And notice that we use same solution for cpu scheduler, where solution is quite easy (with no hot-paths overhead).
Pavel
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]