Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/include only limit bottom-up allocations, put ...



details:   https://anonhg.NetBSD.org/src/rev/05265639dee3
branches:  trunk
changeset: 326410:05265639dee3
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jan 28 17:46:01 2014 +0000

description:
only limit bottom-up allocations, put back 3G limit on datasize.

diffstat:

 sys/arch/i386/include/vmparam.h |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 910b4ca76800 -r 05265639dee3 sys/arch/i386/include/vmparam.h
--- a/sys/arch/i386/include/vmparam.h   Tue Jan 28 17:32:00 2014 +0000
+++ b/sys/arch/i386/include/vmparam.h   Tue Jan 28 17:46:01 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.78 2014/01/28 02:51:34 christos Exp $    */
+/*     $NetBSD: vmparam.h,v 1.79 2014/01/28 17:46:01 christos Exp $    */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -68,8 +68,12 @@
 #define        DFLDSIZ         (256*1024*1024)         /* initial data size limit */
 #endif
 #ifndef MAXDSIZ
-#define        MAXDSIZ         (2U*1024*1024*1024 + \
-                        1U* 512*1024*1024)     /* 2.5G max data size */
+#define        MAXDSIZ         (3U*1024*1024*1024)     /* 3G max data size */
+#endif
+#ifndef MAXDSIZ_BU
+#define        MAXDSIZ_BU      (2U*1024*1024*1024 +    /* 2.5G max data size for */ \
+                        1U* 512*1024*1024)     /* bottom-up allocation */ \
+                                               /* could be a bit more */
 #endif
 #ifndef        DFLSSIZ
 #define        DFLSSIZ         (2*1024*1024)           /* initial stack size limit */
@@ -114,7 +118,7 @@
 #define VM_DEFAULT_ADDRESS_TOPDOWN(da, sz) \
     trunc_page(USRSTACK - MAXSSIZ - (sz))
 #define VM_DEFAULT_ADDRESS_BOTTOMUP(da, sz) \
-    round_page((vaddr_t)(da) + (vsize_t)maxdmap)
+    round_page((vaddr_t)(da) + (vsize_t)MIN(maxdmap, MAXDSIZ_BU))
 
 /* XXX max. amount of KVM to be used by buffers. */
 #ifndef VM_MAX_KERNEL_BUF



Home | Main Index | Thread Index | Old Index