From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Vagrant Cascadian <vagrant@debian.org>, 36117-done@debbugs.gnu.org
Subject: bug#36117: qemu-binfmt with non-native chroot
Date: Mon, 15 Mar 2021 18:07:27 -0400 [thread overview]
Message-ID: <87eeggrrz4.fsf_-_@gmail.com> (raw)
In-Reply-To: <877dmv95v8.fsf@gmail.com> (Maxim Cournoyer's message of "Thu, 25 Feb 2021 16:47:55 -0500")
Hi,
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> Hello again,
>
> Ludovic Courtès <ludo@gnu.org> writes:
>
> [...]
>
>>> ;; Platforms that QEMU can emulate.
>>> -(define-record-type <qemu-platform>
>>> - (qemu-platform name family magic mask)
>>> +(define-record-type* <qemu-platform>
>>
>> Since this is for internal consumption, I’m in favor of keeping plain
>> ‘define-record-type’. Also, I don’t think the “F” flag belongs here,
>> it’s 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-system)))
>>> (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-arm
>
> 4.6M /gnu/store/7w04gv6m92n40dainn4s6xr3l20r90xw-qemu-5.1.0/bin/qemu-arm
> 6.4M /gnu/store/wqh2dyskzkl4vjn6harclyl317h4vfaf-qemu-5.1.0-static/bin/qemu-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’s not worth the maintenance trouble.
>
> 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
I went ahead and pushed this change to master alongside the update to
QEMU 5.2.0.
If there are improvements/changes to be made, we can pick it up from
there!
Closing,
Maxim
prev parent reply other threads:[~2021-03-15 22:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-06 17:55 bug#36117: qemu-binfmt with non-native chroot Vagrant Cascadian
2019-06-07 13:00 ` Ludovic Courtès
2019-06-08 6:03 ` Vagrant Cascadian
2019-06-24 12:25 ` Ludovic Courtès
2021-02-22 19:50 ` bug#36117: [PATCH 1/4] gnu: qemu: Fix indentation and remove trailing #t Maxim Cournoyer
2021-02-22 19:50 ` bug#36117: [PATCH 2/4] gnu: Add glib-static Maxim Cournoyer
2021-02-22 19:50 ` bug#36117: [PATCH 3/4] gnu: qemu: Add a static output Maxim Cournoyer
2021-02-23 8:38 ` Ludovic Courtès
2021-02-25 13:57 ` Maxim Cournoyer
2021-02-25 14:50 ` Ludovic Courtès
2021-02-22 19:50 ` bug#36117: [PATCH 4/4] services/qemu-binfmt: Use the F flag and the static output of QEMU Maxim Cournoyer
2021-02-23 8:37 ` Ludovic Courtès
2021-02-25 21:47 ` Maxim Cournoyer
2021-03-15 22:07 ` Maxim Cournoyer [this message]
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eeggrrz4.fsf_-_@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=36117-done@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=vagrant@debian.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).