[Suspend2][ 09/13] [Suspend2] Reset kswapd_max_order after resume.

Nigel Cunningham
2006-06-27T04:43:07Z

Reset the kswapd_max_order value to zero after resume so that we don't get
a swap storm.

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

mm/vmscan.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 440a733..b6a5a0d 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1244,7 +1244,8 @@ static int kswapd(void *p)
for ( ; ; ) {
unsigned long new_order;

- try_to_freeze();
+ if (try_to_freeze())
+ pgdat->kswapd_max_order = 0;

prepare_to_wait(&pgdat->kswapd_wait, &wait, TASK_INTERRUPTIBLE);
new_order = pgdat->kswapd_max_order;