cpufreq: interactive: Allow go_hispeed to be disabled

Specify 0 for go_hispeed_load to disable it.

Change-Id: I4ea0f0e593a195bebceaa2a3d826cdf533aeb101
cpufreq: interactive: Add check_fast mode to raise freqs faster

It takes too long to scale from min_freq to max_freq. If you ignore
go_hispeed, then it takes over 100ms to step up through all the
frequencies. Even with go_hispeed, I think I figured it was 90ms to go
from idle to max speed.

The core of the problem is that a cpu_load << 100% is meaningful for
scaling.  As that load approaches 100% though, this estimate becomes
meaningless.

Here "meaningful" means that the speed adjusted load is a good approximation
of the total processing work needed and therefore good for estimating the
target frequency.

At 100% it is not meaningful because either it is a perfect estimate (had
we been running faster there is no more work we would have done) or off by
a factor of max_freq/min_freq in the worst case.

This patch recognizes this case and scales more aggressively.  At the same
time it also re-estimates in a shorter time to correct over/under scaling.

Signed-off-by: Dan Trifan <jimsth@gmail.com>
cpufreq: interactive: Disable idle notifier

Instead, just always poll using the timer.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
cpufreq: interactive: Best of all worlds

* We already have optimizations bt different pro
  developers. This patch just stitches all together.
* Needs to be tested. DO NOT MERGE without userspace
  changes.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
hammerhead: Rewrite memory reservation

* Get rid of membanks.
* Move to proper address.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
crypto: lzo - try kmalloc() before vmalloc()

zswap allocates one LZO context per online cpu.

Using vmalloc() for small (16KB) memory areas has drawback of slowing
down /proc/vmallocinfo and /proc/meminfo reads, TLB pressure and poor
NUMA locality, as default NUMA policy at boot time is to interleave
pages :

edumazet:~# grep lzo /proc/vmallocinfo | head -4
0xffffc90006062000-0xffffc90006067000   20480 lzo_init+0x1b/0x30 pages=4 vmalloc N0=2 N1=2
0xffffc90006067000-0xffffc9000606c000   20480 lzo_init+0x1b/0x30 pages=4 vmalloc N0=2 N1=2
0xffffc9000606c000-0xffffc90006071000   20480 lzo_init+0x1b/0x30 pages=4 vmalloc N0=2 N1=2
0xffffc90006071000-0xffffc90006076000   20480 lzo_init+0x1b/0x30 pages=4 vmalloc N0=2 N1=2

This patch tries a regular kmalloc() and fallback to vmalloc in case
memory is too fragmented.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
Linux 3.4.103

This is the 3.4.103 stable release

Signed-off-by: Dan Trifan <jimsth@gmail.com>