Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/uvm Pull up revision 1.27 (requested by thorpej in ...
details: https://anonhg.NetBSD.org/src/rev/5c0c4398fe4f
branches: netbsd-1-6
changeset: 530252:5c0c4398fe4f
user: tron <tron%NetBSD.org@localhost>
date: Mon Jun 02 15:15:33 2003 +0000
description:
Pull up revision 1.27 (requested by thorpej in ticket #1207):
For PMAP_CACHE_VIVT platforms, make UBC_RELEASE_UNMAP evaluate to TRUE,
and add a comment explaining why.
Reviewed by Chuq Silvers.
diffstat:
sys/uvm/uvm_bio.c | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
diffs (67 lines):
diff -r 2105608cb854 -r 5c0c4398fe4f sys/uvm/uvm_bio.c
--- a/sys/uvm/uvm_bio.c Mon Jun 02 15:13:23 2003 +0000
+++ b/sys/uvm/uvm_bio.c Mon Jun 02 15:15:33 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_bio.c,v 1.25 2002/02/27 16:02:03 chs Exp $ */
+/* $NetBSD: uvm_bio.c,v 1.25.10.1 2003/06/02 15:15:33 tron Exp $ */
/*
* Copyright (c) 1998 Chuck Silvers.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.25 2002/02/27 16:02:03 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.25.10.1 2003/06/02 15:15:33 tron Exp $");
#include "opt_uvmhist.h"
@@ -117,14 +117,18 @@
int ubc_nwins = UBC_NWINS;
int ubc_winshift = UBC_WINSHIFT;
int ubc_winsize;
-#ifdef PMAP_PREFER
+#if defined(PMAP_PREFER)
int ubc_nqueues;
boolean_t ubc_release_unmap = FALSE;
#define UBC_NQUEUES ubc_nqueues
-#define UBC_RELEASE_UNMAP ubc_release_unmap
+#define UBC_RELEASE_UNMAP(uobj) \
+ (ubc_release_unmap && (((struct vnode *)uobj)->v_flag & VTEXT))
+#elif defined(PMAP_CACHE_VIVT)
+#define UBC_NQUEUES 1
+#define UBC_RELEASE_UNMAP(uobj) TRUE
#else
#define UBC_NQUEUES 1
-#define UBC_RELEASE_UNMAP FALSE
+#define UBC_RELEASE_UNMAP(uobj) FALSE
#endif
/*
@@ -529,18 +533,22 @@
umap->writelen = 0;
umap->refcount--;
if (umap->refcount == 0) {
- if (UBC_RELEASE_UNMAP &&
- (((struct vnode *)uobj)->v_flag & VTEXT)) {
+ if (UBC_RELEASE_UNMAP(uobj)) {
/*
+ * if the cache is virtually indexed and virtually
+ * tagged, we cannot create a compatible cache alias.
+ *
* if this file is the executable image of
* some process, that process will likely have
* the file mapped at an alignment other than
* what PMAP_PREFER() would like. we'd like
* to have process text be able to use the
* cache even if someone is also reading the
- * file, so invalidate mappings of such files
- * as soon as possible.
+ * file.
+ *
+ * so invalidate mappings of such files as soon as
+ * possible.
*/
pmap_remove(pmap_kernel(), umapva,
Home |
Main Index |
Thread Index |
Old Index