From patchwork Fri May 24 16:49:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sent X-Patchwork-Id: 64867 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D384B27BBEA; Fri, 24 May 2024 17:56:25 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4069027BBE9 for ; Fri, 24 May 2024 17:56:25 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAYDD-0002ad-D5; Fri, 24 May 2024 12:56:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAYD1-0002ZK-7E for guix-patches@gnu.org; Fri, 24 May 2024 12:56:00 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAYD0-0004wm-T1 for guix-patches@gnu.org; Fri, 24 May 2024 12:55:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sAYD4-0001c0-Hw; Fri, 24 May 2024 12:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71175] [PATCH] gnu: linux-libre: Parallelize linux-libre module installation Resent-From: Richard Sent Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, me@tobias.gr, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Fri, 24 May 2024 16:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71175 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71175@debbugs.gnu.org Cc: Richard Sent , Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer Received: via spool by submit@debbugs.gnu.org id=B.17165697086181 (code B ref -1); Fri, 24 May 2024 16:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 May 2024 16:55:08 +0000 Received: from localhost ([127.0.0.1]:38051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAYCC-0001bd-2a for submit@debbugs.gnu.org; Fri, 24 May 2024 12:55:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:50590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAYCA-0001bX-5p for submit@debbugs.gnu.org; Fri, 24 May 2024 12:55:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAYC2-0002KL-Nd for guix-patches@gnu.org; Fri, 24 May 2024 12:54:58 -0400 Received: from mail-108-mta145.mxroute.com ([136.175.108.145]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAYC0-0004ee-Mn for guix-patches@gnu.org; Fri, 24 May 2024 12:54:58 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta145.mxroute.com (ZoneMTA) with ESMTPSA id 18fab86b4d9000efce.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 24 May 2024 16:54:43 +0000 X-Zone-Loop: 885a160273c9a2605963aad569439f32e2017d312429 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=okP4Hc5jhGsgWxl5wUe1rmfaE4lXm1UGQOFpYeFMavI=; b=NH3FxHIlfOBJxVLHJkrJYmhItZ xjCrW+Lmtt1swv6ePu5vcj+YR+LJLbhIChybSw7o8l6cmU37pB5/2OjNCR2ZmphYWxvOHVbFXdCoo Xg+l3zNs/AvrJS24AZ2Pil40zdbKz2qYyZw15GXX5P4XSaxhwyb3PeFOooAceY6GngxqmgcO/o21h kvc2eOil8rerqTxOgTbjU9Ew9bKqWdUFKuB331fCRViCTYnjseW+1Ji/9HICITgJB9wWKaNao4QRm itTWOK2Y9BA8MlhpSAlCam/57SM0dkwISQok+g8OeeZcUUeptd0XQFT1pJybf0yGmNXBDAFm5mWsO 1EcZiTDA==; From: Richard Sent Date: Fri, 24 May 2024 12:49:42 -0400 Message-ID: MIME-Version: 1.0 X-Authenticated-Id: richard@freakingpenguin.com Received-SPF: pass client-ip=136.175.108.145; envelope-from=richard@freakingpenguin.com; helo=mail-108-mta145.mxroute.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/linux.scm (make-linux-libre*): Parallelize kernel module installation when possible. Change-Id: I6ee8223d8a4a33f92907498d7f2b95675b2aa940 --- Hi Guix! This patch aims to speed up the kernel build process. Because module installation has a fair amount of CPU activity (GZIP+STRIP), it benefits from additional jobs. On my 32 logical core machine, the install phase of linux-libre went from 45.4 seconds to 9.4 seconds. gnu/packages/linux.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) base-commit: 9901416233867233192b63fde7f616751127b189 diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index a9b78a7986..1357be4e86 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1041,7 +1041,7 @@ (define* (make-linux-libre* version gnu-revision source supported-systems (close-port port)) (invoke "make" "oldconfig")))) (replace 'install - (lambda _ + (lambda* (#:key parallel-build? #:allow-other-keys) (let ((moddir (string-append #$output "/lib/modules")) (dtbdir (string-append #$output "/lib/dtbs"))) ;; Install kernel image, kernel configuration and link map. @@ -1056,6 +1056,9 @@ (define* (make-linux-libre* version gnu-revision source supported-systems ;; Install kernel modules (mkdir-p moddir) (invoke "make" + "-j" (if parallel-build? + (number->string (parallel-job-count)) + "1") ;; Disable depmod because the Guix system's module ;; directory is an union of potentially multiple ;; packages. It is not possible to use depmod to