Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/rump_allserver add command line options for kernel m...
details: https://anonhg.NetBSD.org/src/rev/4848ff27d318
branches: trunk
changeset: 762482:4848ff27d318
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Feb 21 18:50:21 2011 +0000
description:
add command line options for kernel memory allocation limit and bootverbose
diffstat:
usr.bin/rump_allserver/rump_allserver.1 | 20 ++++++++++++++++++--
usr.bin/rump_allserver/rump_allserver.c | 12 +++++++++---
2 files changed, 27 insertions(+), 5 deletions(-)
diffs (97 lines):
diff -r a1901ffa668e -r 4848ff27d318 usr.bin/rump_allserver/rump_allserver.1
--- a/usr.bin/rump_allserver/rump_allserver.1 Mon Feb 21 18:12:26 2011 +0000
+++ b/usr.bin/rump_allserver/rump_allserver.1 Mon Feb 21 18:50:21 2011 +0000
@@ -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 ,
diff -r a1901ffa668e -r 4848ff27d318 usr.bin/rump_allserver/rump_allserver.c
--- a/usr.bin/rump_allserver/rump_allserver.c Mon Feb 21 18:12:26 2011 +0000
+++ b/usr.bin/rump_allserver/rump_allserver.c Mon Feb 21 18:50:21 2011 +0000
@@ -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*/
Home |
Main Index |
Thread Index |
Old Index