lkml.org 
[lkml]   [2003]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] stop swapoff 2/3 EINTR
Sometimes you start a swapoff and, seeing how long it takes,
wish you had not: allow signal to interrupt and stop swapoff.

--- swapoff1/mm/swapfile.c Thu Apr 17 18:32:40 2003
+++ swapoff2/mm/swapfile.c Thu Apr 17 18:32:50 2003
@@ -592,6 +592,11 @@
* to swapoff for a while, then reappear - but that is rare.
*/
while ((i = find_next_to_unuse(si, i))) {
+ if (signal_pending(current)) {
+ retval = -EINTR;
+ break;
+ }
+
/*
* Get a page for the entry, using the existing swap
* cache page if there is one. Otherwise, get a clean
@@ -761,8 +766,7 @@

/*
* Make sure that we aren't completely killing
- * interactive performance. Interruptible check on
- * signal_pending() would be nice, but changes the spec?
+ * interactive performance.
*/
cond_resched();
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.022 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site