patch-2.4.6 linux/mm/swapfile.c

Next file: linux/mm/vmscan.c
Previous file: linux/mm/swap_state.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.5/linux/mm/swapfile.c linux/mm/swapfile.c
@@ -343,6 +343,16 @@
 
 	while (1) {
 		/*
+		 * The algorithm is inefficient but seldomly used
+		 * and probably not worth fixing.
+		 *
+		 * Make sure that we aren't completely killing
+		 * interactive performance.
+		 */
+		if (current->need_resched)
+			schedule();
+			
+		/*
 		 * Find a swap page in use and read it in.
 		 */
 		swap_device_lock(si);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)