Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm add sysctl to easily set ubc_direct
details: https://anonhg.NetBSD.org/src/rev/1fc7ed752d29
branches: trunk
changeset: 995844:1fc7ed752d29
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Mon Jan 07 22:48:01 2019 +0000
description:
add sysctl to easily set ubc_direct
PR kern/53124
diffstat:
sys/uvm/uvm_meter.c | 12 ++++++++++--
sys/uvm/uvm_page.h | 3 ++-
2 files changed, 12 insertions(+), 3 deletions(-)
diffs (50 lines):
diff -r d8434ab5e345 -r 1fc7ed752d29 sys/uvm/uvm_meter.c
--- a/sys/uvm/uvm_meter.c Mon Jan 07 22:35:55 2019 +0000
+++ b/sys/uvm/uvm_meter.c Mon Jan 07 22:48:01 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_meter.c,v 1.68 2018/09/03 16:29:37 riastradh Exp $ */
+/* $NetBSD: uvm_meter.c,v 1.69 2019/01/07 22:48:01 jdolecek Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_meter.c,v 1.68 2018/09/03 16:29:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_meter.c,v 1.69 2019/01/07 22:48:01 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -295,6 +295,14 @@
SYSCTL_DESCR("Guard size of other threads"),
NULL, 0, &user_thread_stack_guard_size, 0,
CTL_VM, VM_THREAD_GUARD_SIZE, CTL_EOL);
+#ifdef PMAP_DIRECT
+ sysctl_createv(clog, 0, NULL, NULL,
+ CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+ CTLTYPE_BOOL, "ubc_direct",
+ SYSCTL_DESCR("Use direct map for UBC I/O"),
+ NULL, 0, &ubc_direct, 0,
+ CTL_VM, CTL_CREATE, CTL_EOL);
+#endif
uvmpdpol_sysctlsetup();
}
diff -r d8434ab5e345 -r 1fc7ed752d29 sys/uvm/uvm_page.h
--- a/sys/uvm/uvm_page.h Mon Jan 07 22:35:55 2019 +0000
+++ b/sys/uvm/uvm_page.h Mon Jan 07 22:48:01 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_page.h,v 1.83 2018/05/19 15:03:26 jdolecek Exp $ */
+/* $NetBSD: uvm_page.h,v 1.84 2019/01/07 22:48:01 jdolecek Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -337,6 +337,7 @@
paddr_t uvm_vm_page_to_phys(const struct vm_page *);
#if defined(PMAP_DIRECT)
+extern bool ubc_direct;
int uvm_direct_process(struct vm_page **, u_int, voff_t, vsize_t,
int (*)(void *, size_t, void *), void *);
#endif
Home |
Main Index |
Thread Index |
Old Index