Message ID | 20221216221147.13945-1-marius@gnu.org |
---|---|
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0011D27BBE9; Fri, 16 Dec 2022 22:23:25 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 97E6927BBEB for <patchwork@mira.cbaines.net>; Fri, 16 Dec 2022 22:23:21 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1p6Iw1-000796-8p; Fri, 16 Dec 2022 17:12:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1p6Ivz-00074V-6I for guix-patches@gnu.org; Fri, 16 Dec 2022 17:12:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1p6Ivy-0006wT-UF for guix-patches@gnu.org; Fri, 16 Dec 2022 17:12:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1p6Ivy-0007OR-AV for guix-patches@gnu.org; Fri, 16 Dec 2022 17:12:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60129] [PATCH 0/2] VM-optimized Linux-Libre variant Resent-From: Marius Bakke <marius@gnu.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 16 Dec 2022 22:12:02 +0000 Resent-Message-ID: <handler.60129.B.167122871828411@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60129 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60129@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167122871828411 (code B ref -1); Fri, 16 Dec 2022 22:12:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Dec 2022 22:11:58 +0000 Received: from localhost ([127.0.0.1]:51814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1p6Ivt-0007OB-I5 for submit@debbugs.gnu.org; Fri, 16 Dec 2022 17:11:57 -0500 Received: from lists.gnu.org ([209.51.188.17]:52834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <marius@gnu.org>) id 1p6Ivr-0007O5-6O for submit@debbugs.gnu.org; Fri, 16 Dec 2022 17:11:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <marius@gnu.org>) id 1p6Ivp-0006rn-CF for guix-patches@gnu.org; Fri, 16 Dec 2022 17:11:54 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <marius@gnu.org>) id 1p6Ivn-0006tC-NT for guix-patches@gnu.org; Fri, 16 Dec 2022 17:11:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=k1kr2U+Jb7KAFuchqU/1fxUopmjVKyjcvhBGmlCMmJQ=; b=r4t8xt+i2F93oO PHTI8ynWBZ1p/qW4iFIzyWaAV05cKMHcP6YZXz+XZerbWGCfq+hiNf9+xG0QGk8A1/uTAcnuNAPED LC7lzWLA7PhULBhErTqTnPNCgndYstJSB5RMU1KRX0l6IYGkVIjOOPIfk9tNK1qzOafj+Oii2PT/H NlldY2P7sNEw8RSLRIxXqgPxRoEf3PQtnv8dF1OAeHQvu221YB9wLEOn62BLsCEzPZT2YTqa3ViC9 ll1VYhw8cEiwjuOWitydmX3gmVggbN3t1IeV5ZopNnx2TLbdc9/m35j4hBBGTVaoR93Z7WtOR/aRq CVSx4N8irYfAhulM/cdA==; Received: from [188.113.115.135] (helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <marius@gnu.org>) id 1p6Ivl-0004ec-OV for guix-patches@gnu.org; Fri, 16 Dec 2022 17:11:50 -0500 From: Marius Bakke <marius@gnu.org> Date: Fri, 16 Dec 2022 23:11:47 +0100 Message-Id: <20221216221147.13945-1-marius@gnu.org> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
VM-optimized Linux-Libre variant
|
|
Message
Marius Bakke
Dec. 16, 2022, 10:11 p.m. UTC
Hello Guix! This patch adds a kernel optimized for running inside a VM. It includes drivers for the popular hypervisors and not much else. Building it takes ~9 minutes on my machine (7,5 if we disable CONFIG_TRIM_UNUSED_KSYMS). The config was created by taking the linux-libre config and removing things that are generally useless in VMs: hardware drivers, firmware loading, sleep/hibernate, etc. The only drivers included are for various hypervisors, the ones required by our initrd[*], as well as popular emulated hardware (e1000, rtl8169, sound hardware supported by QEMU, etc). It's possible some things need to be re-added to support all the different VPS providers out there. The kernel is tailored towards server workloads running on a VPS, but should work fine as a default for "guix system vm", etc. Some statistics: | benchmark | linux-libre | linux-libre-virtual | |-------------------------|---------------|---------------------| | guix size | 101.4 MiB | 36.2 MiB | | cpu events/s | 2707.92 | 2709.19 | | 200GiB random mem wr | 1203.26 MiB/s | 1204.26 MiB/s | | avg thread latency | 0.89ms | 0.86ms | These numbers were obtained by running two identical VMs mapped to the same physical cores on an idle host (with static CPU frequency). (the benchmarks in question were taken with 'sysbench', with the best out of 3 runs. Generally -virtual is marginally ahead.) Thoughts? Is this useful at all? Any more interesting benchmarks? [*] I considered making it module-less; i.e. everything built-in, but most of our tooling expects an initrd, so maybe not worth the trouble. Marius Bakke (2): activation: Firmware activation handles missing support in kernel. gnu: Add linux-libre-virtual. Makefile.am | 1 + gnu/build/activation.scm | 9 +- .../linux-libre/6.0-x86_64-virtual.conf | 5881 +++++++++++++++++ gnu/packages/linux.scm | 11 + 4 files changed, 5899 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/aux-files/linux-libre/6.0-x86_64-virtual.conf
Comments
Hello! (Cc: kernel “team”. I’m guessing that the whole team may well unanimously welcome you on board. :-)) Marius Bakke <marius@gnu.org> skribis: > The kernel is tailored towards server workloads running on a VPS, but > should work fine as a default for "guix system vm", etc. For a second I wondered whether we should change ‘virtualized-operating-system’ to put it in the ‘kernel’ field unconditionally. But it’s probably not a good idea because we have system tests targeting specific kernels, and because users may want to test “actual” kernels in QEMU. > | benchmark | linux-libre | linux-libre-virtual | > |-------------------------|---------------|---------------------| > | guix size | 101.4 MiB | 36.2 MiB | Wo0t! > activation: Firmware activation handles missing support in kernel. > gnu: Add linux-libre-virtual. You may want a better-informed opinion on the linux-libre bits, but otherwise LGTM! Ludo’.
On Sat, Dec 17, 2022 at 05:32:09PM +0100, Ludovic Courtès wrote: > You may want a better-informed opinion on the linux-libre bits, but > otherwise LGTM! If it's working for your use case, Marius, then LGTM. Thanks!