Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/uvm pullup 1.28->1.29 (chuq): fixes loss of process...



details:   https://anonhg.NetBSD.org/src/rev/8954829babaf
branches:  netbsd-1-4
changeset: 468736:8954829babaf
user:      perry <perry%NetBSD.org@localhost>
date:      Fri Jun 18 18:05:12 1999 +0000

description:
pullup 1.28->1.29 (chuq): fixes loss of process data under heavy paging bug

diffstat:

 sys/uvm/uvm_fault.c |  23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diffs (53 lines):

diff -r 5fc945557f96 -r 8954829babaf sys/uvm/uvm_fault.c
--- a/sys/uvm/uvm_fault.c       Fri Jun 18 18:02:11 1999 +0000
+++ b/sys/uvm/uvm_fault.c       Fri Jun 18 18:05:12 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_fault.c,v 1.27.2.1 1999/04/16 16:28:06 chs Exp $   */
+/*     $NetBSD: uvm_fault.c,v 1.27.2.2 1999/06/18 18:05:12 perry Exp $ */
 
 /*
  *
@@ -1214,11 +1214,19 @@
 
        if (fault_type == VM_FAULT_WIRE) {
                uvm_pagewire(pg);
+
+               /*
+                * since the now-wired page cannot be paged out,
+                * release its swap resources for others to use.
+                * since an anon with no swap cannot be PG_CLEAN,
+                * clear its clean flag now.
+                */
+
+               pg->flags &= ~(PG_CLEAN);
                uvm_anon_dropswap(anon);
        } else {
                /* activate it */
                uvm_pageactivate(pg);
-
        }
 
        uvm_unlock_pageq();
@@ -1638,13 +1646,20 @@
        if (fault_type == VM_FAULT_WIRE) {
                uvm_pagewire(pg);
                if (pg->pqflags & PQ_AOBJ) {
+
+                       /*
+                        * since the now-wired page cannot be paged out,
+                        * release its swap resources for others to use.
+                        * since an aobj page with no swap cannot be PG_CLEAN,
+                        * clear its clean flag now.
+                        */
+
+                       pg->flags &= ~(PG_CLEAN);
                        uao_dropswap(uobj, pg->offset >> PAGE_SHIFT);
                }
        } else {
-               
                /* activate it */
                uvm_pageactivate(pg);
-
        }
 
        uvm_unlock_pageq();



Home | Main Index | Thread Index | Old Index