Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cpu_input_boost: Rewrite to use dual-core boosting and clean up
Previously, up to 3 CPUs could boosted at any given time; now, only 2 CPUs can be boosted. With the new logic, 2 CPUs are boosted when only 1 is online, and 1 CPU is boosted when there is more than 1 CPU online. This new logic assumes that when only 1 CPU is online, a 2nd CPU will come online shortly after due to user interaction, and that newly-onlined CPU will be boosted. If a 2nd CPU isn't enabled within the time frame of the CPU0's boost, then only CPU0 will have been boosted. If a 2nd CPU does come online within CPU0's boost time frame, then it will be boosted for the remaining time left on CPU0's boost (minus 10ms to eliminate any trivial racing between the restoration workers). Boost duration now uses a single variable exposed in sysfs. The user-set boost duration is reduced by a factor of (1 + num_online_cpus())/(3 + num_online_cpus()). In other words, when there are more CPUs online, the boost duration is shorter. Various functions and variables have been renamed for clarity, and other parts of the code have been cleaned up as well. Signed-off-by: Sultanxda <[email protected]>
- Loading branch information