Subject: Re: Virtual Memory Subsystem
To: Jukka Marin <jmarin@pyy.jmp.fi>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-i386
Date: 11/25/1996 23:55:28
>> I would have thought this would be fixed by now. I consider this a major
>> issue and reason enough to switch to another OS, and I'm sure many other
>> people think this as well.
OpenBSD has a fix. It's sub-optimal but perhaps we could use it
until a _real_ fix of the VM system is done?
>[beware of your blood pressure]
>Well, it doesn't always seem to matter what the end-users think. There are
>a few annoying misfeatures in NetBSD that (IMHO) should have been fixed on
>day #1, but haven't. This VM thing may not be fixed for another 3 years, I
>guess. I would also appreciate it if my machines didn't come to a complete
>halt when I run out of RAM.
I don't understand.
There is a fix for that in -current, and has been, I beleive, since
before 1.2 was released. I hope it goes in as an official patch for
1.2. The relevant change was from 1.23 to 1.24 of
sys/vm/vm_pageout.c. pr #2755 explains the problem.
Here's the diff:
Index: vm_pageout.c
===================================================================
RCS file: /cvsroot/src/sys/vm/vm_pageout.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- vm_pageout.c 1996/02/05 01:54:07 1.23
+++ vm_pageout.c 1996/09/18 02:04:50 1.24
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_pageout.c,v 1.23 1996/02/05 01:54:07 christos Exp $ */
+/* $NetBSD: vm_pageout.c,v 1.24 1996/09/18 02:04:50 mrg Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -70,6 +70,7 @@
#include <sys/param.h>
#include <sys/proc.h>
+#include <sys/kernel.h>
#include <vm/vm.h>
#include <vm/vm_page.h>
@@ -319,14 +320,13 @@
break;
case VM_PAGER_AGAIN:
{
- extern int lbolt;
-
/*
* FAIL on a write is interpreted to mean a resource
* shortage, so we put pause for awhile and try again.
* XXX could get stuck here.
*/
- (void) tsleep((caddr_t)&lbolt, PZERO|PCATCH, "pageout", 0);
+ (void) tsleep((caddr_t)&vm_pages_needed, PZERO|PCATCH,
+ "pageout", hz);
break;
}
case VM_PAGER_FAIL:
@@ -451,9 +451,8 @@
* XXX rethink this
*/
if (postatus == VM_PAGER_AGAIN) {
- extern int lbolt;
-
- (void) tsleep((caddr_t)&lbolt, PZERO|PCATCH, "pageout", 0);
+ (void) tsleep((caddr_t)&vm_pages_needed, PZERO|PCATCH,
+ "pageout", hz);
goto again;
} else if (postatus == VM_PAGER_BAD)
panic("vm_pageout_cluster: VM_PAGER_BAD");
>BTW, if anyone needs Cyclades or A2232 serial cards under 1.2, I have ported
>the drivers to 1.2 now. I'm sure they don't look good enough to be included
>in the tree, but they do work.
Again, I don't understand. -current has both PCI and ISA
front-end drivers for Cyclades cards.
>No flames, please - we've gone through that many times enough.
Just puzzlement. These particular shortcomings _are_ fixed in -current.
(aren't they?)