mm: vmscan: If kswapd has been running too long, allow it to sleep

Under constant allocation pressure, kswapd can be in the situation where
sleeping_prematurely() will always return true even if kswapd has been
running a long time. Check if kswapd needs to be scheduled.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Paul Reioux <reioux@gmail.com>
block/bfq-iosched.c: GCC 4.8.x compatibility fixup

Signed-off-by: Paul Reioux <reioux@gmail.com>
initial s2w dt2w code import from @showp1984

need to test how this acts on msm8960 :)

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:

	drivers/input/touchscreen/Kconfig
	drivers/input/touchscreen/Makefile