1.\" $NetBSD: rumpkernel.7,v 1.5 2023/07/15 20:00:11 lukem Exp $ 2.\" 3.\" Copyright (c) 2008-2014 Antti Kantee. All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.Dd July 15, 2023 27.Dt RUMPKERNEL 7 28.Os 29.Sh NAME 30.Nm rump kernel 31.Nd The Anykernel and Rump Kernels 32.Sh DESCRIPTION 33Rump kernels provide portable, componentized, kernel quality drivers 34such as file systems, POSIX system call handlers, PCI device drivers, a 35SCSI protocol stack, virtio and a TCP/IP stack. 36The fundamental enabling technology is the anykernel architecture of 37.Nx , 38which enables the use of unmodified 39.Nx 40kernel drivers. 41The minimalistic 42.Xr rumpuser 3 43interface integrates a rump kernel to the host platform. 44Suitable and readily supported platforms include for example POSIX 45userspace (such as 46.Nx ) , 47hypervisors (such as Xen and KVM), and bare metal hardware. 48.Pp 49Rump kernels are component-oriented, which means that they consist 50of libraries which are linked together to form runtime images. 51If the platform supports it, dynamic linking may be used to load 52components at runtime, allowing the creation of services where the 53runtime component configuration is specified when the service is run (see 54.Xr rump_server 1 55for an example). 56.Pp 57A rump kernel provides its own set of namespaces, such as a file system 58hierarchy and TCP ports, that are independent of the ones on the host 59and of any other rump kernel instances. 60It should be noted that the presence of the provided namespaces 61depends on the components that the rump kernel was constructed with. 62For example, networking and file systems are components, and it is 63possible to construct a rump kernel which supports neither. 64.Pp 65A rump kernel accepts the following bootstrap parameters. 66The exact way of specifying the parameters depends on the host 67platform; for example in POSIX userspace the parameters are 68environment variables. 69.Bl -tag -width RUMP_MEMLIMITXX 70.It Dv RUMP_NCPU 71If set, the value indicates the number of virtual cores configured into a 72rump kernel, i.e. the number of threads which can be concurrently 73executing code inside the rump kernel. 74.Pp 75The special value "host" can be used to specify the number of 76of host cores available (note: not available on all platforms). 77If this parameter is unset, two cores will be configured. 78.It Dv RUMP_VERBOSE 79If set to non-zero, causes bootstrap messages to be displayed on the 80console. 81.It Dv RUMP_MEMLIMIT 82If set, indicates the maximum amount of memory that a rump kernel will 83attempt to allocate from the host. 84If this parameter is unset, the rump kernel attempt to allocate 85host memory until allocation fails. 86When the rump kernel is close to the allocation limit, or when host 87allocation fails, the rump kernel will attempt to make more memory 88available by invoking its internal pagedaemon to flush caches. 89.El 90.Sh SEE ALSO 91.Lk https://rumpkernel.github.io 92.Rs 93.%A Antti Kantee 94.%A Justin Cormack 95.%T "Rump Kernels: No OS? No Problem!" 96.%D October 2014 97.%I USENIX 98.%J ;login: 99.%N No. 5 100.%V Vol. 39 101.Re 102.Rs 103.%A Antti Kantee 104.%D 2012 105.%J Aalto University Doctoral Dissertations 106.%T Flexible Operating System Internals: The Design and Implementation of the Anykernel and Rump Kernels 107.Re 108.Rs 109.%A Antti Kantee 110.%D March 2010 111.%B Proceedings of AsiaBSDCon 2010 112.%P pp. 75-84 113.%T Rump Device Drivers: Shine On You Kernel Diamond 114.Re 115.Rs 116.%A Arnaud Ysmal 117.%A Antti Kantee 118.%D September 2009 119.%B EuroBSDCon 2009 120.%T Fs-utils: File Systems Access Tools for Userland 121.Re 122.Rs 123.%A Antti Kantee 124.%D June 2009 125.%B Proceedings of the 2009 USENIX Annual Technical Conference 126.%P pp. 201-214 127.%T Rump File Systems: Kernel Code Reborn 128.Re 129.Rs 130.%A Antti Kantee 131.%D May 2009 132.%B BSDCan 2009 133.%T Kernel Development in Userspace - The Rump Approach 134.Re 135.Rs 136.%A Antti Kantee 137.%D March 2009 138.%B Proceedings of AsiaBSDCon 2009 139.%P pp. 71-80 140.%T Environmental Independence: BSD Kernel TCP/IP in Userspace 141.Re 142.Sh HISTORY 143An experimental concept for the anykernel and rump kernels was first seen 144during the 145.Nx 5.0 146development cycle. 147A stable concept was ready for 148.Nx 6.0 . 149