kernel: make an exception in module loading to load proprietary modules (by gokhanmoral)
lib/string: use glibc version

the performance of memcpy and memmove of the general version is very
inefficient, this patch improved them.

Signed-off-by: Miao Xie <miaox*******>
adapted by faux123 for 3.0.13 kernel

Signed-off-by: Curtis Menard <curtis.menard@gmail.com>
lib/memcopy: use glibc version

the kernel's memcpy and memmove is very inefficient. But the glibc version is
quite fast, in some cases it is 10 times faster than the kernel version. So I
introduce some memory copy macros and functions of the glibc to improve the
kernel version's performance.

The strategy of the memory functions is:
1. Copy bytes until the destination pointer is aligned.
2. Copy words in unrolled loops.  If the source and destination are not
   aligned in the same way, use word memory operations, but shift and merge
   two read words before writing.
3. Copy the few remaining bytes.

Signed-off-by: Miao Xie <miaox*******>
adapted by faux123 for 3.0.13 kernel

Signed-off-by: Curtis Menard <curtis.menard@gmail.com>
Fix Errors
Add LulzactiveV2
block: Adding ROW scheduling algorithm

This patch adds the implementation of a new scheduling algorithm - ROW.
The policy of this algorithm is to prioritize READ requests over WRITE
as much as possible without starving the WRITE requests.
The requests are kept in queues according to their priority. The dispatch
is done in a Round Robin manner with a different slice for each queue.
READ request queues get bigger dispatch quantum than the write requests.

Signed-off-by: Tatyana Brokhman <tlinder@xxxxxxxxxxxxxx>
---
v4:
  - Fix bug in idling mechanism:
    -- Fix the delay passed to scedule_delayed_work
    -- Change the idle delay and idling-trigger frequency to be HZ dependent
  - Destroy idle_workqueue on queue exit
  - Update the documentation

v3:
  - Fix bug in forced dispatch: Don't idle if forced dispatch

v2:
  No changes. Resend.

v1: Initial version
block: Add SIO I/O scheduler

Signed-off-by: Andrei F <luxneb@gmail.com>
cpufreq_pegasusq: make up_threshold_at_min_freq and freq_for_responsiveness configurable
slub: set slub_max_order to 0

To avoid locking and per-cpu overhead, SLUB optimisically uses
high-order allocations up to order-3 by default and falls back to lower
allocations if they fail.

So, with the default value (slub_max_order = 3), the kernel may ask up
to 3 contigous pages for each slab. However, with a reduced amount of
memory it is not worth to try to do order-3 allocations, it adds more
overhead (shrinkers have to free more objects to release any memory) and
probably it can easily fail to success with order-3 allocations.

For this reason it is better to immediately fallback to oder-0
allocations to reduce unnecessary overhead.

Signed-off-by: Andrea Righi <andrea@betterlinux.com>
SLQB memory allocator
Added missing file to enable us to use slqb.

Signed-off-by: Sar Castillo <sar.castillo@gmail.com>
cpufreq: add voltage control interfaces
block: Add Zen I/O scheduler

Similar to SIO, primarily based on no-op and deadline. Intended to be mostly FCFS. Simpler than SIO in many ways, one of them being write requests/read requests have mostly the same priority.

Conflicts:

	block/Makefile
s6evr02: Allow max brightness at 255

Change-Id: I464de83d010702ed68759f2bde438c127811bd2e
fs/dyn_sync_cntrl: dynamic sync control

The dynamic sync control interface uses Android kernel's unique early
suspend / lat resume interface.

While screen is on, file sync is disabled
when screen is off, a file sync is called to flush all outstanding writes
and restore file sync operation as normal.

Signed-off-by: Paul Reioux <reioux@gmail.com>
pegasusq: Add flexrate capability

Ported cpufreq_ondemand_flexrate_request call compatibility to pegasusq and rewrote the main code in charge of handling the requests.

Added possibility to dismiss and cancel flexrate calls over a configurable maximum frequency.

Added hotplug sampling rate normalization during active flexrate requests; hotplug samples are delayed during accelerated governor sampling and are normalized to the usually active sampling rate.
pegasusq: Remove sysfs_duration from flexrate
mach-exynos: Don't compile unused 4210 objects on 4x12
lib/lzo: Update LZO compression to current upstream version

This commit updates the kernel LZO code to the current upsteam version
which features a significant speed improvement - benchmarking the Calgary
and Silesia test corpora typically shows a doubled performance in
both compression and decompression on modern i386/x86_64/powerpc machines.

Signed-off-by: Markus F.X.J. Oberhumer <markus@oberhumer.com>
Fix blocking allocations called very early during bootup

commit 31a67102f4762df5544bc2dfb34a931233d2a5b2 upstream.

During early boot, when the scheduler hasn't really been fully set up,
we really can't do blocking allocations because with certain (dubious)
configurations the "might_resched()" calls can actually result in
scheduling events.

We could just make such users always use GFP_ATOMIC, but quite often the
code that does the allocation isn't really aware of the fact that the
scheduler isn't up yet, and forcing that kind of random knowledge on the
initialization code is just annoying and not good for anybody.

And we actually have a the 'gfp_allowed_mask' exactly for this reason:
it's just that the kernel init sequence happens to set it to allow
blocking allocations much too early.

So move the 'gfp_allowed_mask' initialization from 'start_kernel()'
(which is some of the earliest init code, and runs with preemption
disabled for good reasons) into 'kernel_init()'.  kernel_init() is run
in the newly created thread that will become the 'init' process, as
opposed to the early startup code that runs within the context of what
will be the first idle thread.

So by the time we reach 'kernel_init()', we know that the scheduler must
be at least limping along, because we've already scheduled from the idle
thread into the init thread.

Reported-by: Steven Rostedt <rostedt@goodmis.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>