ARM: cpu topology: Enable ARCH_POWER
 Define vm.swappiness according to zram and frontswap (zswap) definition.
mpokwsths authored
dynamic read-ahead from CG
 staging: Add Snappy compression library (v3)

Google's Snappy data compression library is a faster alternative to LZO,
optimized for x86-64. On compressible input it compresses ~2.5x faster than LZO
and decompresses ~1.5-2x faster than LZO. On incompressible input, it skips the
input at 100x faster than LZO and decompresses ~4x faster than LZO.
It is released under BSD license.
This is a kernel port from user space C++ code.
The current intended use is with zram (see next patch in series).

Signed-off-by: Zeev Tarantov <zeev.tarantov@gmail.com>
Signed-off-by: Willi Ye <williye97@gmail.com>

Conflicts:
	drivers/staging/Makefile

Conflicts:
	drivers/staging/Kconfig
	drivers/staging/Makefile
mm: Rename function "reset_page_mapcount" to "page_mapcount_reset"

In order to accomodate changes from backported (from kernel 3.11) subsystems, this function needs to be renamed.
[PATCH 2/2] mm: forcely swapout when we are out of page cache

In many occasions VM tries to avoid I/O for saving the power.
But if there isn't reclaimable memory without I/O, we should do I/O
to prevent unnecessary OOM kill although we sacrifice power.

One of example is that we are out of page cache. Remained one is
only anonymous pages, for swapping out, we needs may_writepage = 1.

Reported-by: Luigi Semenzato <semenzato@google.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
ARM: implement optimized percpu variable access

From: Rob Herring <rob.herring@calxeda.com>

Use the previously unused TPIDRPRW register to store percpu offsets.
TPIDRPRW is only accessible in PL1, so it can only be used in the kernel.

This replaces 2 loads with a mrc instruction for each percpu variable
access. With hackbench, the performance improvement is 1.4% on Cortex-A9
(highbank). Taking an average of 30 runs of "hackbench -l 1000" yields:

Before: 6.2191
After: 6.1348

Will Deacon reported similar delta on v6 with 11MPCore.

The asm "memory" constraints are needed here to ensure the percpu offset
gets reloaded. Testing by Will found that this would not happen in
__schedule() which is a bit of a special case as preemption is disabled
but the execution can move cores.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Will Deacon <will.deacon@arm.com>

Conflicts:
	arch/arm/kernel/smp.c
ARM: keep __my_cpu_offset consistent with generic one

Commit 14318efb(ARM: 7587/1: implement optimized percpu variable access)
introduces arm's __my_cpu_offset to optimize percpu vaiable access,
which really works well on hackbench, but will cause __my_cpu_offset
to return garbage value before it is initialized in cpu_init() called
by setup_arch, so accessing percpu variable before setup_arch may cause
kernel hang. But generic __my_cpu_offset always returns zero before
percpu area is brought up, and won't hang kernel.

So the patch tries to clear __my_cpu_offset on boot CPU early
to avoid boot hang.

At least now percpu variable is accessed by lockdep before
setup_arch(), and enabling CONFIG_LOCK_STAT or CONFIG_DEBUG_LOCKDEP
can trigger kernel hang.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Nicolas Pitre <nico@linaro.org>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Revert "ZSMALLOC source files from Kernel 3.8"

This reverts commit 22a50e6e162579865192213bdb85f3bffb202e7a.
Revert "staging: zsmalloc: add/fix function comment"

This reverts commit ec4fd68f504e1061d14bd1a1dac2ae872261ccbb.
Revert "staging: zsmalloc: rename zspage_order with zspage_pages"

This reverts commit baa1984a91552a1b9f718707a96c1f9842b93385.
Revert "zsmalloc: use PageFlag macro instead of [set|test]_bit"

This reverts commit be8d3f296801b0a998eaf4e7b92ae0570a5aacd5.
Revert "staging: zsmalloc: fix memory leak"

This reverts commit 72412bdd0c09c32e8c728a6f2560922a2bf50fe5.
Revert "staging: zsmalloc: change ZS_MIN_ALLOC_SIZE"

This reverts commit 08b09e786823720191fca20bb8ecf34d68d03e76.
Revert "staging: zsmalloc: calculate MAX_PHYSMEM_BITS if not defined"

This reverts commit 8f5a491dce4e237871125905b58eab8840720b39.
Revert "staging: zsmalloc: add ZS_MAX_PAGES_PER_ZSPAGE"

This reverts commit f00a4b61a89c264309ed467a59380fb599936d07.
Revert "staging: zsmalloc: move object/handle masking defines"

This reverts commit ea12644cce386596e58099013c877747f845884a.
Revert "staging: zsmalloc: zsmalloc memory allocation library"

This reverts commit 5696792bec03f773e3a63e9dbede5900feb51742.
Revert "Revert "staging: introduce zsmalloc and upstream commits""

This reverts commit 15111a50eff1bcf3b92ebfa6b81d404e92ec7d23.
Revert "mm: Rename function "reset_page_mapcount" to "page_mapcount_reset""

This reverts commit 8497e22986d029fe5a88316ff3510a275652ef52.