pthread_setschedprio and __SCHED_CURRENT
Hi Philippe,
fortunately before we set the new ABI into stone, I just discovered flaw in my pthread_setschedparam_ex(__SCHED_CURRENT) approach for modelling pthread_setschedprio: It breaks over non-trivial policies like SCHED_QUOTA.
Userspace would have to query all current policy parameters of the target thread first in order to just update the priority in param_ex. Currently, it sends down bogus values via the setschedparam_ex call.
I could work around this by handling __SCHED_CURRENT even more special in the kernel or - which I'm leaning to ATM - introduce a real setschedprio syscall.
What do you think?
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux
Quoted 10 lines · Jan Kiszka
Hi Philippe,
fortunately before we set the new ABI into stone, I just discovered flaw in my
pthread_setschedparam_ex(__SCHED_CURRENT)approach for modellingpthread_setschedprio: It breaks over non-trivial policies likeSCHED_QUOTA.Userspace would have to query all current policy parameters of the target thread first in order to just update the priority in
param_ex. Currently, it sends down bogus values via thesetschedparam_excall.
Quoted 6 lines
I could work around this by handling
__SCHED_CURRENTeven more special in the kernel or - which I'm leaning to ATM - introduce a real setschedprio syscall.What do you think?
I would go for a new syscall too, other options may prove to be fragile at the end of the day.
Signature · 1 line
Philippe.