patch-2.3.99-pre8 linux/mm/vmscan.c

Next file: linux/net/ipv4/netfilter/ip_nat_rule.c
Previous file: linux/mm/swapfile.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre7/linux/mm/vmscan.c linux/mm/vmscan.c
@@ -542,14 +542,12 @@
 					continue;
 				something_to_do = 1;
 				do_try_to_free_pages(GFP_KSWAPD);
-				if (tsk->need_resched)
-					schedule();
 			}
 			run_task_queue(&tq_disk);
 			pgdat = pgdat->node_next;
 		} while (pgdat);
 
-		if (!something_to_do) {
+		if (tsk->need_resched || !something_to_do) {
 			tsk->state = TASK_INTERRUPTIBLE;
 			interruptible_sleep_on(&kswapd_wait);
 		}

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen (who was at: [email protected])