cpuquiet: Updated balanced governor to use the runnable threads patch

The balanced governor now looks at the average number of runnable
threads when bringing cores online and offline. The balanced governor
parameters have also been updated to reflect a similar patch for
autohotplug.

Change-Id: I8dac26659ba43d95a68830c6cc268591a7f03f80
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
cpuquiet: Properly return the first registered governor

Change-Id: I8a21a15d5cf8e4c91a166810387b5d8f1dd7cdb6
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
cpuquiet: Update stats only on successful operations

Change-Id: I0584fba7458b3a860f9ab3751a8eb5f0345864ad
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
cpuquiet: Fix compiler warning

Change-Id: I03c11c295b40ebd500a715974f7fdca560d9a43a
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
ARM: cpuquiet: Go to and stay on G-CPU if min_cpus 1 is requested

Only return to LP-CPU if minimum number of cpus requested by the PM QoS
interface is at the default 0 level.

Change-Id: I1384c7fc62b86e385e10b4baaf81eb600f31da6e
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
ARM: tegra: add sysfs support for tegra cpuquiet driver

Change-Id: I215c5de8e98d139a93113978e1e27adb5a6b252c
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
cpuquiet: Account for the corner case frequency when setting state

Now consider frequency greater than or equal to idle_top_freq as UP

Change-Id: I1332d46d1e42a00b3b31897b158eaf4ccfbaf8f5
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
ARM: tegra: Remove duplicate clock inits

Change-Id: I80c384d1aa4b1e45a4542acbde6b904f4a014aff
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
ARM: tegra: cpuquiet: Notify the cpuquiet governor when the driver is busy

Added generic busy/free notifiers that the driver can invoke to let the
governor know that it cannot process further core online/offline
requests (invoked in our case whenever we switch to the LP cluster).

Change-Id: I5e3f7f28f38806a7f87050e8d0c8d2f2cf7521aa
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
ARM: tegra: cpuquiet: Fix cpuquiet notifiers

The notifiers now properly fire on every cluster switch

Change-Id: I381301cf62f25b49532326cc7759696c7f6797b7
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
cpuquiet: Enable cpuquiet by default

Enable cpuquiet by default if autohotplug is enabled. Cpuquiet will now
replace autohotplug as the hotplugging infrastructure. The down_delay in
the balanced governor has also been increased to 2s from 500ms to match
a similar patch for autohotplug.

Change-Id: I36747af67c55547b3dee95f7d435f9ebc075d393
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
cpuquiet: Runnable threads governor

[perf] The runnable threads governor only looks at the average number of
runnables in the system to make a decision when bringing cores
offline/online. First pass; tweaks thresholds and delays to reduce
decision latency to about ~50-70ms per core (from ~100-150ms per core)

Change-Id: Idd3b268a74a8f56ad3fc0e5c7f388174d1b6611f
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
cpuquiet: Add notifiers for the runnables governor

The governor stops sampling whenever the device is busy and starts its
sampling loop when the device is free.

Change-Id: I6b4dae94a60f8091d34400028a8d1f58faa51380
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>