scheduler: compute time-average nr_running per run-queue

Compute the time-average number of running tasks per run-queue for a
trailing window of a fixed time period. The detla add/sub to the
average value is weighted by the amount of time per nr_running value
relative to the total measurement period.

Change-Id: I4b1fa8fee82a549889560ceded4b94bdb811671d
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/108070
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ryan Wong <ryanw@nvidia.com>
Tested-by: Ryan Wong <ryanw@nvidia.com>
scheduler: Re-compute time-average nr_running on read

Re-compute time-average nr_running when it is read. This would
prevent reading stalled average value if there were no run-queue
changes for a long time. New average value is returned to the reader,
but not stored to avoid concurrent writes. Light-weight sequential
counter synchronization is used to assure data consistency for
re-computing average.

Change-Id: I08de26087414d6663633c723ddfcbf1099a01ce2
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/108072
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ryan Wong <ryanw@nvidia.com>
Tested-by: Ryan Wong <ryanw@nvidia.com>
cpufreq: freq_table: Backport 8770f9f9171e869cf6398d1af3fa1231badbbc9e

Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
Revert "msm: clock-8960: Use known delay lpj"

This reverts commit 9956a76bfaf0669eba36514e433a2cf6b4a17114.

Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
ghost: Kill most debugging by now

Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
Makefile: Add another graphite flag

Honestly, I don't know whether -fgraphite is an actual flag. Just put both flags in case.

Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>