Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/yamt-pagecache]: src/sys/uvm create a sysctl knob to turn on/off loaned ...
details: https://anonhg.NetBSD.org/src/rev/f866e864b47b
branches: yamt-pagecache
changeset: 770858:f866e864b47b
user: yamt <yamt%NetBSD.org@localhost>
date: Wed Jan 11 00:08:40 2012 +0000
description:
create a sysctl knob to turn on/off loaned read.
diffstat:
sys/uvm/uvm_extern.h | 4 +++-
sys/uvm/uvm_loan.c | 8 ++++----
sys/uvm/uvm_meter.c | 10 ++++++++--
3 files changed, 15 insertions(+), 7 deletions(-)
diffs (85 lines):
diff -r 70541da42d2e -r f866e864b47b sys/uvm/uvm_extern.h
--- a/sys/uvm/uvm_extern.h Wed Jan 04 16:43:37 2012 +0000
+++ b/sys/uvm/uvm_extern.h Wed Jan 11 00:08:40 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_extern.h,v 1.176.2.6 2011/12/26 16:03:10 yamt Exp $ */
+/* $NetBSD: uvm_extern.h,v 1.176.2.7 2012/01/11 00:08:40 yamt Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -504,6 +504,8 @@
extern struct uvmexp uvmexp;
/* MD code needs this without including <uvm/uvm.h> */
extern bool vm_page_zero_enable;
+
+extern bool vm_loan_read;
#endif
/*
diff -r 70541da42d2e -r f866e864b47b sys/uvm/uvm_loan.c
--- a/sys/uvm/uvm_loan.c Wed Jan 04 16:43:37 2012 +0000
+++ b/sys/uvm/uvm_loan.c Wed Jan 11 00:08:40 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_loan.c,v 1.81.2.9 2012/01/04 16:31:17 yamt Exp $ */
+/* $NetBSD: uvm_loan.c,v 1.81.2.10 2012/01/11 00:08:41 yamt Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_loan.c,v 1.81.2.9 2012/01/04 16:31:17 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_loan.c,v 1.81.2.10 2012/01/11 00:08:41 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -42,7 +42,7 @@
#include <uvm/uvm.h>
-bool doloanobj = true;
+bool vm_loan_read = true;
/*
* "loaned" pages are pages which are (read-only, copy-on-write) loaned
@@ -1304,7 +1304,7 @@
size_t len;
int i, error = 0;
- if (!doloanobj) {
+ if (!vm_loan_read) {
return ENOSYS;
}
diff -r 70541da42d2e -r f866e864b47b sys/uvm/uvm_meter.c
--- a/sys/uvm/uvm_meter.c Wed Jan 04 16:43:37 2012 +0000
+++ b/sys/uvm/uvm_meter.c Wed Jan 11 00:08:40 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_meter.c,v 1.56.4.6 2011/12/26 16:03:11 yamt Exp $ */
+/* $NetBSD: uvm_meter.c,v 1.56.4.7 2012/01/11 00:08:41 yamt 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.56.4.6 2011/12/26 16:03:11 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_meter.c,v 1.56.4.7 2012/01/11 00:08:41 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -322,6 +322,12 @@
SYSCTL_DESCR("Whether try to zero pages in idle loop"),
NULL, 0, &vm_page_zero_enable, 0,
CTL_VM, CTL_CREATE, CTL_EOL);
+ sysctl_createv(clog, 0, NULL, NULL,
+ CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+ CTLTYPE_BOOL, "loanread",
+ SYSCTL_DESCR("Use page loaning for read"),
+ NULL, 0, &vm_loan_read, 0,
+ CTL_VM, CTL_CREATE, CTL_EOL);
uvmpdpol_sysctlsetup();
}
Home |
Main Index |
Thread Index |
Old Index