unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Ludovic Courtès" <ludovic.courtes@inria.fr>
Cc: Guix-devel <guix-devel@gnu.org>, Mathieu Othacehe <othacehe@gnu.org>
Subject: Re: linux-module-builder leads to huge store items
Date: Thu, 10 Sep 2020 15:04:53 +0200	[thread overview]
Message-ID: <20200910150453.7f968562@scratchpost.org> (raw)
In-Reply-To: <874ko6jbo8.fsf@inria.fr>

[-- Attachment #1: Type: text/plain, Size: 2444 bytes --]

Hi Ludo,

On Thu, 10 Sep 2020 10:09:11 +0200
Ludovic Courtès <ludovic.courtes@inria.fr> wrote:

> Surely we don’t need that much just to build a kernel module.  :-)

Since Linux is a monolithic kernel and since C has no modules: Yes, yes we
do--in the general case.

Linux kernel developers have no interest in supporting out-of-tree modules for
free (and no interesting in having the Linux kernel API frozen) so there's no
incentive to support a use case where you can compile a Linux kernel module
without having the full source of the Linux kernel (that would be just asking
for license abuse, too).

That would mean that we would have to both design and then support out-of-tree
build infrastructure ourselves in Guix.  And for what?  It's only used when
building the module--it will be thrown away afterwards anyway.

Or is it not garbage-collected afterwards?  That would be a serious bug.

>   ;; TODO: Only preserve the minimum, i.e. [Kbuild], Kconfig,
>   ;; scripts, include, ".config".
> 
> Which files exactly are needed?  Can we go ahead and implement this TODO?

Who knows?  Nobody--not even Linux kernel developers.  Given the design of
C, it's not possible in general to know what is the interface and what is
the implementation.  I guess for the Linux kernel we could kinda wing it
because of the social conventions the Linux kernel enforces where it kinda
almost does have a module separation into interface and implementation.

> I understand the need to “cut corners” while trying things out, but I’d
> argue that this specific corner should have been restored before getting
> into master.

If you want that, I think you need to argue that with the main Linux kernel
maintainers (Greg Kroah-Hartmann etc).  I don't think it is
practical for us to maintain a weird minimal module-building-only fork
of Linux.  I'd be glad to be proven wrong, though.

Even if we did, there are much worse build-time storage space wastes
(*cough* llvm *cough*).

That said, I did a quick size comparison and found those big items:

150 MB a2fs24bgghjvlzq5lzr6zki7mqxx8mpi-linux-libre-module-builder-5.8.7/lib/modules/build/drivers/gpu/drm/amd/include/asic_reg
30 MB a2fs24bgghjvlzq5lzr6zki7mqxx8mpi-linux-libre-module-builder-5.8.7/lib/modules/build/drivers/staging

I don't think we need these in any potential Linux kernel module--but who
knows?  Maybe somebody does need those.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-09-10 13:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10  8:09 linux-module-builder leads to huge store items Ludovic Courtès
2020-09-10 13:04 ` Danny Milosavljevic [this message]
2020-09-10 16:26   ` Ludovic Courtès
2020-09-11 11:09     ` Danny Milosavljevic
2020-09-11 14:55       ` Ludovic Courtès
2020-09-11 17:44         ` Danny Milosavljevic

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=20200910150453.7f968562@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=ludovic.courtes@inria.fr \
    --cc=othacehe@gnu.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).