summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_fault.c
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1996-11-30 22:41:49 +0000
committerdyson <dyson@FreeBSD.org>1996-11-30 22:41:49 +0000
commit7a58275f33a773bf61557817714efe27f3611aaf (patch)
treec2414524de2607538eaf1294e5d9ee92fc65c8d6 /sys/vm/vm_fault.c
parent7c59df49d939e5f564cc78e9a17c7d2393e11420 (diff)
downloadFreeBSD-src-7a58275f33a773bf61557817714efe27f3611aaf.zip
FreeBSD-src-7a58275f33a773bf61557817714efe27f3611aaf.tar.gz
Implement a new totally dynamic (up to MAXPHYS) buffer kva allocation
scheme. Additionally, add the capability for checking for unexpected kernel page faults. The maximum amount of kva space for buffers hasn't been decreased from where it is, but it will now be possible to do so. This scheme manages the kva space similar to the buffers themselves. If there isn't enough kva space because of usage or fragementation, buffers will be reclaimed until a buffer allocation is successful. This scheme should be very resistant to fragmentation problems until/if the LFS code is fixed and uses the bogus buffer locking scheme -- but a 'fixed' LFS is not likely to use such a scheme. Now there should be NO problem allocating buffers up to MAXPHYS.
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r--sys/vm/vm_fault.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 1119c62..f395d97 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -66,7 +66,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_fault.c,v 1.56 1996/07/30 03:08:07 dyson Exp $
+ * $Id: vm_fault.c,v 1.57 1996/09/08 20:44:37 dyson Exp $
*/
/*
@@ -81,6 +81,7 @@
#include <sys/signalvar.h>
#include <sys/resourcevar.h>
#include <sys/vmmeter.h>
+#include <sys/buf.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
@@ -103,10 +104,6 @@ int vm_fault_additional_pages __P((vm_page_t, int, int, vm_page_t *, int *));
#define VM_FAULT_READ_BEHIND 3
#define VM_FAULT_READ (VM_FAULT_READ_AHEAD+VM_FAULT_READ_BEHIND+1)
-int vm_fault_free_1;
-int vm_fault_copy_save_1;
-int vm_fault_copy_save_2;
-
/*
* vm_fault:
*
@@ -200,6 +197,11 @@ RetryFault:;
return (result);
}
+ if (entry->nofault) {
+ panic("vm_fault: fault on nofault entry, addr: %lx",
+ vaddr);
+ }
+
vp = vnode_pager_lock(first_object);
lookup_still_valid = TRUE;
@@ -565,7 +567,6 @@ readrest:
first_m = m;
m->dirty = VM_PAGE_BITS_ALL;
m = NULL;
- ++vm_fault_copy_save_1;
} else {
/*
* Oh, well, lets copy it.
@@ -639,7 +640,6 @@ readrest:
PAGE_WAKEUP(m);
vm_page_free(m);
m = NULL;
- ++vm_fault_free_1;
tm->dirty = VM_PAGE_BITS_ALL;
first_m->dirty = VM_PAGE_BITS_ALL;
}
@@ -651,7 +651,6 @@ readrest:
vm_page_rename(m, other_object, other_pindex);
m->dirty = VM_PAGE_BITS_ALL;
m->valid = VM_PAGE_BITS_ALL;
- ++vm_fault_copy_save_2;
}
}
}
OpenPOWER on IntegriCloud