* [PATCH] kbuild: Add KDEB_COMPRESS_LEVEL to control compression level
@ 2025-03-07 15:09 Matt Fleming
2025-03-13 12:38 ` Matt Fleming
0 siblings, 1 reply; 4+ messages in thread
From: Matt Fleming @ 2025-03-07 15:09 UTC (permalink / raw)
To: Masahiro Yamada, Nathan Chancellor, Nicolas Schier
Cc: linux-kernel, kernel-team, Matt Fleming
From: Matt Fleming <mfleming@cloudflare.com>
Give users more control to tradeoff compression time vs compressed size
when building debian packages with a new KDEB_COMPRESS_LEVEL option.
Here are some examples of using KDEB_COMPRESS=xz with
KDEB_COMPRESS_LEVEL=1 through to KDEB_COMPRESS_LEVEL=6 with the
bindeb-pkg target:
Level Time to compress Compressed size (bytes)
----- ---------------- -----------------------
1 0m36.771s 476909176
2 0m40.335s 474832644
3 0m43.635s 473845600
4 1m13.839s 472260012
5 1m18.657s 464442676
6 1m20.658s 464355000
Signed-off-by: Matt Fleming <mfleming@cloudflare.com>
---
scripts/package/debian/rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/package/debian/rules b/scripts/package/debian/rules
index ca07243bd5cd..616ecf1d4d1b 100755
--- a/scripts/package/debian/rules
+++ b/scripts/package/debian/rules
@@ -52,7 +52,7 @@ define binary
$(Q)dh_fixperms $(DH_OPTIONS)
$(Q)dh_gencontrol $(DH_OPTIONS) -- -f$(call mk-files,$@)
$(Q)dh_md5sums $(DH_OPTIONS)
- $(Q)dh_builddeb $(DH_OPTIONS) -- $(addprefix -Z,$(KDEB_COMPRESS))
+ $(Q)dh_builddeb $(DH_OPTIONS) -- $(addprefix -Z,$(KDEB_COMPRESS)) $(addprefix -z,$(KDEB_COMPRESS_LEVEL))
endef
.PHONY: $(binary-targets)
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] kbuild: Add KDEB_COMPRESS_LEVEL to control compression level
2025-03-07 15:09 [PATCH] kbuild: Add KDEB_COMPRESS_LEVEL to control compression level Matt Fleming
@ 2025-03-13 12:38 ` Matt Fleming
2025-03-14 10:06 ` Masahiro Yamada
0 siblings, 1 reply; 4+ messages in thread
From: Matt Fleming @ 2025-03-13 12:38 UTC (permalink / raw)
To: Masahiro Yamada, Nathan Chancellor, Nicolas Schier
Cc: linux-kernel, kernel-team, Matt Fleming
On Fri, Mar 7, 2025 at 3:09 PM Matt Fleming <matt@readmodwrite.com> wrote:
>
> From: Matt Fleming <mfleming@cloudflare.com>
>
> Give users more control to tradeoff compression time vs compressed size
> when building debian packages with a new KDEB_COMPRESS_LEVEL option.
Ping? Any feedback on this patch?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kbuild: Add KDEB_COMPRESS_LEVEL to control compression level
2025-03-13 12:38 ` Matt Fleming
@ 2025-03-14 10:06 ` Masahiro Yamada
2025-03-17 11:46 ` Matt Fleming
0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2025-03-14 10:06 UTC (permalink / raw)
To: Matt Fleming
Cc: Nathan Chancellor, Nicolas Schier, linux-kernel, kernel-team,
Matt Fleming
On Thu, Mar 13, 2025 at 9:38 PM Matt Fleming <matt@readmodwrite.com> wrote:
>
> On Fri, Mar 7, 2025 at 3:09 PM Matt Fleming <matt@readmodwrite.com> wrote:
> >
> > From: Matt Fleming <mfleming@cloudflare.com>
> >
> > Give users more control to tradeoff compression time vs compressed size
> > when building debian packages with a new KDEB_COMPRESS_LEVEL option.
>
> Ping? Any feedback on this patch?
Sorry, I missed this.
I would have missed this completely without your ping
because this was not sent to linux-kbuild ML.
(sometimes I still notice, but sometimes I do not.
Including linux-kbuild ML increases the probability of my notice)
"man dpkg-deb" describes
DPKG_DEB_COMPRESSOR_LEVEL
Sets the compressor level to use (since dpkg 1.21.10).
The -z option overrides this value.
This provides the same functionality as KDEB_COMPRESS_LEVEL
you are adding.
If you use dpkg>=1.21.10, you can do
$ DPKG_DEB_COMPRESSOR_LEVEL=1 make bindeb-pkg
KDEB_COMPRESS_LEVEL might be useful for users of old dpkg
versions, but I do not want to add an option which we know is already
duplicated, since we would end up with removing it again sooner or later.
I even want to remove the currently-supported KDEB_COMPRESS
at some point in the future.
So, I submitted a patch as a reminder for myself:
https://lore.kernel.org/linux-kbuild/20250314095337.2209653-1-masahiroy@kernel.org/T/#u
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] kbuild: Add KDEB_COMPRESS_LEVEL to control compression level
2025-03-14 10:06 ` Masahiro Yamada
@ 2025-03-17 11:46 ` Matt Fleming
0 siblings, 0 replies; 4+ messages in thread
From: Matt Fleming @ 2025-03-17 11:46 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Nathan Chancellor, Nicolas Schier, linux-kernel, kernel-team,
Matt Fleming
On Fri, Mar 14, 2025 at 10:07 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Sorry, I missed this.
> I would have missed this completely without your ping
> because this was not sent to linux-kbuild ML.
> (sometimes I still notice, but sometimes I do not.
> Including linux-kbuild ML increases the probability of my notice)
My mistake. I will include linux-kbuild in future.
> If you use dpkg>=1.21.10, you can do
>
> $ DPKG_DEB_COMPRESSOR_LEVEL=1 make bindeb-pkg
>
>
> KDEB_COMPRESS_LEVEL might be useful for users of old dpkg
> versions, but I do not want to add an option which we know is already
> duplicated, since we would end up with removing it again sooner or later.
OK makes sense.
Thanks,
Matt
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-03-17 11:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-07 15:09 [PATCH] kbuild: Add KDEB_COMPRESS_LEVEL to control compression level Matt Fleming
2025-03-13 12:38 ` Matt Fleming
2025-03-14 10:06 ` Masahiro Yamada
2025-03-17 11:46 ` Matt Fleming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox