From 23922ccacac77d574fbda84a42df9863a9fe018a Mon Sep 17 00:00:00 2001 From: David Greenman Date: Thu, 2 Nov 1995 06:42:47 +0000 Subject: [PATCH] Move page fixups (pmap_clear_modify, etc) that happen after paging input completes out of vm_fault and into the pagers. This get rid of some redundancy and improves the architecture. Reviewed by: John Dyson --- sys/vm/swap_pager.c | 7 ++++++- sys/vm/vm_fault.c | 5 +---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 03c3d0f5816a..fbdb09c2de42 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -39,7 +39,7 @@ * from: Utah $Hdr: swap_pager.c 1.4 91/04/30$ * * @(#)swap_pager.c 8.9 (Berkeley) 3/21/94 - * $Id: swap_pager.c,v 1.46 1995/09/11 00:47:17 dyson Exp $ + * $Id: swap_pager.c,v 1.47 1995/09/24 04:40:19 davidg Exp $ */ /* @@ -1084,6 +1084,11 @@ swap_pager_getpages(object, m, count, reqpage) swap_pager_ridpages(m, count, reqpage); } } + if (rv == VM_PAGER_OK) { + pmap_clear_modify(VM_PAGE_TO_PHYS(m[reqpage])); + m[reqpage]->valid = VM_PAGE_BITS_ALL; + m[reqpage]->dirty = 0; + } return (rv); } diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index efd63fa35745..ea62347b5d16 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.33 1995/10/07 19:02:53 davidg Exp $ + * $Id: vm_fault.c,v 1.34 1995/10/23 03:49:28 dyson Exp $ */ /* @@ -357,9 +357,6 @@ readrest: goto RetryFault; } - pmap_clear_modify(VM_PAGE_TO_PHYS(m)); - m->valid = VM_PAGE_BITS_ALL; - m->flags |= PG_BUSY; hardfault++; break; }