Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm Remove nop code; the code is moved to uao_dropswap_r...



details:   https://anonhg.NetBSD.org/src/rev/69d4446a53d6
branches:  trunk
changeset: 761348:69d4446a53d6
user:      enami <enami%NetBSD.org@localhost>
date:      Tue Jan 25 03:34:29 2011 +0000

description:
Remove nop code; the code is moved to uao_dropswap_range1() when it is
introduced in rev. 1.75.

diffstat:

 sys/uvm/uvm_aobj.c |  18 ++----------------
 1 files changed, 2 insertions(+), 16 deletions(-)

diffs (46 lines):

diff -r b6bdd6b27438 -r 69d4446a53d6 sys/uvm/uvm_aobj.c
--- a/sys/uvm/uvm_aobj.c        Tue Jan 25 02:38:15 2011 +0000
+++ b/sys/uvm/uvm_aobj.c        Tue Jan 25 03:34:29 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_aobj.c,v 1.110 2010/07/29 10:54:51 hannken Exp $   */
+/*     $NetBSD: uvm_aobj.c,v 1.111 2011/01/25 03:34:29 enami Exp $     */
 
 /*
  * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.110 2010/07/29 10:54:51 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.111 2011/01/25 03:34:29 enami Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -393,8 +393,6 @@
 static void
 uao_free(struct uvm_aobj *aobj)
 {
-       int swpgonlydelta = 0;
-
 
 #if defined(VMSWAP)
        uao_dropswap_range1(aobj, 0, 0);
@@ -426,18 +424,6 @@
 
        UVM_OBJ_DESTROY(&aobj->u_obj);
        pool_cache_put(&uvm_aobj_cache, aobj);
-
-       /*
-        * adjust the counter of pages only in swap for all
-        * the swap slots we've freed.
-        */
-
-       if (swpgonlydelta > 0) {
-               mutex_enter(&uvm_swap_data_lock);
-               KASSERT(uvmexp.swpgonly >= swpgonlydelta);
-               uvmexp.swpgonly -= swpgonlydelta;
-               mutex_exit(&uvm_swap_data_lock);
-       }
 }
 
 /*



Home | Main Index | Thread Index | Old Index