From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CJacJGYbOGCRTAAA0tVLHw (envelope-from ) for ; Thu, 25 Feb 2021 21:49:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id TL/YH2YbOGCjMwAAB5/wlQ (envelope-from ) for ; Thu, 25 Feb 2021 21:49:26 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BAA7421E4F for ; Thu, 25 Feb 2021 22:49:25 +0100 (CET) Received: from localhost ([::1]:45596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFOVf-00016i-NQ for larch@yhetil.org; Thu, 25 Feb 2021 16:49:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFOVK-00015T-ET for bug-guix@gnu.org; Thu, 25 Feb 2021 16:49:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56181) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lFOVK-0007cm-6i for bug-guix@gnu.org; Thu, 25 Feb 2021 16:49:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lFOVK-0007nw-2S for bug-guix@gnu.org; Thu, 25 Feb 2021 16:49:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#36117: [PATCH 4/4] services/qemu-binfmt: Use the F flag and the static output of QEMU. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 25 Feb 2021 21:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36117 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 36117-submit@debbugs.gnu.org id=B36117.161428968729941 (code B ref 36117); Thu, 25 Feb 2021 21:49:02 +0000 Received: (at 36117) by debbugs.gnu.org; 25 Feb 2021 21:48:07 +0000 Received: from localhost ([127.0.0.1]:39494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFOUR-0007mp-1l for submit@debbugs.gnu.org; Thu, 25 Feb 2021 16:48:07 -0500 Received: from mail-qt1-f182.google.com ([209.85.160.182]:33420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFOUM-0007mI-Jj for 36117@debbugs.gnu.org; Thu, 25 Feb 2021 16:48:06 -0500 Received: by mail-qt1-f182.google.com with SMTP id s15so5321011qtq.0 for <36117@debbugs.gnu.org>; Thu, 25 Feb 2021 13:48:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=ypX7gsDbxhjUwKBGdP9pCc7/X3YGE2J0gcZxpqQHZIc=; b=JqRaKqLdIeZZuto4ys31mq5WVhjTtwjXLHZwhEwoUW8uZYLWKfoDgLzEZvKmt7kNAD MoQH9Wb2fzamdP598+g/EskuWypQ9kfARRSgeWt5X9ciP5DaM9+J0heZe+z4cs1D004u iOBGxyGCROQSgYOlDZZVCDTxMx5LTKM771QCS3BYsQ+69ZotFUTcVQXOmvtD1Fyvj4to Ew0qe+OoEK9ZnQ+f9Clu4ysof+sluS28/zh5HXQ4rYqCy/w4NGUsO/41hcgF/yaxqmRi kQ7VDrHIj9XMy07fY1gUluJcwV4Gwzt8Qy+z0dVBHH1VaqDbCbgccsnmI6B3xL12Af6n mB3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=ypX7gsDbxhjUwKBGdP9pCc7/X3YGE2J0gcZxpqQHZIc=; b=czheL0oIAfYYOouVKfC1Y3eNlGhdjZ/8DEvamkgv7civwu3MNKZquLck/MIXExf8IZ Akt2mbdnpLd/1r4nCkYZB5Z3DCHS28n4HFtodD7q4w2EG33Drz2bRoVmPQS2tfaUcPP8 4/1rQ4pI1nn/5p28bwJLe7AixM7LgTyqYF+ZVh/rKR8pdEHZfgqPyI7XkRgU/7BHfh6l GqRlKrM9cUAnbxUtTzhcGmnxF2mGn/a7uEt+2f4aeffhH0Olj6Z94qu2tJExaMKJDVNz T17YzPooHK/IcTXt+qcQshLTrp5IKWJwG49R2bVpWLopJAEgahRn8mjWQpdXeH7Oc0Z2 W6Aw== X-Gm-Message-State: AOAM533AvS/O9cTfNIIfcKT5lA2ZuOhGwSYX0HEEcXTsyG5OJPLmCdoR xFX+P8wynOitGA1l4nwXJc0= X-Google-Smtp-Source: ABdhPJxMhu/kCH1We2i24DjnuFAewObyUpslevHQ+AATNIocwFUzlOzrNB2AOjFlJhT8QqYGkhTUkA== X-Received: by 2002:ac8:4457:: with SMTP id m23mr167690qtn.146.1614289677029; Thu, 25 Feb 2021 13:47:57 -0800 (PST) Received: from hurd (dsl-10-130-102.b2b2c.ca. [72.10.130.102]) by smtp.gmail.com with ESMTPSA id 12sm4483947qtt.88.2021.02.25.13.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 13:47:56 -0800 (PST) From: Maxim Cournoyer References: <87k1dbb260.fsf@gnu.org> <20210222195006.11357-1-maxim.cournoyer@gmail.com> <20210222195006.11357-4-maxim.cournoyer@gmail.com> <87zgzv6uyp.fsf@gnu.org> Date: Thu, 25 Feb 2021 16:47:55 -0500 In-Reply-To: <87zgzv6uyp.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 23 Feb 2021 09:37:18 +0100") Message-ID: <877dmv95v8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vagrant Cascadian , 36117@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.27 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=JqRaKqLd; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: BAA7421E4F X-Spam-Score: -1.27 X-Migadu-Scanner: scn1.migadu.com X-TUID: te96UjquJlK4 Hello again, Ludovic Court=C3=A8s writes: [...] >> ;; Platforms that QEMU can emulate. >> -(define-record-type >> - (qemu-platform name family magic mask) >> +(define-record-type* > > Since this is for internal consumption, I=E2=80=99m in favor of keeping p= lain > =E2=80=98define-record-type=E2=80=99. Also, I don=E2=80=99t think the = =E2=80=9CF=E2=80=9D flag belongs here, > it=E2=80=99s mostly orthogonal. Even though it's still internal for now, the intent here was to allow the advanced users (those who would use (@@ ...) to access what they need) to configure the qemu-platform objects should they have special needs for it. I also don't think the flags belong to a qemu-platform object, but the same can be said for the magic field. The most elegant thing would be to have a binfmt_misc service which we would then extend for QEMU, but that's more work and the use cases appear to be rare outside of QEMU (I can only think of WINE). If you feel strongly about it I can revert those hunks and hard-coded the F flag. >> (define qemu-binfmt-service-type >> ;; TODO: Make a separate binfmt_misc service out of this? >> (service-type (name 'qemu-binfmt) >> @@ -800,9 +833,7 @@ given QEMU package." >> (const >> (list %binary-format-file-sy= stem))) >> (service-extension shepherd-root-service-type >> - qemu-binfmt-shepherd-services) >> - (service-extension guix-service-type >> - qemu-binfmt-guix-chroot))) >> + qemu-binfmt-shepherd-services= ))) > > As discussed on IRC, the downside of this approach is increased disk and > memory footprint (those big binaries have to be loaded in memory). The 'big' binaries are not that bigger than what we already have. For a typical one: $ du -h {/gnu/store/7w04gv6m92n40dainn4s6xr3l20r90xw-qemu-5.1.0,\ /gnu/store/wqh2dyskzkl4vjn6harclyl317h4vfaf-qemu-5.1.0-static}/bin/qemu-a= rm 4.6M /gnu/store/7w04gv6m92n40dainn4s6xr3l20r90xw-qemu-5.1.0/bin/qemu-arm 6.4M /gnu/store/wqh2dyskzkl4vjn6harclyl317h4vfaf-qemu-5.1.0-static/bin/q= emu-arm Only the registered QEMU architectures would be preloaded; so if you enable 5, the increase it at worst ~ 30 MiB. Nothing too worrying on machines that should be quite capable for transparent emulation purposes, in my opinion. > One possibility would be to add an option to choose between this and the > current approach, but maybe it=E2=80=99s not worth the maintenance troubl= e. I would rather K.I.S.S., with this only case that works everywhere and thus doesn't surprise anyone. > Thanks for fixing this issue! Thanks for the review! Maxim