remove uobj->memq yamt-pagecache
authoryamt <yamt@NetBSD.org>
Thu, 10 Nov 2011 14:32:19 +0000
branchyamt-pagecache
changeset 280306 97a273c1f1fc
parent 280305 b9662434d582
child 280307 dd4a9e6aef76
remove uobj->memq
sys/arch/x86/x86/pmap.c
sys/kern/vfs_vnode.c
sys/rump/librump/rumpkern/vm.c
--- a/sys/arch/x86/x86/pmap.c	Thu Nov 10 14:31:09 2011 +0000
+++ b/sys/arch/x86/x86/pmap.c	Thu Nov 10 14:32:19 2011 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.137.2.2 2011/11/10 14:31:44 yamt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.137.2.3 2011/11/10 14:32:36 yamt Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.137.2.2 2011/11/10 14:31:44 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.137.2.3 2011/11/10 14:32:36 yamt Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -1805,7 +1805,7 @@
 	if (lidx != 0)
 		mutex_enter(obj->vmobjlock);
 	if (pmap->pm_ptphint[lidx] == ptp)
-		pmap->pm_ptphint[lidx] = TAILQ_FIRST(&obj->memq);
+		pmap->pm_ptphint[lidx] = NULL;
 	ptp->wire_count = 0;
 	uvm_pagerealloc(ptp, NULL, 0);
 	l = curlwp;
@@ -2366,7 +2366,6 @@
 
 	for (i = 0; i < PTP_LEVELS - 1; i++) {
 		KASSERT(pmap->pm_obj[i].uo_npages == 0);
-		KASSERT(TAILQ_EMPTY(&pmap->pm_obj[i].memq));
 	}
 
 	/*
--- a/sys/kern/vfs_vnode.c	Thu Nov 10 14:31:09 2011 +0000
+++ b/sys/kern/vfs_vnode.c	Thu Nov 10 14:32:19 2011 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_vnode.c,v 1.14 2011/10/07 09:35:06 hannken Exp $	*/
+/*	$NetBSD: vfs_vnode.c,v 1.14.2.1 2011/11/10 14:32:19 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -120,7 +120,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.14 2011/10/07 09:35:06 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.14.2.1 2011/11/10 14:32:19 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -329,7 +329,7 @@
 
 	KASSERT(vp->v_data == NULL);
 	KASSERT(vp->v_uobj.uo_npages == 0);
-	KASSERT(TAILQ_EMPTY(&vp->v_uobj.memq));
+	KASSERT(radix_tree_empty_tree_p(&vp->v_uobj.uo_pages));
 	KASSERT(vp->v_numoutput == 0);
 	KASSERT((vp->v_iflag & VI_ONWORKLST) == 0);
 
@@ -386,7 +386,7 @@
 	uobj = &vp->v_uobj;
 	KASSERT(uobj->pgops == &uvm_vnodeops);
 	KASSERT(uobj->uo_npages == 0);
-	KASSERT(TAILQ_FIRST(&uobj->memq) == NULL);
+	KASSERT(radix_tree_empty_tree_p(&vp->v_uobj.uo_pages));
 	vp->v_size = vp->v_writesize = VSIZENOTSET;
 
 	/* Share the vnode_t::v_interlock, if requested. */
--- a/sys/rump/librump/rumpkern/vm.c	Thu Nov 10 14:31:09 2011 +0000
+++ b/sys/rump/librump/rumpkern/vm.c	Thu Nov 10 14:32:19 2011 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm.c,v 1.120.2.1 2011/11/02 21:53:59 yamt Exp $	*/
+/*	$NetBSD: vm.c,v 1.120.2.2 2011/11/10 14:33:18 yamt Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.120.2.1 2011/11/02 21:53:59 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.120.2.2 2011/11/10 14:33:18 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -162,7 +162,6 @@
 		uvm_pagezero(pg);
 	}
 
-	TAILQ_INSERT_TAIL(&uobj->memq, pg, listq.queue);
 	error = radix_tree_insert_node(&uobj->uo_pages,
 	    pg->offset >> PAGE_SHIFT, pg);
 	KASSERT(error == 0);
@@ -201,8 +200,6 @@
 	if (pg->flags & PG_WANTED)
 		wakeup(pg);
 
-	TAILQ_REMOVE(&uobj->memq, pg, listq.queue);
-
 	uobj->uo_npages--;
 	opg = radix_tree_remove_node(&uobj->uo_pages, pg->offset >> PAGE_SHIFT);
 	KASSERT(pg == opg);