3 ms·
Maybe I'm not understanding the explanation, but how is a policy of "never wake up an idle core if another core is running code" different from "only ever allow
by teraflop 2y ago
Maybe I'm not understanding the explanation, but how is a policy of "never wake up an idle core if another core is running code" different from "only ever allow one core at a time to be awake"?
The latter could be achieved much more easily without custom code, e.g. by using the cpuset cgroup controller to pin everything to CPU 0.
- fermuch 2y agoI think the idea is something like "let things run normally until they don't need that extra core. If it doesn't need the core, we shut it down. And it never wakes up" Which... Makes it hard for the user to notice the change? Cores will naturally go offline, but performance stays the same while you still use it. I think this is just a demo of what you can do with user space scheduling and shouldn't be taken seriously...
- andrewaylett 2y agoMy reading is that it doesn't actually affect waking up of cores that have actually gone idle -- what it does is avoid not idling a core because there's more work.
- foota 2y agoI think there's some other mechanisms that wake CPUs? This is just saying, if something decided to idle the CPU, don't wake it just because there are tasks waiting to run (let something else decide to wake it). E.g., if the system is overloaded for some period of time maybe it will wake a cpu in response to that, but a short burst in tasks won't result in waking up all the CPUs.
- fwlr 2y agoUnsure on correct terminology but the comments in the implementation seem to imply that there are multiple CPUs per core (or perhaps multiple cores per CPU?), and the overall goal seems to be to ideally use just one of the members of each group, rather than spreading the load throughout the group. All that `low_power` seems to do is prevent members from being kicked out of ‘idle’ while another in their group is ‘not idle’. This ‘idle’ state seems to be more of a guideline than the final decision, I believe if there is enough work to be done that it will get sent to ‘idle’ members. The best analogy might be: three guys are dozing on the couch (the idle state), while the fourth guy is either doing chores (the active state) or else standing around generally being awake (the ready state). As long as the total amount of work doesn’t pile up past the awake guy’s capacity, he will let the others keep sleeping.