xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Felipe Huici <Felipe.Huici@neclab.eu>,
	"committers@xenproject.org" <committers@xenproject.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"xen-api@lists.xenproject.org" <xen-api@lists.xenproject.org>,
	"mirageos-devel@lists.xenproject.org"
	<mirageos-devel@lists.xenproject.org>,
	"minios-devel@lists.xenproject.org"
	<minios-devel@lists.xenproject.org>
Cc: "julian.chesterfield@onapp.com" <julian.chesterfield@onapp.com>,
	"rshaposhnik@pivotal.io" <rshaposhnik@pivotal.io>,
	Lars Kurth <lars.kurth@citrix.com>,
	Saverio Niccolini <Saverio.Niccolini@neclab.eu>,
	"stefano@aporeto.com" <stefano@aporeto.com>,
	"alexander.dubinin@gmail.com" <alexander.dubinin@gmail.com>,
	"julien.grall@arm.com" <julien.grall@arm.com>,
	Simon Kuenzer <simon.kuenzer@neclab.eu>,
	"volodymyr_babchuk@epam.com" <volodymyr_babchuk@epam.com>
Subject: Re: [RFC] Unicore Subproject Proposal
Date: Thu, 7 Sep 2017 14:24:15 +0100	[thread overview]
Message-ID: <452a24eb-0d35-b45f-6e45-0363d60e82ea@citrix.com> (raw)
In-Reply-To: <D5D6EB26.39481%felipe.huici@neclab.eu>

On 07/09/17 11:25, Felipe Huici wrote:
> Background
> ----------
> In recent years, several papers and projects dedicated to unikernels have
> shown the immense potential for performance gains that these have. By
> leveraging specialization and the use of minimalistic OSes, unikernels are
> able to yield impressive numbers, including fast instantiation times (tens
> of milliseconds or less), tiny memory footprints (a few MBs or even KBs),
> high network throughput (10-40 Gb/s), and high consolidation (e.g., being
> able to run thousands of instances on a single commodity server), not to
> mention a reduced attack surface and the potential for easier
> certification. Unikernel projects worthy of mention include MirageOS,
> ClickOS, Erlang on Xen, OSv, HALVM, and Minicache, among others.
>
> The fundamental drawback of unikernels is that they require that
> applications be manually ported to the underlying minimalistic OS (e.g.
> having to port nginx, snort, mysql or memcached to MiniOS or OSv); this
> requires both expert work and often considerable amount of time. In
> essence, we need to pick between either high performance with unikernels,
> or no porting effort but decreased performance and decreased efficiency
> with standard OS/VM images. The goal of this proposal is to change this
> status quo by providing a highly configurable unikernel code base; we call
> this base Unicore.
>
> This project also aims to concentrate the various efforts currently going
> on in the Xen community regarding minimalistic OSes (essentially different
> variants of MiniOS). We think that splitting the community across these
> variants is counter-productive and hope that Unicore will provide a common
> place for all or most improvements and customizations of minimalistic
> OSes. The long term goal is to replace something like MiniOS with a tool
> that can automatically build such a minimalistic OS.

I thoroughly approve of a project along these lines.  Microkernels have
huge potential to offer, but they are sufficiently complicated to work
with that very few people can.

>
> Unicore - The "Unikernel Core"
> ---------------------------------
> The high level goal of Unicore is to be able to build unikernels targeted
> at specific applications without requiring the time-consuming, expert work
> that building such a unikernel requires today. An additional goal (or
> hope) of Unicore is that all developers interested in unikernel
> development would contribute by supplying libraries rather than working on
> independent projects with different code bases as it is done now. The main
> idea behind Unicore is depicted in Figure 1 and consists of two basic
> components:

Have you encountered the netbsd rumpkernel project?  I don't it
referenced in your text (apologies if I've missed it).

http://events.linuxfoundation.org/sites/events/files/slides/xdps15-talk-final_0.pdf
is a presentation on from a previous Xen Developer Summit, and

One particular need build solution there was to not alter the build
system of the individual apps, and pass in the rest of the microkernel
as a cross-compile environment.  It's not entirely clear how you plan to
do this part of the building, but anything which involves modifying the
end applications is going to cause a non-trivial maintenance burden.

>  
>
> [Attachment: unicore-oneslider.pdf]
>
>
> Figure 1. Unicore architecture.
>
>  
> Library pools would contain libraries that the user of Unicore can select
> from to create the unikernel. From the bottom up, library pools are
> organized into (1) the architecture library tool, containing libraries
> specific to a computer architecture (e.g., x86_64, ARM32 or MIPS); (2) the
> platform tool, where target platforms can be Xen, KVM, bare metal (i.e. no
> virtualization) and user-space Linux;

On the x86 Xen side of things, you should treat PV and HVM guests as
different platforms, and their tradeoffs are quite different.

The one semi-supported microkernel in the Xen world is stub-qemu, and in
principle this does give better isolation than qemu running in dom0, but
it also exposes other attack surfaces.  If you assume an HVM guest has
compromised its stub-qemu, it means that security issues exposed only to
PV guests are within the reach of an HVM guest.  In this circumstance,
having an HVM stub qemu would give the system a reduced attack surface
compared to a PV stub qemu.

>  and (3) the main library pool,
> containing a rich set of functionality to build the unikernel from. This
> last library includes drivers (both virtual such as netback/netfront and
> physical such as ixgbe), filesystems, memory allocators, schedulers,
> network stacks, standard libs (e.g. libc, openssl, etc.), runtimes (e.g. a
> Python interpreter and debugging and profiling tools. These pools of
> libraries constitute a code base for creating unikernels. As shown, a
> library can be relatively large (e.g libc) or quite small (a scheduler),
> which should allow for a fair amount of customization for the unikernel.
>  
>
> The Unicore build tool is in charge of compiling the application and the
> selected libraries together to create a binary for a specific platform and
> architecture (e.g., Xen on x86_64). The tool is currently inspired by
> Linux’s kconfig system and consists of a set of Makefiles. It allows users
> to select libraries, to configure them, and to warn them when library
> dependencies are not met. In addition, the tool can also simultaneously
> generate binaries for multiple platforms.
>
>  
> As an example, imagine a user wanting to generate a network driver domain
> unikernel. In this case, we would assume the “application” to be the
> netback driver. To select this application, the user would first run “make
> menuconfig” from within the netback application folder. The Makefile there
> would set a variable to indicate what the application is, and would
> include the main Unicore Makefiles so that the unikernel can be built
> (Step 1 in the figure). Using the menu-based system, the user chooses the
> relevant libraries; for a Xen driver domain this would include a physical
> network driver, the netback driver, the libxenplat library and a library
> from the architecture library pool such as libx86_64arch (Step 2 in the
> figure). With this in place, the user saves the configuration and types
> “make” to build the unikernel (Step 3) and xl create to run it (Step 4).
>
>  
> A note on the ABI/API: because Unicore allows for customization of the
> unikernels, the ABI (or API since there is no kernel) would be custom,
> that is, defined by the libraries the user selected. Having said that, it
> would be perfectly possible, for instance, to build POSIX-compliant
> unikernels with it.
>
>
> Relevance to Xen and its Community
> -----------------------------------
> Unikernels are important to a number of areas relevant to the Xen
> community, including IoT, automotive, stub domains and driver domain
> disaggregation. Unicore could help boost the progress in all of these
> areas by quickly providing the necessary tools to create  unikernels for
> them. For instance, for a driver domain, the user would include the
> “library” containing the relevant hardware driver and corresponding
> back-end driver, and in principle Unicore would take care of the rest.
>
> In addition, Unicore could eventually replace Mini-OS, providing a
> cleaner, more stable and flexible base from which to build unikernels for
> projects (the modularization of Mini-OS is in fact already taking place).
>
>
> Current Status
> --------------
> Unicore is at an early stage. For now it includes some base libraries with
> code extracted from Mini-OS as well as a build tool inspired by
> Linux's KConfig system. Unicore is currently able to build "hello world"
> unikernels for Xen and Linux user space on x86_64 and ARMv7.

Is the code anywhere to be played with?

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-09-07 13:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07 10:25 [RFC] Unicore Subproject Proposal Felipe Huici
2017-09-07 13:24 ` Andrew Cooper [this message]
2017-09-07 13:56   ` Lars Kurth
2017-09-07 21:28 ` Stefano Stabellini
2017-09-08  4:01 ` Roman Shaposhnik
     [not found] ` <alpine.DEB.2.10.1709071420150.4600@sstabellini-ThinkPad-X260>
2017-09-08  7:33   ` Felipe Huici
2017-09-08  9:31 ` Wei Liu
     [not found] ` <20170908093150.s36zcmir43eqtblq@citrix.com>
2017-09-08  9:46   ` [Minios-devel] " Samuel Thibault
2017-09-08 15:22     ` Simon Kuenzer
     [not found] <D5D6EB26.39481%felipe.huici@neclab.eu-0>
2017-09-07 13:41 ` Lars Kurth
2017-09-07 21:16   ` Stefano Stabellini
     [not found]   ` <alpine.DEB.2.10.1709071414310.4600@sstabellini-ThinkPad-X260>
2017-09-08 11:00     ` Lars Kurth
2017-09-08 12:31       ` Felipe Huici
2017-09-10 20:48         ` Alexander Dubinin
2017-09-11 12:08           ` Simon Kuenzer
2017-09-13  8:36             ` Alexander Dubinin
2017-09-15 13:01               ` Simon Kuenzer
2017-09-13 16:55             ` Lars Kurth
     [not found]             ` <3B0A2B25-6A6A-4DE9-845C-E56812B97F92@citrix.com>
2017-09-15  8:50               ` Simon Kuenzer
2017-09-18  9:16               ` Felipe Huici
2017-09-19 22:56                 ` Stefano Stabellini
     [not found]               ` <D5E553D1.39F25%felipe.huici@neclab.eu-0>
2017-09-20 21:24                 ` Lars Kurth
2017-09-20  0:20 ` Lars Kurth
     [not found] ` <776E12BC-8D5A-4B90-AF99-BFDDEBEECCE4@citrix.com>
2017-09-20  0:30   ` Stefano Stabellini
2017-09-20  7:30   ` Felipe Huici

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=452a24eb-0d35-b45f-6e45-0363d60e82ea@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Felipe.Huici@neclab.eu \
    --cc=Saverio.Niccolini@neclab.eu \
    --cc=alexander.dubinin@gmail.com \
    --cc=committers@xenproject.org \
    --cc=julian.chesterfield@onapp.com \
    --cc=julien.grall@arm.com \
    --cc=lars.kurth@citrix.com \
    --cc=minios-devel@lists.xenproject.org \
    --cc=mirageos-devel@lists.xenproject.org \
    --cc=rshaposhnik@pivotal.io \
    --cc=simon.kuenzer@neclab.eu \
    --cc=stefano@aporeto.com \
    --cc=volodymyr_babchuk@epam.com \
    --cc=xen-api@lists.xenproject.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).