[PATCH] [9/48] Suspend2 2.1.9.8 for 2.6.12: 354-disable-mce-checking-during-suspend-avoid-smp-deadlock.patch

Nigel Cunningham
2005-07-06T02:22:02Z

diff -ruNp 360-reset-kswapd-max-order-after-resume.patch-old/mm/vmscan.c 360-reset-kswapd-max-order-after-resume.patch-new/mm/vmscan.c
--- 360-reset-kswapd-max-order-after-resume.patch-old/mm/vmscan.c 2005-07-06 11:18:05.000000000 +1000
+++ 360-reset-kswapd-max-order-after-resume.patch-new/mm/vmscan.c 2005-07-04 23:14:20.000000000 +1000
@@ -1228,8 +1228,10 @@ static int kswapd(void *p)
order = 0;
for ( ; ; ) {
unsigned long new_order;
-
- try_to_freeze();
+ if (freezing(current)) {
+ try_to_freeze();
+ pgdat->kswapd_max_order = 0;
+ }

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