aries: enable memory group

Required for optimal functionality of ZRAM

http://source.android.com/devices/low-ram.html

Change-Id: I6dd7b4313cfc02ecfd0c487f0cfcef4ad11001c1
aries: add extra free kbytes tunable

Add a userspace visible knob to tell the VM to keep an extra amount
of memory free, by increasing the gap between each zone's min and
low watermarks.

This is useful for realtime applications that call system
calls and have a bound on the number of allocations that happen
in any short time period.  In this application, extra_free_kbytes
would be left at an amount equal to or larger than than the
maximum number of allocations that happen in any burst.

It may also be useful to reduce the memory use of virtual
machines (temporarily?), in a way that does not cause memory
fragmentation like ballooning does.

[ccross]
Revived for use on old kernels where no other solution exists.
The tunable will be removed on kernels that do better at avoiding
direct reclaim.

Change-Id: I765a42be8e964bfd3e2886d1ca85a29d60c3bb3e
Signed-off-by: Rik van Riel<riel@redhat.com>
Signed-off-by: Colin Cross <ccross@android.com>
aries: update max8998 multifunction device driver

1. left voltages and cpu frequencies controls to cpufreq driver.
2. reduce diferences between aries and p1 families.
3. improve performance (speed is back).
4. no SoD

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ifa7f2ebe042a8340494e7ced742b420cc7dbe2d7
aries: cpufreq: increase cpu info transition latency

1. increase from 50000 to 100000 (1us)
2. silent warnings during compilation

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ie2ed24f93ba89bfb317f6ae40262a494e8d46205
OmniROM: update environment

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ie6f7c33b8b71d15651145d0663fc38e0fd772012
S5PC11X: JPEG: add ioctl to export memory configuration

This allows userspace libs3cjpeg to read memory configuration
from the kernel instead of using the hardcoded value.

Change-Id: I61248d659dbccf2e6cc656adc7fdf18773c2fcbd
aries: optimize JPEG memory configuration

Only 1MB is required for encoding of VGA JPEG images (used by FFC).
Note that thumbnail encoding function is not used.

Requires userspace change (http://review.cyanogenmod.org/56795).

Change-Id: Icea2fc74dfc692d98ae041b785238d6b847c4ddd
lib/lzo: Rename lzo1x_decompress.c to lzo1x_decompress_safe.c

Rename the source file to match the function name and thereby
also make room for a possible future even slightly faster
"non-safe" decompressor version.

Change-Id: I482ee415d43c5aaa77d34946ae1fa0af5465b007
Signed-off-by: Markus F.X.J. Oberhumer <markus@oberhumer.com>
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.

Change-Id: Ifcde45460c856644097bdeb612f0d68c6429f03c
Signed-off-by: Markus F.X.J. Oberhumer <markus@oberhumer.com>
lib/lzo: huge LZO decompression speedup on ARM by using unaligned access

Change-Id: I4dc172b2822504c3f2db1913ed9404e031861d55
Signed-off-by: Markus F.X.J. Oberhumer <markus@oberhumer.com>
ARM: kconfig: select HAVE_EFFICIENT_UNALIGNED_ACCESS for CPUv6+ && MMU

Modern ARM CPUs can perform efficient unaligned memory accesses in
hardware and this feature is relied up on by code such as the dcache
word-at-a-time name hashing.

[pawitp: adapt to kernel 3.0]

Change-Id: I41559fc9255229e2601f4bef28aa8d48246156b7
Signed-off-by: Will Deacon <will.deacon@arm.com>
mm: remove compressed copy from zram in-memory

Swap subsystem does lazy swap slot free with expecting the page would be
swapped out again so we can avoid unnecessary write.

But the problem in in-memory swap(ex, zram) is that it consumes memory
space until vm_swap_full(ie, used half of all of swap device) condition
meet.  It could be bad if we use multiple swap device, small in-memory
swap and big storage swap or in-memory swap alone.

This patch makes swap subsystem free swap slot as soon as swap-read is
completed and make the swapcache page dirty so the page should be
written out the swap device to reclaim it.  It means we never lose it.

I tested this patch with kernel compile workload.

1. before

   compile time : 9882.42
   zram max wasted space by fragmentation: 13471881 byte
   memory space consumed by zram: 174227456 byte
   the number of slot free notify: 206684

2. after

   compile time : 9653.90
   zram max wasted space by fragmentation: 11805932 byte
   memory space consumed by zram: 154001408 byte
   the number of slot free notify: 426972

[akpm@linux-foundation.org: tweak comment text]
[artem.savkov@gmail.com: fix BUG due to non-swapcache pages in end_swap_bio_read()]
[akpm@linux-foundation.org: invert unlikely() test, augment comment, 80-col cleanup]
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Artem Savkov <artem.savkov@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Konrad Rzeszutek Wilk <konrad@darnok.org>
Cc: Shaohua Li <shli@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Conflicts:
	mm/page_io.c

Change-Id: I8f11fb7f0391954435002e7f290352f311c907d4
aries: add omni bootsplash

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I0178ed81ab8a266fe10477b28fdb6a5865ec606c
drivers: misc: update fsa9480 i2c driver power management

Actually this driver is using a legacy power management.
So, let's update it.

<4>[    2.576457] i2c-core: driver [fsa9480] using legacy suspend method
<4>[    2.576647] i2c-core: driver [fsa9480] using legacy resume method

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ic15a453e38ae37788a5b4bfe57b8f0440f28206a
drivers: input: misc: bma023: set correct ioctl pointer

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ic2da59494e311bbeb56ace70d9c5b01517168752
drivers: input: misc: bma023: fix gcc warnings

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ie0f47e7291eac3e336600c8cb9682a6fa1b14030
drivers: input: misc: yas529: update power management

<4>[    4.705498] i2c-core: driver [yas529] using legacy suspend method
<4>[    4.705695] i2c-core: driver [yas529] using legacy resume method

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I0453e913542a97292ccb6e625f4c9f446a364ea3
drivers: media: radio: si4709: set correct ioctl pointer

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ibe86aab415e21d6f1d458904e9c1c36dcafaa443
drivers: media: radio: si4709: update power management

<4>[    4.722171] i2c-core: driver [Si4709] using legacy suspend method
<4>[    4.722351] i2c-core: driver [Si4709] using legacy resume method

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I5e4a92bed7bb53f351985b9ef6c97ff7967e6de3
drivers: media: video: samsung: tv20: update ddc power management

<4>[    4.715451] i2c-core: driver [s5p_ddc] using legacy suspend method
<4>[    4.715643] i2c-core: driver [s5p_ddc] using legacy resume method

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ib9ddcef3f51ce7de6ff16431c3a445c2f7a8d543