Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpkern Actually, we want to say "no aobjs...



details:   https://anonhg.NetBSD.org/src/rev/3465b34967d0
branches:  trunk
changeset: 757630:3465b34967d0
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Sep 08 21:14:32 2010 +0000

description:
Actually, we want to say "no aobjs" instead of "only vnodes" to
make component boundaries go right.

diffstat:

 sys/rump/librump/rumpkern/vm.c |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (51 lines):

diff -r a255ead8b5e3 -r 3465b34967d0 sys/rump/librump/rumpkern/vm.c
--- a/sys/rump/librump/rumpkern/vm.c    Wed Sep 08 21:02:11 2010 +0000
+++ b/sys/rump/librump/rumpkern/vm.c    Wed Sep 08 21:14:32 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm.c,v 1.92 2010/09/08 21:02:11 pooka Exp $    */
+/*     $NetBSD: vm.c,v 1.93 2010/09/08 21:14:32 pooka Exp $    */
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.92 2010/09/08 21:02:11 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.93 2010/09/08 21:14:32 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -180,10 +180,11 @@
        rb_tree_insert_node(&uobj->rb_tree, &pg->rb_node);
 
        /*
-        * Put vnodes on the LRU page queue.  we can't flush others,
-        * so don't bother with them.
+        * Don't put anons on the LRU page queue.  We can't flush them
+        * (there's no concept of swap in a rump kernel), so no reason
+        * to bother with them.
         */
-       if (UVM_OBJ_IS_VNODE(uobj)) {
+       if (!UVM_OBJ_IS_AOBJ(uobj)) {
                atomic_inc_uint(&vmpage_onqueue);
                mutex_enter(&uvm_pageqlock);
                TAILQ_INSERT_TAIL(&vmpage_lruqueue, pg, pageq.queue);
@@ -215,7 +216,7 @@
        uobj->uo_npages--;
        rb_tree_remove_node(&uobj->rb_tree, &pg->rb_node);
 
-       if (UVM_OBJ_IS_VNODE(uobj)) {
+       if (!UVM_OBJ_IS_AOBJ(uobj)) {
                TAILQ_REMOVE(&vmpage_lruqueue, pg, pageq.queue);
                atomic_dec_uint(&vmpage_onqueue);
        }
@@ -467,7 +468,7 @@
        struct vm_page *pg;
 
        pg = (struct vm_page *)rb_tree_find_node(&uobj->rb_tree, &off);
-       if (pg && UVM_OBJ_IS_VNODE(pg->uobject)) {
+       if (pg && !UVM_OBJ_IS_AOBJ(pg->uobject)) {
                mutex_enter(&uvm_pageqlock);
                TAILQ_REMOVE(&vmpage_lruqueue, pg, pageq.queue);
                TAILQ_INSERT_TAIL(&vmpage_lruqueue, pg, pageq.queue);



Home | Main Index | Thread Index | Old Index