Module Name: src Committed By: yamt Date: Wed Jan 4 16:31:18 UTC 2012
Modified Files: src/sys/uvm [yamt-pagecache]: uvm_loan.c uvm_page.c Log Message: O->A loan related statistics fixes. To generate a diff of this commit: cvs rdiff -u -r1.81.2.8 -r1.81.2.9 src/sys/uvm/uvm_loan.c cvs rdiff -u -r1.178.2.11 -r1.178.2.12 src/sys/uvm/uvm_page.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/uvm/uvm_loan.c diff -u src/sys/uvm/uvm_loan.c:1.81.2.8 src/sys/uvm/uvm_loan.c:1.81.2.9 --- src/sys/uvm/uvm_loan.c:1.81.2.8 Wed Dec 28 13:24:19 2011 +++ src/sys/uvm/uvm_loan.c Wed Jan 4 16:31:17 2012 @@ -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 @@ uvm_loan_resolve_orphan(struct vm_page * return; } KASSERT(pg->loan_count > 0); + uvm_pagemarkdirty(pg, UVM_PAGE_STATUS_DIRTY); if (!pageqlocked) { mutex_enter(&uvm_pageqlock); } @@ -1770,7 +1771,6 @@ uvm_loan_resolve_orphan(struct vm_page * * 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]++; Index: src/sys/uvm/uvm_page.c diff -u src/sys/uvm/uvm_page.c:1.178.2.11 src/sys/uvm/uvm_page.c:1.178.2.12 --- src/sys/uvm/uvm_page.c:1.178.2.11 Wed Jan 4 16:30:06 2012 +++ src/sys/uvm/uvm_page.c Wed Jan 4 16:31:17 2012 @@ -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 @@ uvm_pagefree(struct vm_page *pg) * 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) {