Module Name: src Committed By: pooka Date: Wed Aug 14 08:29:26 UTC 2013
Modified Files: src/lib/librump: rump.3 src/lib/librumpuser: rumpuser.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/librump/rump.3 cvs rdiff -u -r1.53 -r1.54 src/lib/librumpuser/rumpuser.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/librump/rump.3 diff -u src/lib/librump/rump.3:1.14 src/lib/librump/rump.3:1.15 --- src/lib/librump/rump.3:1.14 Sat Jul 20 21:39:57 2013 +++ src/lib/librump/rump.3 Wed Aug 14 08:29:26 2013 @@ -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 @@ communication medium. .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 Index: src/lib/librumpuser/rumpuser.c diff -u src/lib/librumpuser/rumpuser.c:1.53 src/lib/librumpuser/rumpuser.c:1.54 --- src/lib/librumpuser/rumpuser.c:1.53 Wed May 15 15:57:01 2013 +++ src/lib/librumpuser/rumpuser.c Wed Aug 14 08:29:25 2013 @@ -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 @@ rumpuser_getparam(const char *name, void 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); }