Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Enable ubc_direct by default, but only on systems wi...
details: https://anonhg.NetBSD.org/src/rev/831f971eb35a
branches: trunk
changeset: 971430:831f971eb35a
user: ad <ad%NetBSD.org@localhost>
date: Thu Apr 23 21:53:01 2020 +0000
description:
Enable ubc_direct by default, but only on systems with no more than 2 CPUs
for now.
diffstat:
sys/uvm/uvm_bio.c | 6 +++---
sys/uvm/uvm_glue.c | 16 ++++++++++++++--
2 files changed, 17 insertions(+), 5 deletions(-)
diffs (64 lines):
diff -r d340c904f42a -r 831f971eb35a sys/uvm/uvm_bio.c
--- a/sys/uvm/uvm_bio.c Thu Apr 23 21:47:07 2020 +0000
+++ b/sys/uvm/uvm_bio.c Thu Apr 23 21:53:01 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_bio.c,v 1.110 2020/04/23 21:47:09 ad Exp $ */
+/* $NetBSD: uvm_bio.c,v 1.111 2020/04/23 21:53:01 ad Exp $ */
/*
* Copyright (c) 1998 Chuck Silvers.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.110 2020/04/23 21:47:09 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.111 2020/04/23 21:53:01 ad Exp $");
#include "opt_uvmhist.h"
#include "opt_ubc.h"
@@ -64,7 +64,7 @@
int, int);
static void __noinline ubc_zerorange_direct(struct uvm_object *, off_t, size_t, int);
-bool ubc_direct = false; /* XXX */
+bool ubc_direct = true;
#endif
/*
diff -r d340c904f42a -r 831f971eb35a sys/uvm/uvm_glue.c
--- a/sys/uvm/uvm_glue.c Thu Apr 23 21:47:07 2020 +0000
+++ b/sys/uvm/uvm_glue.c Thu Apr 23 21:53:01 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_glue.c,v 1.177 2020/03/05 12:21:00 rin Exp $ */
+/* $NetBSD: uvm_glue.c,v 1.178 2020/04/23 21:53:01 ad Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.177 2020/03/05 12:21:00 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.178 2020/04/23 21:53:01 ad Exp $");
#include "opt_kgdb.h"
#include "opt_kstack.h"
@@ -504,6 +504,18 @@
/* Start the freelist cache. */
uvm_pgflcache_start();
+#ifdef PMAP_DIRECT
+ /*
+ * XXX Temporary ugly hack. Just before boot, disable ubc_direct if
+ * there's more than a couple of CPUs, since it has concurrency
+ * problems.
+ */
+ if (ncpu > 2) {
+ extern bool ubc_direct;
+ ubc_direct = false;
+ }
+#endif
+
for (;;) {
/* Update legacy stats for post-mortem debugging. */
uvm_update_uvmexp();
Home |
Main Index |
Thread Index |
Old Index