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: Fri, 11 Sep 2020 13:09:59 +0200	[thread overview]
Message-ID: <20200911130959.479f9348@scratchpost.org> (raw)
In-Reply-To: <87mu1x7g32.fsf@inria.fr>

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

Hi Ludo,

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

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

The biggest source files, see above, are header files
(drivers/gpu/drm/amd/include/asic_reg).

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

And patch it correctly etc just like make-linux-libre does?  That doesn't
sound safe.  The current setup is basically inheriting from the package
make-linux-libre gave us and changing the 'build phase slightly.  That means
it will be exactly the same otherwise.

The only way to reduce effort safely is to delete the set of source
files (especially header files) which we don't need for out-of-tree
modules.

I checked--that would reduce the size of linux-libre-builder by about 800 MB
(to 255 MB; see [1][2]).
That would mean that some modules can't be out-of-tree.  But I guess
that's okay--and we could not-delete some files later if need be.

Btw, linux-libre is currently not reproducible--see bug 43301.
That could introduce a security problem if the Linux kernel and
an out-of-tree module are compiled differently (they are) and then loaded
into the same kernel (even now).

[1] Toplevel files in linux-libre-module-builder would be then (sizes are included if size > 1 MB):

arch/   (134 MB)
block/  (2 MB)
certs/
COPYING
CREDITS
crypto/ (4 MB)
include/ (59 MB)
init/
ipc/
Kbuild
Kconfig
kernel/ (11 MB)
lib/ (6 MB)
LICENSES/
MAINTAINERS
Makefile
mm/ (5 MB)
Module.symvers (2 MB)
README
scripts/ (6 MB)
security/ (4 MB)
System.map (5 MB)
tools/ (14 MB)
usr/
virt/

[2] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=43332

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

  reply	other threads:[~2020-09-11 11:10 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
2020-09-11 11:09     ` Danny Milosavljevic [this message]
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=20200911130959.479f9348@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).