Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ebe3d638 authored by Sai Gurrappadi's avatar Sai Gurrappadi Committed by alexax66
Browse files

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: default avatarSai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/358455


Reviewed-by: default avatarWen Yi <wyi@nvidia.com>
Reviewed-by: default avatarPeter Zu <pzu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: default avatarDiwakar Tundlam <dtundlam@nvidia.com>

Original commit: https://github.com/halaszk/Perseus-halaszk-universal5433/commit/30a7e1b8dbfdea4e4275ed22a219254ad35510f2
parent 2585dd08
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment