From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oEnWNehTWl9YcgAA0tVLHw (envelope-from ) for ; Thu, 10 Sep 2020 16:27:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id yBTTMehTWl/teQAA1q6Kng (envelope-from ) for ; Thu, 10 Sep 2020 16:27:20 +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 487029401CF for ; Thu, 10 Sep 2020 16:27:20 +0000 (UTC) Received: from localhost ([::1]:42532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGPPr-0006j6-7a for larch@yhetil.org; Thu, 10 Sep 2020 12:27:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGPPh-0006fq-Rv for guix-devel@gnu.org; Thu, 10 Sep 2020 12:27:09 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:42055) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGPPf-0008OU-H1; Thu, 10 Sep 2020 12:27:09 -0400 X-IronPort-AV: E=Sophos;i="5.76,359,1592863200"; d="scan'208";a="467034277" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2020 18:27:03 +0200 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Danny Milosavljevic Subject: Re: linux-module-builder leads to huge store items References: <874ko6jbo8.fsf@inria.fr> <20200910150453.7f968562@scratchpost.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 Fructidor an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 10 Sep 2020 18:26:57 +0200 In-Reply-To: <20200910150453.7f968562@scratchpost.org> (Danny Milosavljevic's message of "Thu, 10 Sep 2020 15:04:53 +0200") Message-ID: <87mu1x7g32.fsf@inria.fr> 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 Received-SPF: pass client-ip=192.134.164.83; envelope-from=ludovic.courtes@inria.fr; helo=mail2-relais-roc.national.inria.fr X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 12:27:04 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix-devel , Mathieu Othacehe Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: 0.49 X-TUID: U7mWn+s6Tute Hello, Danny Milosavljevic skribis: > On Thu, 10 Sep 2020 10:09:11 +0200 > Ludovic Court=C3=A8s wrote: > >> Surely we don=E2=80=99t 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 module= s 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 modu= le > without having the full source of the Linux kernel (that would be just as= king > 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 wh= en > 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=E2=80=99s 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". >>=20 >> 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=E2=80=99s 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/l= ib/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=E2=80=99t 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=E2=80=99d be reducing GC stress at the expense of a (reasonable?) increase in module build time. Thoughts? Ludo=E2=80=99.