Source-Changes-HG archive

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

[src/yamt-pagecache]: src/sys/uvm O->A loan related statistics fixes.



details:   https://anonhg.NetBSD.org/src/rev/f244227287e0
branches:  yamt-pagecache
changeset: 770856:f244227287e0
user:      yamt <yamt%NetBSD.org@localhost>
date:      Wed Jan 04 16:31:17 2012 +0000

description:
O->A loan related statistics fixes.

diffstat:

 sys/uvm/uvm_loan.c |  6 +++---
 sys/uvm/uvm_page.c |  8 +++-----
 2 files changed, 6 insertions(+), 8 deletions(-)

diffs (69 lines):

diff -r 15644039e8f8 -r f244227287e0 sys/uvm/uvm_loan.c
--- a/sys/uvm/uvm_loan.c        Wed Jan 04 16:30:06 2012 +0000
+++ b/sys/uvm/uvm_loan.c        Wed Jan 04 16:31:17 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_loan.c,v 1.81.2.8 2011/12/28 13:24:19 yamt Exp $   */
+/*     $NetBSD: uvm_loan.c,v 1.81.2.9 2012/01/04 16:31:17 yamt Exp $   */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_loan.c,v 1.81.2.8 2011/12/28 13:24:19 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_loan.c,v 1.81.2.9 2012/01/04 16:31:17 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1755,6 +1755,7 @@
                return;
        }
        KASSERT(pg->loan_count > 0);
+       uvm_pagemarkdirty(pg, UVM_PAGE_STATUS_DIRTY);
        if (!pageqlocked) {
                mutex_enter(&uvm_pageqlock);
        }
@@ -1770,7 +1771,6 @@
         * the pagestate should have been decremented when uobj dropped the
         * ownership.
         */
-       uvm_pagemarkdirty(pg, UVM_PAGE_STATUS_DIRTY);
        ucpu = uvm_cpu_get();
        ucpu->loan_resolve_orphan++;
        ucpu->pagestate[1][UVM_PAGE_STATUS_DIRTY]++;
diff -r 15644039e8f8 -r f244227287e0 sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c        Wed Jan 04 16:30:06 2012 +0000
+++ b/sys/uvm/uvm_page.c        Wed Jan 04 16:31:17 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_page.c,v 1.178.2.11 2012/01/04 16:30:06 yamt Exp $ */
+/*     $NetBSD: uvm_page.c,v 1.178.2.12 2012/01/04 16:31:17 yamt Exp $ */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.178.2.11 2012/01/04 16:30:06 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.178.2.12 2012/01/04 16:31:17 yamt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
@@ -1524,15 +1524,13 @@
                 * if the page is owned by an anon then we just want to
                 * drop anon ownership.  the kernel will free the page when
                 * it is done with it.  if the page is owned by an object,
-                * remove it from the object and mark it dirty for the benefit
-                * of possible anon owners.
+                * remove it from the object.
                 *
                 * regardless of previous ownership, wakeup any waiters,
                 * unbusy the page, and we're done.
                 */
 
                if (obj != NULL) {
-                       uvm_pagemarkdirty(pg, UVM_PAGE_STATUS_DIRTY);
                        uvm_pageremove(obj, pg);
                        pg->pqflags &= ~(PQ_FILE|PQ_AOBJ);
                } else if (pg->uanon != NULL) {



Home | Main Index | Thread Index | Old Index