unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 43160@debbugs.gnu.org
Cc: mhw@netris.org, Maxim Cournoyer <maxim.cournoyer@gmail.com>,
	leo@famulari.name
Subject: [bug#43160] [PATCH v3 2/2] linux-libre: Enable multi-core xz compression during tarball generation.
Date: Fri, 11 Sep 2020 10:44:59 -0400	[thread overview]
Message-ID: <20200911144459.27220-2-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <20200911144459.27220-1-maxim.cournoyer@gmail.com>

* gnu/packages/linux.scm (make-linux-libre-source): Add an NCORES binding, and
use it to configure the number of threads xz should use via the XZ_DEFAULTS
environment variable.
---
 gnu/packages/linux.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1df66330cb..d6441fa181 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -255,7 +255,8 @@ new Linux changes for nonfree code is required when skipping the comparison."
 
                 (setvbuf (current-output-port) 'line)
 
-                (let ((dir (string-append "linux-" #$version)))
+                (let ((dir (string-append "linux-" #$version))
+                      (ncores (number->string (parallel-job-count))))
 
                   (mkdir "/tmp/bin")
                   (set-path-environment-variable
@@ -289,6 +290,9 @@ new Linux changes for nonfree code is required when skipping the comparison."
                       (("/bin/sed") (which "sed"))
                       (("/usr/bin/python") (which "python"))))
 
+                  ;; This enables xz multi-core compression/decompression.
+                  (setenv "XZ_DEFAULTS" (string-append "--threads=" ncores))
+
                   (if (file-is-directory? #+linux-upstream-source)
                       (begin
                         (format #t "Copying upstream Linux source...~%")
-- 
2.28.0





  reply	other threads:[~2020-09-11 14:46 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 18:29 [bug#43173] Ensure that the correct linux-libre deblobbing scripts are used Leo Famulari
2020-09-02 18:30 ` [bug#43173] [PATCH 1/2] gnu: Do not truncate the version of the linux-libre deblobbing script file names Leo Famulari
2020-09-02 18:30   ` [bug#43173] [PATCH 2/2] gnu: linux-libre: Enforce the use of the correct deblobbing scripts Leo Famulari
2020-09-02 21:07 ` [bug#43173] Ensure that the correct linux-libre deblobbing scripts are used Mark H Weaver
2020-09-02 22:15   ` Leo Famulari
2020-09-02 23:53     ` Mark H Weaver
     [not found]       ` <87h7sedz0w.fsf_-_@gmail.com>
2020-09-04 15:21         ` [bug#43160] Validate the result of our linux-libre sources clean up Mark H Weaver
2020-09-07 19:25           ` Maxim Cournoyer
2020-09-07 23:38             ` Mark H Weaver
2020-09-01 20:38               ` [bug#43160] [PATCH] gnu: linux-libre: Use Python 3 in make-linux-libre-source Maxim Cournoyer
2020-09-01 20:41                 ` [bug#43160] [PATCH 1/2] gnu: make-linux-libre-source: Set output port buffering to line mode Maxim Cournoyer
2020-09-01 20:41                   ` [bug#43160] [PATCH 2/2] gnu: linux-libre: Validate that the cleaned up tarball is free of blobs Maxim Cournoyer
2020-09-02 12:56                 ` [bug#43160] [PATCH v2 1/4] gnu: linux-libre: Use Python 3 in make-linux-libre-source Maxim Cournoyer
2020-09-02 12:56                   ` [bug#43160] [PATCH v2 2/4] gnu: make-linux-libre-source: Set output port buffering to line mode Maxim Cournoyer
2020-09-02 12:56                   ` [bug#43160] [PATCH v2 3/4] gnu: linux-libre: Validate that the cleaned up tarball is free of blobs Maxim Cournoyer
2020-09-02 12:56                   ` [bug#43160] [PATCH v2 4/4] gnu: linux-libre: Compare generated sources against Linux-libre releases Maxim Cournoyer
2020-09-03  5:50                   ` [bug#43160] [PATCH v2 1/4] gnu: linux-libre: Use Python 3 in make-linux-libre-source Mathieu Othacehe
2020-09-03 13:08                     ` Maxim Cournoyer
2020-09-04  6:15                       ` Mathieu Othacehe
2020-09-04 14:45                         ` Mike Rosset
2020-09-05  1:51                         ` Maxim Cournoyer
2020-09-11  1:53                 ` [bug#43160] Validate the result of our linux-libre sources clean up Maxim Cournoyer
2020-09-11 14:44               ` [bug#43160] [PATCH v3 1/2] gnu: linux-libre: Compare generated sources against Linux-libre releases Maxim Cournoyer
2020-09-11 14:44                 ` Maxim Cournoyer [this message]
2020-09-12 17:07                 ` Mark H Weaver
2020-09-13 23:50                   ` Maxim Cournoyer
2020-09-15 10:33                     ` Mark H Weaver
2021-04-22  6:35                     ` Mark H Weaver
2023-07-27 16:18                       ` bug#43160: linux-libre: compare guix-generated sources against upstream releases Maxim Cournoyer
2020-09-05 19:04       ` [bug#43173] Ensure that the correct linux-libre deblobbing scripts are used Leo Famulari
2020-09-05 23:07         ` Mark H Weaver
2020-09-06 20:01           ` bug#43173: " Leo Famulari

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=20200911144459.27220-2-maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=43160@debbugs.gnu.org \
    --cc=leo@famulari.name \
    --cc=mhw@netris.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).