[PATCH] gnu: linux-libre: Parallelize linux-libre module installation

  • Done
  • quality assurance status badge
Details
One participant
  • Richard Sent
Owner
unassigned
Submitted by
Richard Sent
Severity
normal
R
R
Richard Sent wrote on 24 May 18:49 +0200
(address . guix-patches@gnu.org)(name . Richard Sent)(address . richard@freakingpenguin.com)
f74cb275dc156964a8f109482b834e2f2705b6f9.1716569382.git.richard@freakingpenguin.com
* 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(-)

Toggle diff (27 lines)
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

base-commit: 9901416233867233192b63fde7f616751127b189
--
2.41.0
R
R
Richard Sent wrote on 30 May 05:02 +0200
control message for bug #71175
(address . control@debbugs.gnu.org)
87r0dk80ja.fsf@freakingpenguin.com
close 71175
quit
R
R
Richard Sent wrote on 30 May 05:02 +0200
Re: [bug#71175] [PATCH] gnu: linux-libre: Parallelize linux-libre module installation
(address . 71175@debbugs.gnu.org)
87o78o80iq.fsf@freakingpenguin.com
Closing due to c3566fccb6fa25b70bf2e78fafe71f9048a6a719.

--
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.
?
Your comment

This issue is archived.

To comment on this conversation send an email to 71175@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 71175
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch