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

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