diff options
author | dyson <dyson@FreeBSD.org> | 1995-09-03 20:40:43 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1995-09-03 20:40:43 +0000 |
commit | 19cfe6b04c65e8642786c0ed37f1699b1461c945 (patch) | |
tree | 5f4ed8f7995c003619ed9cd8360e2533d535e372 /sys/vm/vm_fault.c | |
parent | 94c170a64751b11530d3a419d295d6fd6f38c938 (diff) | |
download | FreeBSD-src-19cfe6b04c65e8642786c0ed37f1699b1461c945.zip FreeBSD-src-19cfe6b04c65e8642786c0ed37f1699b1461c945.tar.gz |
Machine independent changes to support pre-zeroed free pages. This
significantly improves demand-zero performance.
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r-- | sys/vm/vm_fault.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index debb3c9..1fa59dc 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.25 1995/05/30 08:15:59 rgrimes Exp $ + * $Id: vm_fault.c,v 1.26 1995/07/13 08:48:20 davidg Exp $ */ /* @@ -310,8 +310,8 @@ RetryFault:; /* * Allocate a new page for this object/offset pair. */ - - m = vm_page_alloc(object, offset, VM_ALLOC_NORMAL); + m = vm_page_alloc(object, offset, + vp?VM_ALLOC_NORMAL:(VM_ALLOC_NORMAL|VM_ALLOC_ZERO)); if (m == NULL) { UNLOCK_AND_DEALLOCATE; @@ -439,7 +439,8 @@ readrest: } first_m = NULL; - vm_page_zero_fill(m); + if ((m->flags & PG_ZERO) == 0) + vm_page_zero_fill(m); m->valid = VM_PAGE_BITS_ALL; cnt.v_zfod++; break; @@ -637,7 +638,7 @@ readrest: } } - m->flags |= PG_MAPPED; + m->flags |= PG_MAPPED|PG_REFERENCED; pmap_enter(map->pmap, vaddr, VM_PAGE_TO_PHYS(m), prot, wired); #if 0 |