Date: Wed, 05 Jun 1996 15:45:11 -0700 From: "Michael L. VanLoon -- HeadCandy.com" <michaelv@HeadCandy.com> To: Gary Jennejohn <Gary.Jennejohn@munich.netsurf.de> Cc: freebsd-current@freebsd.org Subject: Re: More on VM, swap leaks Message-ID: <199606052245.PAA01595@MindBender.HeadCandy.com> In-Reply-To: Your message of Wed, 05 Jun 96 23:34:15 -0000. <199606052334.XAA13656@peedub.gj.org>
next in thread | previous in thread | raw e-mail | index | archive | help
>Greg Lehey writes: >>OK, to follow up on my last message, I rebooted my machine and tried >>to start emacs. Here's what happened (this is put together from >>displays on two different xterms): >[lots of pstat's deleted] >>So, here I am, three Emacsen later, all stopped, and I have 5 MB less >>swap than before. Can anybody else reproduce these results? >I decided to test this out. I can start both emacs and xemacs with NO >failures at all. And not one additional block of swap gets allocated. >I must in all fairness note that I already had about 16 MB of swap in >use. [...] >This is on a machine with 16 MB memory and 64 MB swap. >Looks to me like you might have a bad SIMM, Greg. Don't know about the SIGSEGV's you're (Greg) getting, but the swap stuff sounds pretty obvious to me. When you ran emacs, you pushed some processes out to swap that were previously in memory. When emacs quit, those other processes were still running, so still had those pages allocated on swap. The process you're running isn't the only process that gets to have swap pages allocated for it. This seems to be substantiated by the fact that there was a small amount of swap allocated before you started, indicating it had just barely begun to page some processes to fit everything in memory. If I'm not mistaken, generally when a process has pages allocated on swap, those don't ever get removed from swap until the process exits. So, just because you quit emacs and opened up a big memory hole where other processes could run again, doesn't mean those other process' swap pages will get deallocated. The fact that Gary already had more swap allocated probably means that when he ran emacs he probably simply forced some pages to be freed for pages that other processes already had on swap. Now, in addition to this, I believe emacs installs by default with the sticky bit set, which means it will try to keep swap pages allocated for it, even when it isn't running. I have heard people exprpess concern about swap leaks sooo many times (here, on the NetBSD lists, and on the XFree86 lists), when in reality, they just haven't thought through the less insidious explanations enough. Sure, John may have checked in a swap bug or two with his recent changes. But the behavior sounds a whole lot more like standard Unix swap behavior to me. At least, that's the way I understand it. I'm not a veteran kernel internals hacker, however... Now, the SIGSEGV's might have something to do with bad memory or cache. Or just running the clock too high for the memory or CPU. Or, it could very possible be a bug in John's code. I'm sure he has a good idea of what it could be, if it is, in fact, a bug. ----------------------------------------------------------------------------- Michael L. VanLoon michaelv@HeadCandy.com --< Free your mind and your machine -- NetBSD free un*x >-- NetBSD working ports: 386+PC, Mac 68k, Amiga, Atari 68k, HP300, Sun3, Sun4/4c/4m, DEC MIPS, DEC Alpha, PC532, VAX, MVME68k, arm32... NetBSD ports in progress: PICA, others... Roll your own Internet access -- Seattle People's Internet cooperative. If you're in the Seattle area, ask me how. -----------------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606052245.PAA01595>