This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients ned.deily, ronaldoussoren
Date 2022-03-19.09:57:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647683846.62.0.6728584749.issue47064@roundup.psfhosted.org>
In-reply-to
Content
Arm based Mac systems have several types of cores: performance cores and efficiency cores.  The system has no way to directly specify which core a particular proces or thread uses, but programs can use an API for setting the QOS class of a thread that will influence which type of core a proces is scheduled on.

The primary use case for this would be to select a lower QOS class for background tasks to ensure that those minimally impact interactive code.

It would be nice to expose this functionality in Python.


One way to do this is to expose two or three new APIs:

0. Expose an enum.IntEnum on macOS for the various QOS classes

1. An API for setting the QOS class of a particular thread (which could also be used to change that class for the main thread), for example a read/write property ``threading.Thread.qos_class``

2. A new keyword argument ``qos_class`` to ``threading.Thread.__init__()``

3. Optional: an API for setting changing the default value for that new keyword argument

The new API would only exist on macOS.

One consideration: This is a platform specific option, in my limited research I haven't found an easy way to accomplish similar results on Linux or Windows.

Background information: https://developer.apple.com/documentation/apple-silicon/tuning-your-code-s-performance-for-apple-silicon
History
Date User Action Args
2022-03-19 09:57:26ronaldoussorensetrecipients: + ronaldoussoren, ned.deily
2022-03-19 09:57:26ronaldoussorensetmessageid: <1647683846.62.0.6728584749.issue47064@roundup.psfhosted.org>
2022-03-19 09:57:26ronaldoussorenlinkissue47064 messages
2022-03-19 09:57:26ronaldoussorencreate