xref: /netbsd-src/sys/rump/share/man/man7/rumpkernel.7 (revision 8d687a3cf96057811dc6ad89624f4de68bb63229)
1*8d687a3cSlukem.\"     $NetBSD: rumpkernel.7,v 1.5 2023/07/15 20:00:11 lukem Exp $
24c9416f8Spooka.\"
34c9416f8Spooka.\" Copyright (c) 2008-2014 Antti Kantee.  All rights reserved.
44c9416f8Spooka.\"
54c9416f8Spooka.\" Redistribution and use in source and binary forms, with or without
64c9416f8Spooka.\" modification, are permitted provided that the following conditions
74c9416f8Spooka.\" are met:
84c9416f8Spooka.\" 1. Redistributions of source code must retain the above copyright
94c9416f8Spooka.\"    notice, this list of conditions and the following disclaimer.
104c9416f8Spooka.\" 2. Redistributions in binary form must reproduce the above copyright
114c9416f8Spooka.\"    notice, this list of conditions and the following disclaimer in the
124c9416f8Spooka.\"    documentation and/or other materials provided with the distribution.
134c9416f8Spooka.\"
144c9416f8Spooka.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
154c9416f8Spooka.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
164c9416f8Spooka.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
174c9416f8Spooka.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
184c9416f8Spooka.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
194c9416f8Spooka.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
204c9416f8Spooka.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
214c9416f8Spooka.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
224c9416f8Spooka.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
234c9416f8Spooka.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
244c9416f8Spooka.\" SUCH DAMAGE.
254c9416f8Spooka.\"
26918835f5Slukem.Dd July 15, 2023
274c9416f8Spooka.Dt RUMPKERNEL 7
284c9416f8Spooka.Os
294c9416f8Spooka.Sh NAME
304c9416f8Spooka.Nm rump kernel
314c9416f8Spooka.Nd The Anykernel and Rump Kernels
324c9416f8Spooka.Sh DESCRIPTION
334c9416f8SpookaRump kernels provide portable, componentized, kernel quality drivers
344c9416f8Spookasuch as file systems, POSIX system call handlers, PCI device drivers, a
354c9416f8SpookaSCSI protocol stack, virtio and a TCP/IP stack.
364c9416f8SpookaThe fundamental enabling technology is the anykernel architecture of
374c9416f8Spooka.Nx ,
384c9416f8Spookawhich enables the use of unmodified
394c9416f8Spooka.Nx
404c9416f8Spookakernel drivers.
414c9416f8SpookaThe minimalistic
424c9416f8Spooka.Xr rumpuser 3
434c9416f8Spookainterface integrates a rump kernel to the host platform.
444c9416f8SpookaSuitable and readily supported platforms include for example POSIX
45f497467aSwizuserspace (such as
46f497467aSwiz.Nx ) ,
47f497467aSwizhypervisors (such as Xen and KVM), and bare metal hardware.
484c9416f8Spooka.Pp
494c9416f8SpookaRump kernels are component-oriented, which means that they consist
504c9416f8Spookaof libraries which are linked together to form runtime images.
514c9416f8SpookaIf the platform supports it, dynamic linking may be used to load
524c9416f8Spookacomponents at runtime, allowing the creation of services where the
534c9416f8Spookaruntime component configuration is specified when the service is run (see
544c9416f8Spooka.Xr rump_server 1
554c9416f8Spookafor an example).
564c9416f8Spooka.Pp
574c9416f8SpookaA rump kernel provides its own set of namespaces, such as a file system
584c9416f8Spookahierarchy and TCP ports, that are independent of the ones on the host
594c9416f8Spookaand of any other rump kernel instances.
604c9416f8SpookaIt should be noted that the presence of the provided namespaces
614c9416f8Spookadepends on the components that the rump kernel was constructed with.
624c9416f8SpookaFor example, networking and file systems are components, and it is
634c9416f8Spookapossible to construct a rump kernel which supports neither.
644c9416f8Spooka.Pp
654c9416f8SpookaA rump kernel accepts the following bootstrap parameters.
664c9416f8SpookaThe exact way of specifying the parameters depends on the host
674c9416f8Spookaplatform; for example in POSIX userspace the parameters are
684c9416f8Spookaenvironment variables.
694c9416f8Spooka.Bl -tag -width RUMP_MEMLIMITXX
704c9416f8Spooka.It Dv RUMP_NCPU
714c9416f8SpookaIf set, the value indicates the number of virtual cores configured into a
724c9416f8Spookarump kernel, i.e. the number of threads which can be concurrently
734c9416f8Spookaexecuting code inside the rump kernel.
744c9416f8Spooka.Pp
754c9416f8SpookaThe special value "host" can be used to specify the number of
764c9416f8Spookaof host cores available (note: not available on all platforms).
774c9416f8SpookaIf this parameter is unset, two cores will be configured.
784c9416f8Spooka.It Dv RUMP_VERBOSE
794c9416f8SpookaIf set to non-zero, causes bootstrap messages to be displayed on the
804c9416f8Spookaconsole.
814c9416f8Spooka.It Dv RUMP_MEMLIMIT
824c9416f8SpookaIf set, indicates the maximum amount of memory that a rump kernel will
834c9416f8Spookaattempt to allocate from the host.
844c9416f8SpookaIf this parameter is unset, the rump kernel attempt to allocate
854c9416f8Spookahost memory until allocation fails.
864c9416f8SpookaWhen the rump kernel is close to the allocation limit, or when host
874c9416f8Spookaallocation fails, the rump kernel will attempt to make more memory
884c9416f8Spookaavailable by invoking its internal pagedaemon to flush caches.
894c9416f8Spooka.El
904c9416f8Spooka.Sh SEE ALSO
91*8d687a3cSlukem.Lk https://rumpkernel.github.io
924c9416f8Spooka.Rs
934c9416f8Spooka.%A Antti Kantee
944c9416f8Spooka.%A Justin Cormack
95401c4cd7Spooka.%T "Rump Kernels: No OS? No Problem!"
964c9416f8Spooka.%D October 2014
974c9416f8Spooka.%I USENIX
984c9416f8Spooka.%J ;login:
994c9416f8Spooka.%N No. 5
1004c9416f8Spooka.%V Vol. 39
1014c9416f8Spooka.Re
1024c9416f8Spooka.Rs
1034c9416f8Spooka.%A Antti Kantee
1044c9416f8Spooka.%D 2012
1054c9416f8Spooka.%J Aalto University Doctoral Dissertations
1064c9416f8Spooka.%T Flexible Operating System Internals: The Design and Implementation of the Anykernel and Rump Kernels
1074c9416f8Spooka.Re
1084c9416f8Spooka.Rs
1094c9416f8Spooka.%A Antti Kantee
1104c9416f8Spooka.%D March 2010
1114c9416f8Spooka.%B Proceedings of AsiaBSDCon 2010
1124c9416f8Spooka.%P pp. 75-84
1134c9416f8Spooka.%T Rump Device Drivers: Shine On You Kernel Diamond
1144c9416f8Spooka.Re
1154c9416f8Spooka.Rs
1164c9416f8Spooka.%A Arnaud Ysmal
1174c9416f8Spooka.%A Antti Kantee
1184c9416f8Spooka.%D September 2009
1194c9416f8Spooka.%B EuroBSDCon 2009
1204c9416f8Spooka.%T Fs-utils: File Systems Access Tools for Userland
1214c9416f8Spooka.Re
1224c9416f8Spooka.Rs
1234c9416f8Spooka.%A Antti Kantee
1244c9416f8Spooka.%D June 2009
1254c9416f8Spooka.%B Proceedings of the 2009 USENIX Annual Technical Conference
1264c9416f8Spooka.%P pp. 201-214
1274c9416f8Spooka.%T Rump File Systems: Kernel Code Reborn
1284c9416f8Spooka.Re
1294c9416f8Spooka.Rs
1304c9416f8Spooka.%A Antti Kantee
1314c9416f8Spooka.%D May 2009
1324c9416f8Spooka.%B BSDCan 2009
1334c9416f8Spooka.%T Kernel Development in Userspace - The Rump Approach
1344c9416f8Spooka.Re
1354c9416f8Spooka.Rs
1364c9416f8Spooka.%A Antti Kantee
1374c9416f8Spooka.%D March 2009
1384c9416f8Spooka.%B Proceedings of AsiaBSDCon 2009
1394c9416f8Spooka.%P pp. 71-80
1404c9416f8Spooka.%T Environmental Independence: BSD Kernel TCP/IP in Userspace
1414c9416f8Spooka.Re
1424c9416f8Spooka.Sh HISTORY
1434c9416f8SpookaAn experimental concept for the anykernel and rump kernels was first seen
1444c9416f8Spookaduring the
1454c9416f8Spooka.Nx 5.0
1464c9416f8Spookadevelopment cycle.
1474c9416f8SpookaA stable concept was ready for
1484c9416f8Spooka.Nx 6.0 .
149