Message415596
> For example, using a priority policy that actually uses QOS attribute :)
How would that look?
The QOS class is already a high level interface that affects a number of low-level polices. The classes are comprehensively documented in sys/qos.h.
In short (my rephrasing and summary of the documentation in sys/qos.h):
* QOS_CLASS_INTERACTIVE
This QOS class indicates that the work on the thread is interactive with the user.
* QOS_CLASS_USER_INITIATED
This QOS class indicates that work was initiated by the user and the user is likely
waiting for the result.
* QOS_CLASS_DEFAULT
Default QOS class.
* QOS_CLASS_UTILITY
This QOS class indicates that work may or may not be initiated by the user and the
user is unlikely to be waiting for the result.
* QOS_CLASS_BACKGROUND
This QOS class indicates that the work on this thread was not initiated by the user,
and the user is not waiting for a result.
Having a python policy object instead of these fixed classes might be more flexible, but tuning those is anything but trivial and exposing such a low-level interface directly to users would likely be too complex for most use cases. I'd be more interested in trying to implement the same interface on other platforms using the low-level APIs for those platforms (but won't do that, all my linux code is running on servers and uses tooling enternal to the application to control resource usage).
The biggest problem with these predefined classes is that they are pretty much targeted toward end-user systems and not servers, but that's the target of macOS anyway.
BTW. I'm working on a PR. |
|
Date |
User |
Action |
Args |
2022-03-20 09:09:12 | ronaldoussoren | set | recipients:
+ ronaldoussoren, ned.deily, corona10 |
2022-03-20 09:09:12 | ronaldoussoren | set | messageid: <1647767352.04.0.885977213788.issue47064@roundup.psfhosted.org> |
2022-03-20 09:09:12 | ronaldoussoren | link | issue47064 messages |
2022-03-20 09:09:11 | ronaldoussoren | create | |
|