Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib Change the default value of rump kernels CPUs to 2. It ...
details: https://anonhg.NetBSD.org/src/rev/bf10c4d9fb2d
branches: trunk
changeset: 789310:bf10c4d9fb2d
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Aug 14 08:29:25 2013 +0000
description:
Change the default value of rump kernels CPUs to 2. It used to be
the number of host cores, but that value is overkill for most uses,
especially with massively multicore hosts. Dozens of useless virtual
CPUs are relatively speaking expensive in terms of bootstrap time and
memory footprint. On the other end of the spectrum, defaulting to 2
might shake out some bugs from the qemu test runs.
diffstat:
lib/librump/rump.3 | 17 ++++++++---------
lib/librumpuser/rumpuser.c | 6 ++++--
2 files changed, 12 insertions(+), 11 deletions(-)
diffs (68 lines):
diff -r dd1a66398483 -r bf10c4d9fb2d lib/librump/rump.3
--- a/lib/librump/rump.3 Wed Aug 14 01:53:27 2013 +0000
+++ b/lib/librump/rump.3 Wed Aug 14 08:29:25 2013 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: rump.3,v 1.14 2013/07/20 21:39:57 wiz Exp $
+.\" $NetBSD: rump.3,v 1.15 2013/08/14 08:29:26 pooka Exp $
.\"
.\" Copyright (c) 2008-2011 Antti Kantee. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd May 2, 2013
+.Dd July 14, 2013
.Dt RUMP 3
.Os
.Sh NAME
@@ -76,16 +76,15 @@
.Pp
A rump kernel is bootstrapped by calling
.Fn rump_init .
-A number of environment variables set before a rump kernel is bootstrapped
-will affect how it works.
-Some examples include:
+On a POSIX Host, environment variables can be used to adjust some
+operating parameters:
.Bl -tag -width RUMP_MEMLIMITXX
.It Dv RUMP_NCPU
-If set, indicates the number of virtual CPUs configured into a
+If set, the number indicates the number of virtual CPUs configured into a
rump kernel.
-The default is the number of host CPUs.
-The number of virtual CPUs controls how many threads can enter
-the rump kernel simultaneously.
+The special value "host" can be used to specify the number of
+of host CPUs available.
+If the value is unset, two CPUs will be configured.
.It Dv RUMP_VERBOSE
If set to non-zero, activates bootverbose.
.It Dv RUMP_THREADS
diff -r dd1a66398483 -r bf10c4d9fb2d lib/librumpuser/rumpuser.c
--- a/lib/librumpuser/rumpuser.c Wed Aug 14 01:53:27 2013 +0000
+++ b/lib/librumpuser/rumpuser.c Wed Aug 14 08:29:25 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpuser.c,v 1.53 2013/05/15 15:57:01 pooka Exp $ */
+/* $NetBSD: rumpuser.c,v 1.54 2013/08/14 08:29:25 pooka Exp $ */
/*
* Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
#include "rumpuser_port.h"
#if !defined(lint)
-__RCSID("$NetBSD: rumpuser.c,v 1.53 2013/05/15 15:57:01 pooka Exp $");
+__RCSID("$NetBSD: rumpuser.c,v 1.54 2013/08/14 08:29:25 pooka Exp $");
#endif /* !lint */
#include <sys/ioctl.h>
@@ -572,6 +572,8 @@
int ncpu;
if (getenv_r("RUMP_NCPU", buf, blen) == -1) {
+ sprintf(buf, "2"); /* default */
+ } else if (strcmp(buf, "host") == 0) {
ncpu = gethostncpu();
snprintf(buf, blen, "%d", ncpu);
}
Home |
Main Index |
Thread Index |
Old Index