On 12 Oct 2022, at 05:46, Michał Górny <[email protected]> wrote:
On Tue, 2022-10-11 at 23:54 +0100, Sam James wrote:
Note that this will only take effect if compressing
modules with xz or zstd (COMPRESS_MODULE_XZ is set or
COMPRESS_MODULE_ZSTD is set respectively)
... or if compiling the kernel with xz or zstd (COMPRESS_KERNEL_XZ
or COMPRESS_KERNEL_ZSTD is set respectiely).
Signed-off-by: Sam James <[email protected]>
---
eclass/kernel-build.eclass | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 98a385bf72c0..936258e9e8af 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -29,7 +29,7 @@ esac
PYTHON_COMPAT=( python3_{8..11} )
-inherit python-any-r1 savedconfig toolchain-funcs kernel-install
+inherit multiprocessing python-any-r1 savedconfig toolchain-funcs kernel-install
BDEPEND="
${PYTHON_DEPS}
@@ -90,6 +90,14 @@ kernel-build_src_configure() {
ARCH=$(tc-arch-kernel)
)
+ if type -P xz ; then
+ export XZ_OPT="-T$(makeopts_jobs)"
+ fi
+
+ if type -P zstd ; then
+ export ZSTD_NBTHREADS="$(makeopts_jobs)"
+ fi
+
restore_config .config
[[ -f .config ]] || die "Ebuild error: please copy default config into .config"
I'm think that we need an override for these values. Just because
someone is using -j12 to compile source files in parallel (which has no
real drawback), it doesn't mean that that person wants to use 12-thread parallel xz/zstd that will actually reduce compression ratio for minimal
gain (I mean, most of these files won't even use parallel compression
because they're too small).
Not to mention that someone using -j32 distcc setup necessarily wants 32-threaded local compression.
Note that this will only take effect if compressing
modules with xz or zstd (COMPRESS_MODULE_XZ is set or
COMPRESS_MODULE_ZSTD is set respectively)
... or if compiling the kernel with xz or zstd (COMPRESS_KERNEL_XZ
or COMPRESS_KERNEL_ZSTD is set respectiely).
Signed-off-by: Sam James <[email protected]>
---
eclass/kernel-build.eclass | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 98a385bf72c0..936258e9e8af 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -29,7 +29,7 @@ esac
PYTHON_COMPAT=( python3_{8..11} )
-inherit python-any-r1 savedconfig toolchain-funcs kernel-install
+inherit multiprocessing python-any-r1 savedconfig toolchain-funcs kernel-install
BDEPEND="
${PYTHON_DEPS}
@@ -90,6 +90,14 @@ kernel-build_src_configure() {
ARCH=$(tc-arch-kernel)
)
+ if type -P xz ; then
+ export XZ_OPT="-T$(makeopts_jobs)"
+ fi
+
+ if type -P zstd ; then
+ export ZSTD_NBTHREADS="$(makeopts_jobs)"
+ fi
+
restore_config .config
[[ -f .config ]] || die "Ebuild error: please copy default config into .config"
On Wed, 12 Oct 2022, Michał Górny wrote:
(I mean, most of these files won't even use parallel compression
because they're too small).
On Tue, 2022-10-11 at 23:54 +0100, Sam James wrote:
Note that this will only take effect if compressing
modules with xz or zstd (COMPRESS_MODULE_XZ is set or
COMPRESS_MODULE_ZSTD is set respectively)
... or if compiling the kernel with xz or zstd (COMPRESS_KERNEL_XZ
or COMPRESS_KERNEL_ZSTD is set respectiely).
Signed-off-by: Sam James <[email protected]>
---
eclass/kernel-build.eclass | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass
index 98a385bf72c0..936258e9e8af 100644
--- a/eclass/kernel-build.eclass
+++ b/eclass/kernel-build.eclass
@@ -29,7 +29,7 @@ esac
PYTHON_COMPAT=( python3_{8..11} )
-inherit python-any-r1 savedconfig toolchain-funcs kernel-install
+inherit multiprocessing python-any-r1 savedconfig toolchain-funcs kernel-install
BDEPEND="
${PYTHON_DEPS}
@@ -90,6 +90,14 @@ kernel-build_src_configure() {
ARCH=$(tc-arch-kernel)
)
+ if type -P xz ; then
+ export XZ_OPT="-T$(makeopts_jobs)"
+ fi
+
+ if type -P zstd ; then
+ export ZSTD_NBTHREADS="$(makeopts_jobs)"
+ fi
+
restore_config .config
[[ -f .config ]] || die "Ebuild error: please copy default config into .config"
I'm think that we need an override for these values. Just because
someone is using -j12 to compile source files in parallel (which has no
real drawback), it doesn't mean that that person wants to use 12-thread parallel xz/zstd that will actually reduce compression ratio for minimal
gain (I mean, most of these files won't even use parallel compression
because they're too small).
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (0 / 16) |
| Uptime: | 162:14:57 |
| Calls: | 12,094 |
| Calls today: | 2 |
| Files: | 15,000 |
| Messages: | 6,517,780 |