Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Fix a bug in pmap_collect_pv(), even though nobody ...
details: https://anonhg.NetBSD.org/src/rev/cb0f1bf8a723
branches: trunk
changeset: 467684:cb0f1bf8a723
user: mycroft <mycroft%NetBSD.org@localhost>
date: Sat Mar 27 05:57:02 1999 +0000
description:
Fix a bug in pmap_collect_pv(), even though nobody currently uses it:
When we put a page on the collection list, we must subtract NPVPPG from the
total free count: one for each pv_entry that's free in that page, and one for
each free pv_entry in other pages that we're going to eat by moving the ones
in the page being collected.
diffstat:
sys/arch/amiga/amiga/pmap.c | 10 ++++++----
sys/arch/arm32/arm32/pmap.c | 4 ++--
sys/arch/hp300/hp300/pmap.c | 10 ++++++----
sys/arch/i386/i386/pmap.c | 10 ++++++----
sys/arch/mac68k/mac68k/pmap.c | 10 ++++++----
sys/arch/mvme68k/mvme68k/pmap.c | 10 ++++++----
sys/arch/next68k/next68k/pmap.c | 10 ++++++----
sys/arch/pc532/pc532/pmap.c | 10 ++++++----
sys/arch/x68k/x68k/pmap.c | 10 ++++++----
9 files changed, 50 insertions(+), 34 deletions(-)
diffs (266 lines):
diff -r 96866af09c1d -r cb0f1bf8a723 sys/arch/amiga/amiga/pmap.c
--- a/sys/arch/amiga/amiga/pmap.c Sat Mar 27 05:53:05 1999 +0000
+++ b/sys/arch/amiga/amiga/pmap.c Sat Mar 27 05:57:02 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.62 1999/03/27 03:37:51 mycroft Exp $ */
+/* $NetBSD: pmap.c,v 1.63 1999/03/27 05:57:02 mycroft Exp $ */
/*
* Copyright (c) 1991 Regents of the University of California.
@@ -737,8 +737,9 @@
npvp = pvp->pvp_pgi.pgi_list.tqe_next;
if (pvp->pvp_pgi.pgi_nfree > NPVPPG / 3) {
TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
- TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp, pvp_pgi.pgi_list);
- pv_nfree -= pvp->pvp_pgi.pgi_nfree;
+ TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp,
+ pvp_pgi.pgi_list);
+ pv_nfree -= NPVPPG;
pvp->pvp_pgi.pgi_nfree = -1;
}
}
@@ -755,7 +756,8 @@
if (pvp->pvp_pgi.pgi_nfree == -1) {
pvp = pv_page_freelist.tqh_first;
if (--pvp->pvp_pgi.pgi_nfree == 0) {
- TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
+ TAILQ_REMOVE(&pv_page_freelist, pvp,
+ pvp_pgi.pgi_list);
}
npv = pvp->pvp_pgi.pgi_freelist;
#ifdef DIAGNOSTIC
diff -r 96866af09c1d -r cb0f1bf8a723 sys/arch/arm32/arm32/pmap.c
--- a/sys/arch/arm32/arm32/pmap.c Sat Mar 27 05:53:05 1999 +0000
+++ b/sys/arch/arm32/arm32/pmap.c Sat Mar 27 05:57:02 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.50 1999/03/27 05:12:21 mycroft Exp $ */
+/* $NetBSD: pmap.c,v 1.51 1999/03/27 05:57:03 mycroft Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -338,7 +338,7 @@
TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp,
pvp_pgi.pgi_list);
- pv_nfree -= pvp->pvp_pgi.pgi_nfree;
+ pv_nfree -= NPVPPG;
pvp->pvp_pgi.pgi_nfree = -1;
}
}
diff -r 96866af09c1d -r cb0f1bf8a723 sys/arch/hp300/hp300/pmap.c
--- a/sys/arch/hp300/hp300/pmap.c Sat Mar 27 05:53:05 1999 +0000
+++ b/sys/arch/hp300/hp300/pmap.c Sat Mar 27 05:57:02 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.69 1999/03/27 03:37:52 mycroft Exp $ */
+/* $NetBSD: pmap.c,v 1.70 1999/03/27 05:57:03 mycroft Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -607,8 +607,9 @@
npvp = pvp->pvp_pgi.pgi_list.tqe_next;
if (pvp->pvp_pgi.pgi_nfree > NPVPPG / 3) {
TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
- TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp, pvp_pgi.pgi_list);
- pv_nfree -= pvp->pvp_pgi.pgi_nfree;
+ TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp,
+ pvp_pgi.pgi_list);
+ pv_nfree -= NPVPPG;
pvp->pvp_pgi.pgi_nfree = -1;
}
}
@@ -625,7 +626,8 @@
if (pvp->pvp_pgi.pgi_nfree == -1) {
pvp = pv_page_freelist.tqh_first;
if (--pvp->pvp_pgi.pgi_nfree == 0) {
- TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
+ TAILQ_REMOVE(&pv_page_freelist, pvp,
+ pvp_pgi.pgi_list);
}
npv = pvp->pvp_pgi.pgi_freelist;
#ifdef DIAGNOSTIC
diff -r 96866af09c1d -r cb0f1bf8a723 sys/arch/i386/i386/pmap.c
--- a/sys/arch/i386/i386/pmap.c Sat Mar 27 05:53:05 1999 +0000
+++ b/sys/arch/i386/i386/pmap.c Sat Mar 27 05:57:02 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.67 1999/03/26 23:41:30 mycroft Exp $ */
+/* $NetBSD: pmap.c,v 1.68 1999/03/27 05:57:04 mycroft Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -503,8 +503,9 @@
npvp = pvp->pvp_pgi.pgi_list.tqe_next;
if (pvp->pvp_pgi.pgi_nfree > NPVPPG / 3) {
TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
- TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp, pvp_pgi.pgi_list);
- pv_nfree -= pvp->pvp_pgi.pgi_nfree;
+ TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp,
+ pvp_pgi.pgi_list);
+ pv_nfree -= NPVPPG;
pvp->pvp_pgi.pgi_nfree = -1;
}
}
@@ -521,7 +522,8 @@
if (pvp->pvp_pgi.pgi_nfree == -1) {
pvp = pv_page_freelist.tqh_first;
if (--pvp->pvp_pgi.pgi_nfree == 0) {
- TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
+ TAILQ_REMOVE(&pv_page_freelist, pvp,
+ pvp_pgi.pgi_list);
}
npv = pvp->pvp_pgi.pgi_freelist;
#ifdef DIAGNOSTIC
diff -r 96866af09c1d -r cb0f1bf8a723 sys/arch/mac68k/mac68k/pmap.c
--- a/sys/arch/mac68k/mac68k/pmap.c Sat Mar 27 05:53:05 1999 +0000
+++ b/sys/arch/mac68k/mac68k/pmap.c Sat Mar 27 05:57:02 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.51 1999/03/27 03:37:52 mycroft Exp $ */
+/* $NetBSD: pmap.c,v 1.52 1999/03/27 05:57:04 mycroft Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -625,8 +625,9 @@
npvp = pvp->pvp_pgi.pgi_list.tqe_next;
if (pvp->pvp_pgi.pgi_nfree > NPVPPG / 3) {
TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
- TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp, pvp_pgi.pgi_list);
- pv_nfree -= pvp->pvp_pgi.pgi_nfree;
+ TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp,
+ pvp_pgi.pgi_list);
+ pv_nfree -= NPVPPG;
pvp->pvp_pgi.pgi_nfree = -1;
}
}
@@ -643,7 +644,8 @@
if (pvp->pvp_pgi.pgi_nfree == -1) {
pvp = pv_page_freelist.tqh_first;
if (--pvp->pvp_pgi.pgi_nfree == 0) {
- TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
+ TAILQ_REMOVE(&pv_page_freelist, pvp,
+ pvp_pgi.pgi_list);
}
npv = pvp->pvp_pgi.pgi_freelist;
#ifdef DIAGNOSTIC
diff -r 96866af09c1d -r cb0f1bf8a723 sys/arch/mvme68k/mvme68k/pmap.c
--- a/sys/arch/mvme68k/mvme68k/pmap.c Sat Mar 27 05:53:05 1999 +0000
+++ b/sys/arch/mvme68k/mvme68k/pmap.c Sat Mar 27 05:57:02 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.29 1999/03/27 03:37:52 mycroft Exp $ */
+/* $NetBSD: pmap.c,v 1.30 1999/03/27 05:57:04 mycroft Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -586,8 +586,9 @@
npvp = pvp->pvp_pgi.pgi_list.tqe_next;
if (pvp->pvp_pgi.pgi_nfree > NPVPPG / 3) {
TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
- TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp, pvp_pgi.pgi_list);
- pv_nfree -= pvp->pvp_pgi.pgi_nfree;
+ TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp,
+ pvp_pgi.pgi_list);
+ pv_nfree -= NPVPPG;
pvp->pvp_pgi.pgi_nfree = -1;
}
}
@@ -604,7 +605,8 @@
if (pvp->pvp_pgi.pgi_nfree == -1) {
pvp = pv_page_freelist.tqh_first;
if (--pvp->pvp_pgi.pgi_nfree == 0) {
- TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
+ TAILQ_REMOVE(&pv_page_freelist, pvp,
+ pvp_pgi.pgi_list);
}
npv = pvp->pvp_pgi.pgi_freelist;
#ifdef DIAGNOSTIC
diff -r 96866af09c1d -r cb0f1bf8a723 sys/arch/next68k/next68k/pmap.c
--- a/sys/arch/next68k/next68k/pmap.c Sat Mar 27 05:53:05 1999 +0000
+++ b/sys/arch/next68k/next68k/pmap.c Sat Mar 27 05:57:02 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.11 1999/03/27 03:34:08 mycroft Exp $ */
+/* $NetBSD: pmap.c,v 1.12 1999/03/27 05:57:05 mycroft Exp $ */
/*
* This file was taken from mvme68k/mvme68k/pmap.c
@@ -624,8 +624,9 @@
npvp = pvp->pvp_pgi.pgi_list.tqe_next;
if (pvp->pvp_pgi.pgi_nfree > NPVPPG / 3) {
TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
- TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp, pvp_pgi.pgi_list);
- pv_nfree -= pvp->pvp_pgi.pgi_nfree;
+ TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp,
+ pvp_pgi.pgi_list);
+ pv_nfree -= NPVPPG;
pvp->pvp_pgi.pgi_nfree = -1;
}
}
@@ -642,7 +643,8 @@
if (pvp->pvp_pgi.pgi_nfree == -1) {
pvp = pv_page_freelist.tqh_first;
if (--pvp->pvp_pgi.pgi_nfree == 0) {
- TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
+ TAILQ_REMOVE(&pv_page_freelist, pvp,
+ pvp_pgi.pgi_list);
}
npv = pvp->pvp_pgi.pgi_freelist;
#ifdef DIAGNOSTIC
diff -r 96866af09c1d -r cb0f1bf8a723 sys/arch/pc532/pc532/pmap.c
--- a/sys/arch/pc532/pc532/pmap.c Sat Mar 27 05:53:05 1999 +0000
+++ b/sys/arch/pc532/pc532/pmap.c Sat Mar 27 05:57:02 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.33 1999/03/26 23:41:33 mycroft Exp $ */
+/* $NetBSD: pmap.c,v 1.34 1999/03/27 05:57:05 mycroft Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -451,8 +451,9 @@
npvp = pvp->pvp_pgi.pgi_list.tqe_next;
if (pvp->pvp_pgi.pgi_nfree > NPVPPG / 3) {
TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
- TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp, pvp_pgi.pgi_list);
- pv_nfree -= pvp->pvp_pgi.pgi_nfree;
+ TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp,
+ pvp_pgi.pgi_list);
+ pv_nfree -= NPVPPG;
pvp->pvp_pgi.pgi_nfree = -1;
}
}
@@ -469,7 +470,8 @@
if (pvp->pvp_pgi.pgi_nfree == -1) {
pvp = pv_page_freelist.tqh_first;
if (--pvp->pvp_pgi.pgi_nfree == 0) {
- TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
+ TAILQ_REMOVE(&pv_page_freelist, pvp,
+ pvp_pgi.pgi_list);
}
npv = pvp->pvp_pgi.pgi_freelist;
#ifdef DIAGNOSTIC
diff -r 96866af09c1d -r cb0f1bf8a723 sys/arch/x68k/x68k/pmap.c
--- a/sys/arch/x68k/x68k/pmap.c Sat Mar 27 05:53:05 1999 +0000
+++ b/sys/arch/x68k/x68k/pmap.c Sat Mar 27 05:57:02 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.30 1999/03/27 03:37:53 mycroft Exp $ */
+/* $NetBSD: pmap.c,v 1.31 1999/03/27 05:57:06 mycroft Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -604,8 +604,9 @@
npvp = pvp->pvp_pgi.pgi_list.tqe_next;
if (pvp->pvp_pgi.pgi_nfree > NPVPPG / 3) {
TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
- TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp, pvp_pgi.pgi_list);
- pv_nfree -= pvp->pvp_pgi.pgi_nfree;
+ TAILQ_INSERT_TAIL(&pv_page_collectlist, pvp,
+ pvp_pgi.pgi_list);
+ pv_nfree -= NPVPPG;
pvp->pvp_pgi.pgi_nfree = -1;
}
}
@@ -622,7 +623,8 @@
if (pvp->pvp_pgi.pgi_nfree == -1) {
pvp = pv_page_freelist.tqh_first;
if (--pvp->pvp_pgi.pgi_nfree == 0) {
- TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
+ TAILQ_REMOVE(&pv_page_freelist, pvp,
+ pvp_pgi.pgi_list);
}
npv = pvp->pvp_pgi.pgi_freelist;
#ifdef DIAGNOSTIC
Home |
Main Index |
Thread Index |
Old Index