"KWin basically gets priority access to the CPU whenever needed so that all input events and rendering can be done in a time efficient manner. This new policy is being done via libcap with the CAP_SYS_NICE capability."
Just to clarify some technical details, as the above (from the OP article) is not an explanation of real-time scheduling:
"priority access to the CPU" and real-time scheduling are two pairs of shoes!
While the first one is handled with the NICE value, any scheduling strategy could be applied to it. Whether the applied strategy is hardcoded or selectable is also another thing.
Real-time on the other hand means fullfillment of jobs on time (not too early and not too late).
A job (or its parent service) has to tell the RT scheduler how long it needs at max to complete, and when it needs to be repeated or by when it should have gotten all the necessary CPU time to complete.
The scheduler takes these information and the priority of all jobs and sorts and splits them according to cycle time.
This means, that a real-time job can have a low priority and fullfill its job in the target time while there might be a higher-priority job that gets much more CPU time and is served first in each cycle. And that higher-priority job might not even be run in real-time.
---
Straight on topic: I welcome the change if it means my mouse won't hang when I copy files over USB.
I just hope it doesn't add too much overhead by unnessarily using cycles while the user doesn't interact - this might increase battery power draw on laptops.
Just to clarify some technical details, as the above (from the OP article) is not an explanation of real-time scheduling:
"priority access to the CPU" and real-time scheduling are two pairs of shoes!
While the first one is handled with the NICE value, any scheduling strategy could be applied to it. Whether the applied strategy is hardcoded or selectable is also another thing.
Real-time on the other hand means fullfillment of jobs on time (not too early and not too late).
A job (or its parent service) has to tell the RT scheduler how long it needs at max to complete, and when it needs to be repeated or by when it should have gotten all the necessary CPU time to complete.
The scheduler takes these information and the priority of all jobs and sorts and splits them according to cycle time.
This means, that a real-time job can have a low priority and fullfill its job in the target time while there might be a higher-priority job that gets much more CPU time and is served first in each cycle. And that higher-priority job might not even be run in real-time.
---
Straight on topic: I welcome the change if it means my mouse won't hang when I copy files over USB.
I just hope it doesn't add too much overhead by unnessarily using cycles while the user doesn't interact - this might increase battery power draw on laptops.
Comment