News for hackers. Stuff that matters.
Re:How macOS manages M1 CPU cores by ninkendo on Monday April 25, 2022 @06:50AM (#31152786)
> How do Chrome and Firefox (and Safari I suppose) give their worker processes P-cores while users are interacting with the browser window process?

Generally if a UI process makes IPC calls out to a daemon or other process, the Mach kernel is supposed to keep track of prioritization and an on-behalf-of relationship for the daemon. That is, if the kernel already thinks the foreground app is P-core eligible, any work it initiates in other processes via IPC should be P-core eligible as well, through a “voucher” object that is passed between processes: https://opensource.apple.com/source/xnu/xnu-3789.41.3/osfmk/...

I’m not sure the mechanism you’re using to put video playback out-of-process, but if there’s any IPC calls involved, make sure they’re originating from a UI task, and not the other way around? Hopefully this gives you something to go on.

Re:How macOS manages M1 CPU cores by nyanpasu64 on Monday April 25, 2022 @07:06AM (#31152883)
Frames are passed through a Unix pipeline (to stdin rather than a named pipe). What's a UI task?
Re:How macOS manages M1 CPU cores by conradev on Monday April 25, 2022 @10:22AM (#31155224)
Is the python process a direct child of the UI process?
Re:How macOS manages M1 CPU cores by nyanpasu64 on Monday April 25, 2022 @08:03PM (#31162460)
The Python thread shares a process with the GUI thread. It actually pipes data to a ffmpeg process in between, to mix video frames and audio into a NUT stream, which gets piped to the ffplay GUI process. IIRC both processes are created by Python, but we only pipe data directly into ffmpeg.