From: p...@goof.com (Marc Lehmann) Subject: Linux behaviour in low memory situations. Date: 1998/07/19 Message-ID: <19980719213937.08230@cerebro.laendle>#1/1 X-Deja-AN: 372961322 Approved: g...@greenie.muc.de Sender: muc.de!l-linux-kernel-owner Newsgroups: muc.lists.linux-kernel I can remember sometime in the 80's or 90's (2.1.8x/9x), linux just killed a more-or-less random process when there was no memory left. That, while sometimes sub-optimal (the X-server), saved me from a long filesystem check. All the newer kernels, though, just _stop_ (not even sysrq works) without an oops, when there is no memory left (all 2.1.10x for example). Increasing sys/vm/freepages does not help at all.. Will that be 2.2??? Just an observation ;) -----==- | ----==-- _ | ---==---(_)__ __ ____ __ Marc Lehmann +-- --==---/ / _ \/ // /\ \/ / p...@goof.com |e| -=====/_/_//_/\_,_/ /_/\_\ --+ The choice of a GNU generation | | - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
From: torva...@transmeta.com (Linus Torvalds) Subject: Re: Linux behaviour in low memory situations. Date: 1998/07/19 Message-ID: <6otl20$ke6$1@palladium.transmeta.com>#1/1 X-Deja-AN: 372965637 Approved: g...@greenie.muc.de Sender: muc.de!l-linux-kernel-owner References: <19980719213937.08230@cerebro.laendle> Organization: Transmeta Corporation, Santa Clara, CA Newsgroups: muc.lists.linux-kernel In article <19980719213937.08...@cerebro.laendle>, Marc Lehmann <p...@goof.com> wrote: >I can remember sometime in the 80's or 90's (2.1.8x/9x), linux just killed a >more-or-less random process when there was no memory left. That, while >sometimes sub-optimal (the X-server), saved me from a long filesystem check. > >All the newer kernels, though, just _stop_ (not even sysrq works) without an >oops, when there is no memory left (all 2.1.10x for example). Increasing >sys/vm/freepages does not help at all.. Please tell me more about what you're doing.. I certainly see different behaviour (but again, because of mm changes in 2.1.109, please use that and tell me how you make it stop, along with info on what kind of swap situation you have etc). Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
From: arcang...@mbox.queen.it (Andrea Arcangeli) Subject: Re: Linux behaviour in low memory situations. Date: 1998/07/19 Message-ID: <Pine.LNX.3.96.980720003916.341B-100000@dragon.bogus>#1/1 X-Deja-AN: 373002385 Approved: g...@greenie.muc.de Sender: muc.de!l-linux-kernel-owner References: <6otl20$ke6$1@palladium.transmeta.com> Reply-To: Andrea Arcangeli <arcang...@mbox.queen.it> Newsgroups: muc.lists.linux-kernel On 19 Jul 1998, Linus Torvalds wrote: >behaviour (but again, because of mm changes in 2.1.109, please use that I just tried yesterday and 2.1.109 seems to handle the out of memory right (sure it don' t deadlock). Andrea[s] Arcangeli - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
From: torva...@transmeta.com (Linus Torvalds) Subject: Re: Linux behaviour in low memory situations. Date: 1998/07/20 Message-ID: <Pine.LNX.3.96.980719200201.19671B-100000@penguin.transmeta.com>#1/1 X-Deja-AN: 373052245 Approved: g...@greenie.muc.de Sender: muc.de!l-linux-kernel-owner References: <Pine.LNX.3.96.980720003916.341B-100000@dragon.bogus> Newsgroups: muc.lists.linux-kernel On Mon, 20 Jul 1998, Andrea Arcangeli wrote: > On 19 Jul 1998, Linus Torvalds wrote: > > >behaviour (but again, because of mm changes in 2.1.109, please use that > > I just tried yesterday and 2.1.109 seems to handle the out of memory > right (sure it don' t deadlock). It does the right thing for me too. BUT. There may be cicrumstances where it doesn't do the right thing. I haven't tested swapfiles (as opposed to swap partitions) in a long time, for example, and there may be other usage patterns that trigger problems. 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. This is certainly the right time to test and complain.. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
From: ko...@jagunet.com (John Kodis) Subject: Re: Linux behaviour in low memory situations. Date: 1998/07/20 Message-ID: <19980720075346.A772@jagunet.com>#1/1 X-Deja-AN: 373136509 Approved: g...@greenie.muc.de Sender: muc.de!l-linux-kernel-owner References: <Pine.LNX.3.96.980720003916.341B-100000@dragon.bogus> Reply-To: ko...@jagunet.com Newsgroups: muc.lists.linux-kernel On Sun, Jul 19, 1998 at 08:03:50PM -0700, Linus Torvalds wrote: > This is certainly the right time to test and complain.. Well, since you asked for it... I've had 2.1.109 freeze up solid 3 times yesterday, usually after running for an hour or so. No response to Sysreq, nothing in the logs, nothing special happening at the time. On the same hardware 2.0.32 has never done this. Sorry there's not more to report. AMD K6, 32M, FIC MB w/ VP2 chipset; IDE disk, floptical, CD; PAS16, PCI-NE2K. -- John Kodis. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
From: arcang...@mbox.queen.it (Andrea Arcangeli) Subject: Re: Linux behaviour in low memory situations. Date: 1998/07/20 Message-ID: <Pine.LNX.3.96.980720140018.285E-100000@dragon.bogus>#1/1 X-Deja-AN: 373146867 Approved: g...@greenie.muc.de Sender: muc.de!l-linux-kernel-owner References: <Pine.LNX.3.96.980719200201.19671B-100000@penguin.transmeta.com> Newsgroups: muc.lists.linux-kernel 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 majord...@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
From: arcang...@mbox.queen.it (Andrea Arcangeli) Subject: Re: Linux behaviour in low memory situations. Date: 1998/07/20 Message-ID: <Pine.LNX.3.96.980720144502.602B-100000@dragon.bogus>#1/1 X-Deja-AN: 373151322 Approved: g...@greenie.muc.de Sender: muc.de!l-linux-kernel-owner References: <19980720075346.A772@jagunet.com> Newsgroups: muc.lists.linux-kernel On Mon, 20 Jul 1998, John Kodis wrote: >On Sun, Jul 19, 1998 at 08:03:50PM -0700, Linus Torvalds wrote: > >> This is certainly the right time to test and complain.. > >Well, since you asked for it... > >I've had 2.1.109 freeze up solid 3 times yesterday, usually after >running for an hour or so. No response to Sysreq, nothing in the >logs, nothing special happening at the time. On the same hardware >2.0.32 has never done this. Sorry there's not more to report. You should report thing like this all the time. Grab my latest patch-ikd: ftp://e-mind.com/pub/linux/kernel-patches against 109, and set in the menuconfig kerneldebug->kerneldebug->print eip. Then recompile after a dep clean and boot the new kernel. Now you must run on console and when the kernel will lock you must write by hand all the numbers in the two boxes on the screen and send me the numbers + System.map. Andrea[s] Arcangeli - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
From: p...@goof.com (Marc Lehmann) Subject: Re: Linux behaviour in low memory situations. Date: 1998/07/20 Message-ID: <19980721012554.12964@cerebro.laendle>#1/1 X-Deja-AN: 373349482 Approved: g...@greenie.muc.de Sender: muc.de!l-linux-kernel-owner References: <no.id> Newsgroups: muc.lists.linux-kernel On Sun, Jul 19, 1998 at 08:30:56PM +0000, Linus Torvalds wrote: > In article <19980719213937.08...@cerebro.laendle>, > >All the newer kernels, though, just _stop_ (not even sysrq works) without an > >oops, when there is no memory left (all 2.1.10x for example). Increasing > >sys/vm/freepages does not help at all.. > > Please tell me more about what you're doing.. I certainly see different my machine is a 192MB dual-P-II. I either use no swap, or a dedictaed 64MB swap partition. The behaviour in low-memory situations (this is, I really stress the machine with some netscapesis (roughly) as follows: aprx. kernel version with swap no swap 2.1.9x swap heavy for a while, immediately kill a process then just seems to stop 2.1.10x swap heavy for a while, just stop. then just seems to stop I can reproduce this exactly by simply recompiling a (very large) c++ file (for which the compiler needs around 200MB VM). with swap enabled, linux sometimes survives after really heavy swapping, but not when I start netscape in parallel. In the cases where swap is enabled, the computer does not seem to really stop, it just pauses with disk activity for extended periods (minutes), and I do never wait for longer than half an hour (this is the fsck vs. swap tradeoff ;) I got the idea of turning off swap when I found out that immediatelly killing some process was more effective than swapping for ten minutes, then stopping, then rebotting and fsck'ing. Just for fun, I ran this test again from the console (without swap), and the computer (almost) locked up, the console didn't react to pressing return, but numlock worked. After pressing SysRq-S, I got: SysRq: Emergency Sync and the machine did NOT sync any drives and locked up hard (not even numlock or SysRq-B worked). Also, 2.1.109 (only) performance is very bad once memory has been used by the buffer cache (I mean, free memory is around 9M), as if reclaiming buffers took much time. Also, a simple find /var/spool/news (on at least 2.1.108 & 109) gives me a real 386 feeling. The window manager isn't able to redraw windows within a second, the mouse cursor motion is very sluggish (the x server runs as a realtime process), and this is on a _dual_ P-II system. So, in general, 2.1.10x is very fast (compared to 2.0), when in good condition, but as soon as memory gets even remotely tight (or I start find), it gets almost unusable. The 2.1.9x kernels were _much_ more usable for me. -----==- | ----==-- _ | ---==---(_)__ __ ____ __ Marc Lehmann +-- --==---/ / _ \/ // /\ \/ / p...@goof.com |e| -=====/_/_//_/\_,_/ /_/\_\ --+ The choice of a GNU generation | | - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html