upvote
Check out the scheduler documentation that Apple has in the xnu repo. https://github.com/apple-oss-distributions/xnu/blob/main/doc...
reply
This is exactly what I was looking for. Thanks. Lots of technical details here for those interested.
reply
The baseline is static: low QoS tasks are dispatched to the E cores, while high QoS tasks are dispatched to P cores. IIRC high QoS cores can migrate to the E cores if all P cores are loaded, but my understanding is that the lowest QoS tasks (background) never get promoted to P cores.
reply
How is the QoS communicated to the scheduler? Is there a mark on the binary or does the code do it at thread startup?
reply
The Apple software stack makes heavy use of thread pools via libdispatch. Individual work items are tagged with QoS, which influences which thread picks up the work item from the queue.
reply
It’s done in code.
reply
deleted
reply
The article mentions P or E is generally decided by if it's a "background" process (whatever than means). Possible some (undocumented) designation in code or directive to the compiler of the binary decides this at compile time.
reply