Revert "Intelli memory writeback - 0 when screen ON & 500ms when screen off"

- upgrading to a different implementation

This reverts commit 5de6b3df78275eb9f1fea8a220222b60ef2d65a9.
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.

Conflicts:

	mm/page-writeback.c
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

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.
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.
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
Copy la Pasta error
mm/page-writeback.c: Minor changes