sched: Force sleep on consecutive sched_yields
If a task sched_yields to itself continuously, force the task to sleep in sched_yield. This will lower the CPU load of this task thereby lowering the cpu frequency and improving power. Added a stat variable to track how many times we sleep due these consecutive sched_yields. Also added sysctl knobs to control the number of consecutive sched_yields before which the sleep kicks in and the duration fo the sleep in us. Bug 1424617 Change-Id: Ie92412b8b900365816e17237fcbd0aac6e9c94ce Signed-off-by:Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/358455 Reviewed-by:
Wen Yi <wyi@nvidia.com> Reviewed-by:
Peter Zu <pzu@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by:
Diwakar Tundlam <dtundlam@nvidia.com> Original commit: https://github.com/halaszk/Perseus-halaszk-universal5433/commit/30a7e1b8dbfdea4e4275ed22a219254ad35510f2
Loading
Please register or sign in to comment