unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludovic.courtes@inria.fr>
To: Danny Milosavljevic <dannym@scratchpost.org>
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 18:26:57 +0200	[thread overview]
Message-ID: <87mu1x7g32.fsf@inria.fr> (raw)
In-Reply-To: <20200910150453.7f968562@scratchpost.org> (Danny Milosavljevic's message of "Thu, 10 Sep 2020 15:04:53 +0200")

Hello,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> 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).

Understood.

> 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.

It *is* thrown-away afterwards.  But until then, it must be deduplicated
(upon build completion, reception, etc.), and that’s a lot of work I/O
wise given the large number of files.

>>   ;; 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?

[...]

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

But it’s build-time.

> 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.

So, I can think of the following ways to address that:

  1. Remove for example *.c, assuming the out-of-tree modules we package
     only care about *.h + build machinery.

  2. Don’t add all of the Linux source to the store, or at least not
     under a new name each time.  One way to do that would be to unpack
     the Linux-libre tree within the build tree of the out-of-tree
     module.  We’d be reducing GC stress at the expense of a
     (reasonable?) increase in module build time.

Thoughts?

Ludo’.


  reply	other threads:[~2020-09-10 16:27 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
2020-09-10 16:26   ` Ludovic Courtès [this message]
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=87mu1x7g32.fsf@inria.fr \
    --to=ludovic.courtes@inria.fr \
    --cc=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --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).