CVS commit: [yamt-pagecache] src/sys/arch/x86/x86

2014-05-22 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu May 22 19:10:32 UTC 2014

Modified Files:
src/sys/arch/x86/x86 [yamt-pagecache]: pmap.c

Log Message:
g/c a write-only variable.


To generate a diff of this commit:
cvs rdiff -u -r1.137.2.11 -r1.137.2.12 src/sys/arch/x86/x86/pmap.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/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.137.2.11 src/sys/arch/x86/x86/pmap.c:1.137.2.12
--- src/sys/arch/x86/x86/pmap.c:1.137.2.11	Thu May 22 11:40:14 2014
+++ src/sys/arch/x86/x86/pmap.c	Thu May 22 19:10:31 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.137.2.11 2014/05/22 11:40:14 yamt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.137.2.12 2014/05/22 19:10:31 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.11 2014/05/22 11:40:14 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.137.2.12 2014/05/22 19:10:31 yamt Exp $);
 
 #include opt_user_ldt.h
 #include opt_lockdebug.h
@@ -1860,14 +1860,10 @@ pmap_freepage(struct pmap *pmap, struct 
 {
 	lwp_t *l;
 	int lidx;
-	struct uvm_object *obj;
 
 	KASSERT(ptp-wire_count == 1);
-
-	lidx = level - 1;
-
-	obj = pmap-pm_obj[lidx];
 	pmap_stats_update(pmap, -1, 0);
+	lidx = level - 1;
 	if (pmap-pm_ptphint[lidx] == ptp)
 		pmap-pm_ptphint[lidx] = NULL;
 	ptp-wire_count = 0;



CVS commit: [yamt-pagecache] src/sys/arch/x86/x86

2011-11-24 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu Nov 24 15:26:56 UTC 2011

Modified Files:
src/sys/arch/x86/x86 [yamt-pagecache]: pmap.c

Log Message:
share a lock among pmap uobjs


To generate a diff of this commit:
cvs rdiff -u -r1.137.2.4 -r1.137.2.5 src/sys/arch/x86/x86/pmap.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/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.137.2.4 src/sys/arch/x86/x86/pmap.c:1.137.2.5
--- src/sys/arch/x86/x86/pmap.c:1.137.2.4	Fri Nov 18 00:51:28 2011
+++ src/sys/arch/x86/x86/pmap.c	Thu Nov 24 15:26:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.137.2.4 2011/11/18 00:51:28 yamt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.137.2.5 2011/11/24 15:26:56 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.4 2011/11/18 00:51:28 yamt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.137.2.5 2011/11/24 15:26:56 yamt Exp $);
 
 #include opt_user_ldt.h
 #include opt_lockdebug.h
@@ -1781,8 +1781,6 @@ pmap_freepage(struct pmap *pmap, struct 
 
 	obj = pmap-pm_obj[lidx];
 	pmap_stats_update(pmap, -1, 0);
-	if (lidx != 0)
-		mutex_enter(obj-vmobjlock);
 	if (pmap-pm_ptphint[lidx] == ptp)
 		pmap-pm_ptphint[lidx] = NULL;
 	ptp-wire_count = 0;
@@ -1791,8 +1789,6 @@ pmap_freepage(struct pmap *pmap, struct 
 	KASSERT((l-l_pflag  LP_INTR) == 0);
 	VM_PAGE_TO_PP(ptp)-pp_link = l-l_md.md_gc_ptp;
 	l-l_md.md_gc_ptp = ptp;
-	if (lidx != 0)
-		mutex_exit(obj-vmobjlock);
 }
 
 static void



CVS commit: [yamt-pagecache] src/sys/arch/x86/x86

2011-11-10 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Thu Nov 10 14:32:36 UTC 2011

Modified Files:
src/sys/arch/x86/x86 [yamt-pagecache]: pmap.c

Log Message:
remove uobj-memq


To generate a diff of this commit:
cvs rdiff -u -r1.137.2.2 -r1.137.2.3 src/sys/arch/x86/x86/pmap.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/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.137.2.2 src/sys/arch/x86/x86/pmap.c:1.137.2.3
--- src/sys/arch/x86/x86/pmap.c:1.137.2.2	Thu Nov 10 14:31:44 2011
+++ src/sys/arch/x86/x86/pmap.c	Thu Nov 10 14:32:36 2011
@@ -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 @@ pmap_freepage(struct pmap *pmap, struct 
 	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 @@ pmap_destroy(struct pmap *pmap)
 
 	for (i = 0; i  PTP_LEVELS - 1; i++) {
 		KASSERT(pmap-pm_obj[i].uo_npages == 0);
-		KASSERT(TAILQ_EMPTY(pmap-pm_obj[i].memq));
 	}
 
 	/*