Source-Changes-HG archive

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

[src/trunk]: src/sys/rump Since "physmem" is largely unused except for zfs wa...



details:   https://anonhg.NetBSD.org/src/rev/8b64e315192a
branches:  trunk
changeset: 761230:8b64e315192a
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Jan 21 13:11:03 2011 +0000

description:
Since "physmem" is largely unused except for zfs wanting to know
if it has enough memory available, just pick a number which makes
zfs happy.

We *could* use a MIN() of available host mem and rump_memlimit,
though ...

diffstat:

 sys/rump/fs/lib/libzfs/Makefile  |   3 +--
 sys/rump/librump/rumpkern/emul.c |  18 ++++++++++++++----
 2 files changed, 15 insertions(+), 6 deletions(-)

diffs (59 lines):

diff -r c05f73f7e367 -r 8b64e315192a sys/rump/fs/lib/libzfs/Makefile
--- a/sys/rump/fs/lib/libzfs/Makefile   Fri Jan 21 13:08:42 2011 +0000
+++ b/sys/rump/fs/lib/libzfs/Makefile   Fri Jan 21 13:11:03 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.1 2011/01/18 22:21:23 haad Exp $
+#      $NetBSD: Makefile,v 1.2 2011/01/21 13:11:04 pooka Exp $
 #
 
 S!=             cd ${.PARSEDIR}/../../../../;pwd
@@ -10,7 +10,6 @@
 # RUMP stuff
 CPPFLAGS+=      -I${RUMPTOP}/librump/rumpkern -I${RUMPTOP}/librump/rumpvfs\
                -I${RUMPTOP}/librump/rumpdev
-SRCS+= component.c
 
 
 .include <bsd.lib.mk>
diff -r c05f73f7e367 -r 8b64e315192a sys/rump/librump/rumpkern/emul.c
--- a/sys/rump/librump/rumpkern/emul.c  Fri Jan 21 13:08:42 2011 +0000
+++ b/sys/rump/librump/rumpkern/emul.c  Fri Jan 21 13:11:03 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: emul.c,v 1.148 2011/01/06 11:22:55 pooka Exp $ */
+/*     $NetBSD: emul.c,v 1.149 2011/01/21 13:11:03 pooka Exp $ */
 
 /*
  * Copyright (c) 2007 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.148 2011/01/06 11:22:55 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.149 2011/01/21 13:11:03 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/null.h>
@@ -62,11 +62,21 @@
 
 #include "rump_private.h"
 
+/*
+ * physmem is largely unused (except for nmbcluster calculations),
+ * so pick a default value which suits ZFS.  if an application wants
+ * a very small memory footprint, it can still adjust this before
+ * calling rump_init()
+ */
+#define PHYSMEM 512*256
+int physmem = PHYSMEM;
+int nkmempages = PHYSMEM/2; /* from le chapeau */
+#undef PHYSMEM
+
 struct lwp lwp0;
 struct vnode *rootvp;
 dev_t rootdev = NODEV;
-int physmem = 256*256; /* 256 * 1024*1024 / 4k, PAGE_SIZE not always set */
-int nkmempages = 256*256/2; /* from le chapeau */
+
 const int schedppq = 1;
 int hardclock_ticks;
 bool mp_online = false;



Home | Main Index | Thread Index | Old Index