From: "André Draszik" <git@andred.net>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2 2/4] bitbake.conf: more deterministic xz compression (threads)
Date: Tue, 3 Mar 2020 16:05:11 +0000 [thread overview]
Message-ID: <20200303160513.17645-2-git@andred.net> (raw)
In-Reply-To: <20200303160513.17645-1-git@andred.net>
xz archives can be non-deterministic / non-reproducible:
a) archives are created differently in single- vs
multi-threaded modes
b) xz will scale down the compression level so as to
be try to work within any memory limit given to
it when operating in single-threaded mode
This means that due to bitbake's default of using as many
threads as there are cores in the system, files compressed
with xz will be different if built on a multi-core system
compared to single-core systems. They will also potentially
be different if built on single-core systems with different
amounts of physical memory, due to bitbake's default of
limiting xz's memory consumption.
Force multi-threaded operation by default, even on single-core
systems, so as to ensure archives are created in the same
way in all cases.
Signed-off-by: André Draszik <git@andred.net>
---
meta/conf/bitbake.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index e201b671bb..131ba296d3 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -795,7 +795,7 @@ BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
# Default parallelism and resource usage for xz
-XZ_DEFAULTS ?= "--memlimit=50% --threads=${@oe.utils.cpu_count()}"
+XZ_DEFAULTS ?= "--memlimit=50% --threads=${@oe.utils.cpu_count(at_least=2)}"
##################################################################
# Magic Cookie for SANITY CHECK
--
2.23.0.rc1
next prev parent reply other threads:[~2020-03-03 16:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 16:05 [PATCH v2 1/4] lib/oe/utils: allow to set a lower bound on returned cpu_count() André Draszik
2020-03-03 16:05 ` André Draszik [this message]
2020-03-03 16:05 ` [PATCH v2 3/4] bitbake.conf: omit XZ threads and RAM from sstate signatures André Draszik
2020-03-03 16:05 ` [PATCH v2 4/4] reproducible: try to ensure reproducible xz archives André Draszik
2020-03-03 16:08 ` André Draszik
2020-03-04 0:31 ` Otavio Salvador
2020-03-04 6:03 ` Richard Purdie
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200303160513.17645-2-git@andred.net \
--to=git@andred.net \
--cc=openembedded-core@lists.openembedded.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox