Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Spin up N threads with single core affinities where N = total cores.

If anything, the OS should have an API to tell you this info in advance.



This won't work in the presence of CPU hotplug (which Android uses for power management), because some of the CPUs might not be online when you do it.

The API for "tell me this info" is "read the CTR_EL0 register"; it's a hardware bug that it doesn't do the right thing on this particular chip.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: