Module Name: src Committed By: pooka Date: Mon Feb 21 18:50:22 UTC 2011
Modified Files: src/usr.bin/rump_allserver: rump_allserver.1 rump_allserver.c Log Message: add command line options for kernel memory allocation limit and bootverbose To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.bin/rump_allserver/rump_allserver.1 cvs rdiff -u -r1.19 -r1.20 src/usr.bin/rump_allserver/rump_allserver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/rump_allserver/rump_allserver.1 diff -u src/usr.bin/rump_allserver/rump_allserver.1:1.15 src/usr.bin/rump_allserver/rump_allserver.1:1.16 --- src/usr.bin/rump_allserver/rump_allserver.1:1.15 Fri Feb 18 09:54:03 2011 +++ src/usr.bin/rump_allserver/rump_allserver.1 Mon Feb 21 18:50:21 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: rump_allserver.1,v 1.15 2011/02/18 09:54:03 pooka Exp $ +.\" $NetBSD: rump_allserver.1,v 1.16 2011/02/21 18:50:21 pooka Exp $ .\" .\" Copyright (c) 2010 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 February 17, 2011 +.Dd February 21, 2011 .Dt RUMP_SERVER 1 .Os .Sh NAME @@ -159,12 +159,23 @@ For this to work, the rump kernel must include the vfs faction, since the module is loaded using kernel vfs code (see .Sx EXAMPLES ) . +.It Fl r Ar total_ram +Sets the limit of kernel memory allocatable by the server to +.Ar total_ram +as opposed to the default which allows the server to allocate as much +memory as the host will give it. +This parameter is especially useful for VFS servers, since by +default the virtual file system will attempt to consume as much +memory as it can, and accessing large files can cause an excessive +amount of memory to be used as file system cache. .It Fl s Do not detach from the terminal. By default, .Nm detaches from the terminal once the service is running on .Ar url . +.It Fl v +Set bootverbose. .El .Pp After use, @@ -192,6 +203,11 @@ .Bd -literal -offset indent $ rump_server tcp://0:3755/ .Ed +.Pp +Start a FFS server with a 16MB kernel memory limit. +.Bd -literal -offset indent +$ rump_server -lrumpvfs -lrumpfs_ffs -r 16m unix:///tmp/ffs_server +.Ed .Sh SEE ALSO .Xr rump.halt 1 , .Xr dlopen 3 , Index: src/usr.bin/rump_allserver/rump_allserver.c diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.19 src/usr.bin/rump_allserver/rump_allserver.c:1.20 --- src/usr.bin/rump_allserver/rump_allserver.c:1.19 Fri Feb 18 09:54:03 2011 +++ src/usr.bin/rump_allserver/rump_allserver.c Mon Feb 21 18:50:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_allserver.c,v 1.19 2011/02/18 09:54:03 pooka Exp $ */ +/* $NetBSD: rump_allserver.c,v 1.20 2011/02/21 18:50:21 pooka Exp $ */ /*- * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: rump_allserver.c,v 1.19 2011/02/18 09:54:03 pooka Exp $"); +__RCSID("$NetBSD: rump_allserver.c,v 1.20 2011/02/21 18:50:21 pooka Exp $"); #endif /* !lint */ #include <sys/types.h> @@ -126,7 +126,7 @@ setprogname(argv[0]); sflag = 0; - while ((ch = getopt(argc, argv, "c:d:l:m:s")) != -1) { + while ((ch = getopt(argc, argv, "c:d:l:m:r:sv")) != -1) { switch (ch) { case 'c': ncpu = atoi(optarg); @@ -299,9 +299,15 @@ } modarray[curmod++] = optarg; break; + case 'r': + setenv("RUMP_MEMLIMIT", optarg, 1); + break; case 's': sflag = 1; break; + case 'v': + setenv("RUMP_VERBOSE", "1", 1); + break; default: usage(); /*NOTREACHED*/