Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm Allow changing the per-cpu emergency page reservatio...



details:   https://anonhg.NetBSD.org/src/rev/e4c6396579fa
branches:  trunk
changeset: 337334:e4c6396579fa
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Apr 11 19:24:13 2015 +0000

description:
Allow changing the per-cpu emergency page reservation via kernel config.

diffstat:

 sys/uvm/files.uvm  |   4 ++--
 sys/uvm/uvm_page.c |  10 +++++++---
 2 files changed, 9 insertions(+), 5 deletions(-)

diffs (49 lines):

diff -r 58e2fa01bde8 -r e4c6396579fa sys/uvm/files.uvm
--- a/sys/uvm/files.uvm Sat Apr 11 16:47:47 2015 +0000
+++ b/sys/uvm/files.uvm Sat Apr 11 19:24:13 2015 +0000
@@ -1,10 +1,10 @@
-#      $NetBSD: files.uvm,v 1.22 2014/10/10 09:01:01 uebayasi Exp $
+#      $NetBSD: files.uvm,v 1.23 2015/04/11 19:24:13 joerg Exp $
 
 #
 # UVM options
 # 
 defflag opt_uvmhist.h          UVMHIST UVMHIST_PRINT: KERNHIST
-defflag opt_uvm.h              USE_TOPDOWN_VM UVMMAP_COUNTERS
+defflag opt_uvm.h              USE_TOPDOWN_VM UVMMAP_COUNTERS UVM_RESERVED_PAGES_PER_CPU
 defflag opt_vmswap.h           VMSWAP
 defflag opt_readahead.h                READAHEAD_STATS
 defflag opt_ubc.h              UBC_STATS
diff -r 58e2fa01bde8 -r e4c6396579fa sys/uvm/uvm_page.c
--- a/sys/uvm/uvm_page.c        Sat Apr 11 16:47:47 2015 +0000
+++ b/sys/uvm/uvm_page.c        Sat Apr 11 19:24:13 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_page.c,v 1.186 2014/09/05 05:36:21 matt Exp $      */
+/*     $NetBSD: uvm_page.c,v 1.187 2015/04/11 19:24:13 joerg Exp $     */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,9 +66,10 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.186 2014/09/05 05:36:21 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.187 2015/04/11 19:24:13 joerg Exp $");
 
 #include "opt_ddb.h"
+#include "opt_uvm.h"
 #include "opt_uvmhist.h"
 #include "opt_readahead.h"
 
@@ -107,7 +108,10 @@
 /*
  * number of pages per-CPU to reserve for the kernel.
  */
-int vm_page_reserve_kernel = 5;
+#ifndef        UVM_RESERVED_PAGES_PER_CPU
+#define        UVM_RESERVED_PAGES_PER_CPU      5
+#endif
+int vm_page_reserve_kernel = UVM_RESERVED_PAGES_PER_CPU;
 
 /*
  * physical memory size;



Home | Main Index | Thread Index | Old Index