Add dynamic writeback feature from 3.1

Signed-off-by: Keff <funnykeff91@gmail.com>
Prevent aliased requests from starving other I/O

Signed-off-by: Keff <funnykeff91@gmail.com>
writeback: Add a 'reason' to wb_writeback_work

Signed-off-by: Keff <funnykeff91@gmail.com>
I/O-less dirty throttling, reduce filesystem writeback

backport from 3.2, by franciscofranco

Signed-off-by: Keff <funnykeff91@gmail.com>
block: strict rq_affinity

Signed-off-by: Keff <funnykeff91@gmail.com>
drivers:staging: merge latest version of lowmemorykiller.c

Signed-off-by: Keff <funnykeff91@gmail.com>
Remove HOTPLUG_MEMORY from LMK

Signed-off-by: Keff <funnykeff91@gmail.com>
staging: android: lowmemorykiller: Add config option to support oom_a…
…dj values

The conversion to use oom_score_adj instead of the deprecated oom_adj
values breaks existing user-space code. Add a config option to convert
oom_adj values written to oom_score_adj values if they appear to be
valid oom_adj values.

Change-Id: I68308125059b802ee2991feefb07e9703bc48549
Signed-off-by: Arve Hjønnevåg <arve@android.com>
staging: android: lowmemorykiller: Don't count reserved free memory

The amount of reserved memory varies between devices. Subtract it
here to reduce the amount of devices specific tuning needed for the
minfree values.

Change-Id: I466ae8b18f5972f6f6d8b5a7d8c4ae69660de53a
Signed-off-by: Arve Hjønnevåg <arve@android.com>
staging: android: lowmemorykiller: Change default debug_level to 1

The select...to kill messages are not very useful when not debugging
the lowmemorykiller itself. After the change to check TIF_MEMDIE
instead of using a task notifer this message can also get very
noisy.

Change-Id: Ice171c25801d6faa454b885a23b24b002423b754
Signed-off-by: Arve Hjønnevåg <arve@android.com>
lowmemorykiller: set minfree and adj values directly into the arrays

.. also get rid of some unneeded checks and do some simplification.

patch from franciscofranco
tune dirty-writeback value again and some fix

Signed-off-by: Keff <funnykeff91@gmail.com>
Revert "Add frandom(/dev/frandom)"

This reverts commit 008990a80fe47d201f958b093afa4ca3465c279e.
Revert "lowmemorykiller: set minfree and adj values directly into the arrays"

Revert this as need implentation of screen of lmk later. :/
This reverts commit 063fcd42bfbbaf85d798695d8cf8d5f15b2f892c.
Add screen on/off and minfree values for lowmemorykiller

Signed-off-by: Keff <funnykeff91@gmail.com>
update defconfig

- enable lmk config

Signed-off-by: Keff <funnykeff91@gmail.com>
march armv7-a (franciscofranco)
 ARM: 7583/1: decompressor: Enable unaligned memory access

for v6 and above

Modern GCC can generate code which makes use of the CPU's native
unaligned memory access capabilities.  This is useful for the C
decompressor implementations used for unpacking compressed kernels.

This patch disables alignment faults and enables the v6 unaligned
access model on CPUs which support these features (i.e., v6 and
later), allowing full unaligned access support for C code in the
decompressor.

The decompressor C code must not be built to assume that unaligned
access works if support for v5 or older platforms is included in
the kernel.

For correct code generation, C decompressor code must always use
the get_unaligned and put_unaligned accessors when dealing with
unaligned pointers, regardless of this patch.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: hadidjapri <hadi_250493@yahoo.com>
Enable UNALIGNED_ACCESS for the new LZO algorithm to use.

LZO decrompression is used on QCACHE so we benefit a little from the new
and improved LZO code.
restore CONFIG_HZ = 300 much faster and flued.

Signed-off-by: Keff <funnykeff91@gmail.com>