Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm correct accounting of {exec,file}pages.



details:   https://anonhg.NetBSD.org/src/rev/92e4f8a9ba9e
branches:  trunk
changeset: 546205:92e4f8a9ba9e
user:      yamt <yamt%NetBSD.org@localhost>
date:      Tue Apr 22 14:28:15 2003 +0000

description:
correct accounting of {exec,file}pages.
they are not updated correctly when breaking loan.

diffstat:

 sys/uvm/uvm_page.c  |  10 +++++++---
 sys/uvm/uvm_vnode.c |   9 ++-------
 2 files changed, 9 insertions(+), 10 deletions(-)

diffs (61 lines):

diff -r de31c7c9bd7f -r 92e4f8a9ba9e sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c        Tue Apr 22 14:09:46 2003 +0000
+++ b/sys/uvm/uvm_page.c        Tue Apr 22 14:28:15 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_page.c,v 1.85 2003/04/09 16:34:10 thorpej Exp $    */
+/*     $NetBSD: uvm_page.c,v 1.86 2003/04/22 14:28:15 yamt Exp $       */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.85 2003/04/09 16:34:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.86 2003/04/22 14:28:15 yamt Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -174,7 +174,11 @@
        TAILQ_INSERT_TAIL(buck, pg, hashq);
        simple_unlock(&uvm.hashlock);
 
-       if (UVM_OBJ_IS_AOBJ(uobj)) {
+       if (UVM_OBJ_IS_VTEXT(uobj)) {
+               uvmexp.execpages++;
+       } else if (UVM_OBJ_IS_VNODE(uobj)) {
+               uvmexp.filepages++;
+       } else if (UVM_OBJ_IS_AOBJ(uobj)) {
                uvmexp.anonpages++;
        }
 
diff -r de31c7c9bd7f -r 92e4f8a9ba9e sys/uvm/uvm_vnode.c
--- a/sys/uvm/uvm_vnode.c       Tue Apr 22 14:09:46 2003 +0000
+++ b/sys/uvm/uvm_vnode.c       Tue Apr 22 14:28:15 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_vnode.c,v 1.59 2002/09/06 13:18:43 gehenna Exp $   */
+/*     $NetBSD: uvm_vnode.c,v 1.60 2003/04/22 14:28:16 yamt Exp $      */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_vnode.c,v 1.59 2002/09/06 13:18:43 gehenna Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_vnode.c,v 1.60 2003/04/22 14:28:16 yamt Exp $");
 
 #include "fs_nfs.h"
 #include "opt_uvmhist.h"
@@ -395,11 +395,6 @@
                                simple_lock(&uobj->vmobjlock);
                                continue;
                        }
-                       if (UVM_OBJ_IS_VTEXT(uobj)) {
-                               uvmexp.execpages++;
-                       } else {
-                               uvmexp.filepages++;
-                       }
                        UVMHIST_LOG(ubchist, "alloced %p", pg,0,0,0);
                        break;
                } else if (flags & UFP_NOCACHE) {



Home | Main Index | Thread Index | Old Index