[PATCH] bitbake.conf: fix vardepsexclude for ZSTD_DEFAULTS

6 views
Skip to first unread message

Benedikt Niedermayr

unread,
Jul 16, 2024, 4:20:26 PM (11 days ago) Jul 16
to isar-...@googlegroups.com
This fixes a rebuild in case ZSTD_LEVEL changes. This is valid since
a different compression level leads to different outputs.

Signed-off-by: Benedikt Niedermayr <benedikt....@siemens.com>
---
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 4cfa8b10b58b..2ecba508935c 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -161,7 +161,7 @@ ZSTD_THREADS ?= "${@oe.utils.cpu_count(at_least=2)}"
ZSTD_THREADS[vardepvalue] = "1"
ZSTD_LEVEL ?= "19"
ZSTD_DEFAULTS ?= "--rsyncable -${ZSTD_LEVEL} --threads=${ZSTD_THREADS}"
-ZSTD_DEFAULTS[vardepsexclude] += "ZSTD_LEVEL ZSTD_THREADS"
+ZSTD_DEFAULTS[vardepsexclude] += "ZSTD_THREADS"

# Default compression settings for zchunk
ZCK_DEFAULTS ?= ""
--
2.34.1

Jan Kiszka

unread,
Jul 17, 2024, 1:25:03 AM (11 days ago) Jul 17
to Benedikt Niedermayr, isar-...@googlegroups.com
Checking what OE does by now:

# Default parallelism for zstd
ZSTD_THREADS ?= "${@oe.utils.cpu_count(at_least=2)}"
ZSTD_THREADS[vardepvalue] = "1"

ZSTD_COMPRESSION_LEVEL ?= "-3"
ZSTD_DEFAULTS ?= "--threads=${ZSTD_THREADS} ${ZSTD_COMPRESSION_LEVEL}"
ZSTD_DEFAULTS[vardepsexclude] = "ZSTD_THREADS"

We should likely follow that, also naming-wise. Reducing the compression
level to 3 is probably more CPU friendly as well as we have seen with
larger artifacts. Just keep --rsyncable, see 241155f7.

What I don't get yet: ZSTD_THREADS is pinned to 1 for the purpose of
dependency calculations. Why do they additionally use vardepsexclude?

Jan

--
Siemens AG, Technology
Linux Expert Center

Niedermayr, BENEDIKT

unread,
Jul 18, 2024, 3:42:21 AM (10 days ago) Jul 18
to isar-...@googlegroups.com, Kiszka, Jan
I'm also not sure. Maybe some sstate magic going on of which I'm not aware of.

We can try to copy everything but the vardepsexclude with ZSTD_THREADS and see if any issues occur.
If not we could fix/refactor that in OE later on.

Benedikt
>
> Jan
>

Benedikt Niedermayr

unread,
Jul 25, 2024, 4:47:05 AM (3 days ago) Jul 25
to isar-...@googlegroups.com
This fixes a rebuild in case ZSTD_LEVEL changes. This is valid since
a different compression level leads to different outputs.

This patch copies the current implementation from OE and thereby
fixing this issue in order to be more aligned with the OE
naming convention.

Signed-off-by: Benedikt Niedermayr <benedikt....@siemens.com>
---
meta/conf/bitbake.conf | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 4cfa8b10b58b..cda980358fd6 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -159,9 +159,10 @@ XZ_DEFAULTS[vardepsexclude] += "XZ_MEMLIMIT XZ_THREADS"
# Default parallelism for zstd
ZSTD_THREADS ?= "${@oe.utils.cpu_count(at_least=2)}"
ZSTD_THREADS[vardepvalue] = "1"
-ZSTD_LEVEL ?= "19"
-ZSTD_DEFAULTS ?= "--rsyncable -${ZSTD_LEVEL} --threads=${ZSTD_THREADS}"
-ZSTD_DEFAULTS[vardepsexclude] += "ZSTD_LEVEL ZSTD_THREADS"
+
+ZSTD_COMPRESSION_LEVEL ?= "-3"
+ZSTD_DEFAULTS ?= "--threads=${ZSTD_THREADS} ${ZSTD_COMPRESSION_LEVEL}"
+ZSTD_DEFAULTS[vardepsexclude] = "ZSTD_THREADS"

Benedikt Niedermayr

unread,
Jul 25, 2024, 4:47:06 AM (3 days ago) Jul 25
to isar-...@googlegroups.com
This patch basically copies the OE implementation for setting
ZSTD_DEFAULTS and thereby fixes a rebuild in case ZSTD_LEVEL changes
(or ZSTD_COMPRESSION_LEVEL as named by OE).

There is still one question open: Why is ZSTD_THREADS pinned to 1 and
also added to vardepsexclude? It should be sufficient to do one of both
I think. Any comments to that?

Changes in v2:

- Copy the OE implementation for setting ZSTD_DEFAULTS

Benedikt Niedermayr (1):
bitbake.conf: fix vardepsexclude for ZSTD_DEFAULTS

meta/conf/bitbake.conf | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

--
2.34.1

Reply all
Reply to author
Forward
0 new messages