lkml.org 
[lkml]   [1998]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Linux behaviour in low memory situations.
On Sun, 19 Jul 1998, Linus Torvalds wrote:

>So I think 2.1.109 should be doing the right thing, but I'm still very
>much interested in people trying things out, because it may be that it
>does the right thing 99% of the time, but then on 1% of the machines it
>does something wrong due to a setup difference or similar.

If you have allocated more virtual memory than ram (so you _need_ the
swap) and you run swapoff -a, the machine continue to deadlock as usual
(you reminded me to try that ;-).

I developed a patch for the swapoff thing. I don' t know if this is the
right patch (probably it isn' t) but at least fix things well. The problem
was the kswapd was running all the time in FIFO scheduler. So I stopped it
before swapoff ;-).

I don' t understand where these kswapd problems came from since _all_ was
working _fine_ in 2.0.x.

Patch agains 106 (maybe apply also against 110-pre2).

--- linux/mm/swapfile.c 1998/06/15 23:53:24 1.1
+++ linux/mm/swapfile.c 1998/06/16 00:25:51
@@ -3,6 +3,8 @@
*
* Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
* Swap reorganised 29.12.95, Stephen Tweedie
+ * Stopped kswapd during try_to_unuse() to avoid deadlock
+ * after a `swapoff -a` 16 June 1998 by Andrea Arcangeli.
*/

#include <linux/mm.h>
@@ -391,7 +393,9 @@
swap_list.next = swap_list.head;
}
p->flags = SWP_USED;
+ timer_active &= ~(1<<SWAP_TIMER);
err = try_to_unuse(type);
+ timer_active |= (1<<SWAP_TIMER);
if (err) {
dput(dentry);
/* re-insert swap space back into swap_list */

Andrea[s] Arcangeli


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

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