fs/dcache.c: adaptive vfs_cache_pressure on suspend / resume

low vfs_cache pressure values save battery while idle, while
a low value also causes stutter with longer up times.
Defconfig
hw_breakpoint: Use cpu_possible_mask in {reserve,release}_bp_slot()

Signed-off-by: Locasto <amperific@gmail.com>
lib: add weak clz/ctz functions

Some architectures need __c[lt]z[sd]i2() for __builtin_c[lt]z[ll] and It
causes build failure. They can be implemented using the fls()/__ffs() and
overridden by linking arch-specific versions may not be implemented yet.
This is required by "lib: add lz4 compressor module".

Reference: https://lkml.org/lkml/2013/4/18/603
Signed-off-by: Chanho Min <chanho.min@lge.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Darrick J. Wong" <djwong@us.ibm.com>
Cc: Bob Pearson <rpearson@systemfabricworks.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Herbert Xu <herbert@gondor.hengli.com.au>
Cc: Yann Collet <yann.collet.73@gmail.com>
Cc: Kyungsik Lee <kyungsik.lee@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Modified by Locasto for 3.0.xx
Signed-off-by: Locasto <amperific@gmail.com>

Conflicts:
	arch/arm/boot/compressed/piggy.xzkern
	include/linux/export.h
Tweaked dirty writeback and expire intervals for better battery life
mm/page-writeback: dirty_expire_centisecs back to 200
mm: writeback: every 500ms the writeback daemon kicks in and flushes the dirty pages into disk. Thats not very pleasant for performance and *maybe* battery. This patch disables the writeback function while the screen is on, and enables it back when the screen is off to flush all the dirty pages. In my real world usage testing I notice a slight bump in smoothness and performance while using the device.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>

Conflicts:
	mm/page-writeback.c

+ need testing ...

boype: writeback value changed to my previous setting.
dirty writeback/expire interval tweaks
...for less lag when screen is on and less wakeups when screen is off.
tweak dirty writeback

Conflicts:
	mm/page-writeback.c
page-writeback.c: subtract min_free_kbytes from dirtyable memory

When calculating amount of dirtyable memory, min_free_kbytes should be
subtracted because it is not intended for dirty pages.

Addresses http://bugs.debian.org/695182

[akpm@linux-foundation.org: fix up min_free_kbytes extern declarations]
[akpm@linux-foundation.org: fix min() warning]
Signed-off-by: Paul Szabo <psz@maths.usyd.edu.au>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
different dirty ratios behavior for screen-on / screen-off
smoothness for screen-on, relaxed values for screen-off
mm/page-writeback.c: less dirty memory with screen on
mm/page-writeback.c: adjust dirty writeback for previously introduced lower vmalloc

Ever since vmalloc=182M, all available RAM is low memory. By leaving the
dirty ratios unchanged, this resulted in a massive increase in dirtyable
memory. The new values adjust the ratios to achieve roughly the same amount of
dirtyable memory in megabytes as before.
Some changes
fs/dache.c / mm/page-writeback.c: allow modification of dirty_-values and cache_pressure despite the dynamic suspend/resume values

Conflicts:
	fs/dcache.c
	mm/page-writeback.c