[PATCH] genirq: pm: Fix the enable ordering in resume
Revert "cpufreq: interactive: TARGET_LOAD 85 + HISPEED_LOAD 75"

This reverts commit cfc87cfdb202321b9ba81f7c38922eba692025a4.
Revert "cpufreq: interactive: init default values at compile time"

This reverts commit 1712e3c27539601f1bcd7f459a6d562257ed9eac.
Revert "cpufreq: interactive: default go_hispeed_load 99%, doc updates"

This reverts commit 3463569389290e76b237c427ae75cd41e0d69b9c.
Revert "cpufreq: interactive: fix race on timer restart on governor start"

This reverts commit 71b2dcdba49af7c82e1dd57a837d8ee7a40212c4.
Revert "cpufreq: interactive: fix racy timer stopping"

This reverts commit de8c43b84be5050694ceae8f43e7fb93166d76b6.
Revert "cpufreq: interactive: fix boosting logic"

This reverts commit b4b46e9cecee1b36db8568debd39e25bbc0715f9.
Revert "cpufreq: interactive: add timer slack to limit idle at speed > min"

This reverts commit 1ec399fe7e01151d4a30c8af4b1e316d5e3b207e.
Revert "cpufreq: interactive: specify duration of CPU speed boost pulse"

This reverts commit 34e9398d5e352775ad95abc954e7031280ed2625.
Revert "cpufreq: interactive: adjust load for changes in speed"

This reverts commit a0dda97cbd3681fb589590c2d33107129a8a8e0a.
Revert "cpufreq: interactive: remove load since last speed change"

This reverts commit e10ba4ae8a91fd4a1b9d474b71349c15f375e069.
cpufreq_interactiveX.c: Some Fix Li and La
tuna_ak_defconfig: Disable X Governors - Not Usefull
Kernel Version: ak.506.42.berserk
cpufreq_interactiveX.c: Tuning
I've yet to find any desktop workload that benefits from anything higher than a swappiness as low as possible. Unfortunately setting it to zero can rarely lead to unexplained stalls in the VM so use 10.

-ck
The swap token is only useful in conditions of swap thrash, and actually worsens the common case by causing more swapping. Make it only have an effect when swap is more than half full.

-ck
While it may be nice to have a copy of pages on swap once written there, the more garbage we leave in the swapspace the slower any further writes and reads to and from it are. Just free swapcache whenever we can.

-ck
When kswapd is awoken due to reclaim by a running task, set the priority of kswapd to that of the calling task thus making memory reclaim cpu activity affected by nice level.

-ck
Add a background scanning timer to restore the watermarks to the pages_lots level and only call on it if kswapd has not been called upon for the last 5 seconds. This allows us to balance all zones to the more generous pages_lots watermark at a time unrelated to page allocation thus leading to lighter levels of vm load when called upon under page allocation.

Signed-off-by: Con Kolivas <kernel@kolivas.org>

The -ck patches modify mm/vmscan.c and add a timer to wake up kswapd every 5
seconds. This timer is initialized after the creation of the kswapd thread.

The kswapd() thread function calls mod_timer at the front of its infinite
service loop (to reset the timer to 5 seconds in the future). mod_timer()
includes a BUG_ON() to assert that the timer's callback function is set.

Since the wakeup timer is initialized after the kswapd thread is created, if
kswapd gets scheduled before kswapd_run() has prepared the timer, the
BUG_ON() check will throw a stack trace and immediately terminate the kswapd
thread.

This patch modifies the kswapd_run() function in mm/vmscan.c to initialize the
watermark timer before starting the kswapd thread.

Signed-off-by: Chase Venters <chase.venters at clientec.com>

-ck