Blame SOURCES/0089-Use-builtin-xz-lzma-option-to-use-all-cores-for-mult.patch

966cef
From d7f6f22bca957cc0a5db13f26c3191cae11ac0c2 Mon Sep 17 00:00:00 2001
966cef
From: Koen Kooi <koen@dominion.thruhere.net>
966cef
Date: Fri, 10 Jan 2014 21:41:43 +0100
966cef
Subject: [PATCH] Use builtin xz/lzma option to use all cores for multihreaded
966cef
 compression
966cef
966cef
This removes the dependency on 'getconf' as well, which is not installed by default on my embedded systems.
966cef
966cef
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
966cef
---
966cef
 dracut.sh | 6 ++----
966cef
 1 file changed, 2 insertions(+), 4 deletions(-)
966cef
966cef
diff --git a/dracut.sh b/dracut.sh
966cef
index 8d572a3..ad57218 100755
966cef
--- a/dracut.sh
966cef
+++ b/dracut.sh
966cef
@@ -695,14 +695,12 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
966cef
 # eliminate IFS hackery when messing with fw_dir
966cef
 fw_dir=${fw_dir//:/ }
966cef
 
966cef
-cpu_count=$(getconf _NPROCESSORS_ONLN)
966cef
-
966cef
 # handle compression options.
966cef
 [[ $compress ]] || compress="gzip"
966cef
 case $compress in
966cef
     bzip2) compress="bzip2 -9";;
966cef
-    lzma)  compress="lzma -9 ${cpu_count:+-T$cpu_count}";;
966cef
-    xz)    compress="xz --check=crc32 --lzma2=dict=1MiB ${cpu_count:+-T$cpu_count}";;
966cef
+    lzma)  compress="lzma -9 -T0";;
966cef
+    xz)    compress="xz --check=crc32 --lzma2=dict=1MiB -T0";;
966cef
     gzip)  compress="gzip -9"; command -v pigz > /dev/null 2>&1 && compress="pigz -9";;
966cef
     lzo)   compress="lzop -9";;
966cef
     lz4)   compress="lz4 -9";;