msm: hotplug: Add MSM Hotplug driver
msm: hotplug: merge with latest myfluxy N5 repo
msm: hotplug: remove lcd notifier routine
msm: hotplug: set min cpus online to two
msm: hotplug: Consider load instead of frequency for slowest cpu

--w----r-T root root 4096 2014-04-15 08:22 cpus_boosted // number of cpus onlined after touchscreen event
-rw-rwxr-- root root 4096 2014-04-15 08:22 current_load // current average load across all online cpus (percent), read only
--w----r-T root root 4096 2014-04-15 08:22 down_lock_duration // minimum interval a cpu is kept online (milliseconds)
--w----r-T root root 4096 2014-04-15 08:22 history_size // number of samples taken in consideration for avarage load across cpus (see update rate), lower means quicker/more erratic
--w----r-T root root 4096 2014-04-15 08:22 max_cpus_online // maximum number of cpus to be onlined
--w----r-T root root 4096 2014-04-15 08:22 min_cpus_online // minimum number of cpus to stay online
drwxr-xr-x root root 2014-04-15 08:22 parameters
--w------- root root 4096 2014-04-15 08:22 uevent
--w----r-T root root 4096 2014-04-15 08:22 update_rate // interval between taking samples of load across cpus (milliseconds), lower means quicker/more erratic

--w----r-T root root 4096 2014-04-15 08:22 load_levels // threshold values for each cpu to come on- or offline (<cpu n> <up threshold> <down threshold>),
values should overlap, see struct load, level 0 is obviously a dummy to make it better readable, level 1 is cpu0 but means "one cpu online" etc.

thanks a lot
@myfluxi
msm: hotplug: Revert to original thresholds
msm: hotplug: Protect load stats routine and cleanup
msm: hotplug: Fix licensing issue

I have no idea about licensing and I could care less
but this should be correct.
msm: hotplug: Cleanup probe function

After performing nicely for over a half year this
actually starts looking almost decent...

thanks
@myfluxi
Fantastic Developer
msm: hotplug: two is better than one for cpus
msm: hotplug: Add enable/disable toggle

This is mainly for debugging purposes, i.e. using mpdecision.
msm: hotplug: Handle down lock per cpu

Handling down lock per cpu is more precise. We can now distinguish
between a regular interval and a generous time online after the last
input event, where it's likely that the user will interact with the
UI within then next few seconds again.
msm: hotplug: Remove unused include
msm: hotplug: Honor enabled toggle

Start workqueue only if enabled. Also queue remove down
lock work on cpu0, circumvent regular cpu down routine
when disabling hotplug work and remove complete nonsense
in store_min_cpus_online().
msm: hotplug: set min cpu to 1, add fb notifier

Thanks a lot:
@myfluxi
@dorimanx
msm: hotplug: Terminate load thresh table
msm: hotplug: Consider projected load after cpu offlined

Don't offline a cpu if we would drop under the lower
level's up threshold load. Also, add an optional hard
threshold load under which a cpu is never offlined.
Both is especially important for very short forced
online intervals.
msm: hotplug: set min cpu to 2, boost 3
msm: hotplug: Optimize latencies

Before this patch it took the algorithm too long to
react on sudden load spikes, although only noticable
in benchmarks. We would cycle 5-6 times until the
buffer average was finally high enough to trigger a
new target.  Improve latencies by instantly onlining
all cpus if current load on any cpu is above a certain
threshold.

fast_lane_load should not be higher than 78 as load
per cpu won't be above this value in our metric.

First cycle in hackbench
Before: 1.253sec
After: 0.796sec
msm: hotplug: Refactor load calculation

* Move core load calculations to this file and optimize.
* Calculate load based on current policy->max, not cpuinfo.max_freq
  which explains the strange 78% maximum load value before.
* Recalculate thresholds and fast_lane_load accordingly.
* Cleanup some ambiguous namings and other minor stuff.
* EXPORT_SYMBOL_* is useless for static functions.

Thanks
@myfluxi