linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: use smaller dictionary size for zstd module compression
@ 2021-09-10 13:09 Piotr Gorski
  2021-09-17 15:07 ` Piotr Górski
  0 siblings, 1 reply; 3+ messages in thread
From: Piotr Gorski @ 2021-09-10 13:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-kbuild, Michal Marek, Masahiro Yamada, Nick Desaulniers,
	Piotr Gorski

By default, zstd without parameters uses a dictionary size of 8 MB.
However, most modules are much smaller than that.
Use a dictionary size of 2 MB for module compression, resulting in
slightly higher compression speed while still maintaining a good
compression ratio.
The --zstd=wlog=21 option is equivalent to --lzma2=dict=2MiB used in XZ compression.

Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
---
 scripts/Makefile.modinst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index ff9b09e4cfca..c3475e5aca7c 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -97,7 +97,7 @@ quiet_cmd_gzip = GZIP    $@
 quiet_cmd_xz = XZ      $@
       cmd_xz = $(XZ) --lzma2=dict=2MiB -f $<
 quiet_cmd_zstd = ZSTD    $@
-      cmd_zstd = $(ZSTD) -T0 --rm -f -q $<
+      cmd_zstd = $(ZSTD) --zstd=wlog=21 -T0 --rm -f -q $<
 
 $(dst)/%.ko.gz: $(dst)/%.ko FORCE
 	$(call cmd,gzip)
-- 
2.33.0.142.ge0a2f5cbc5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-19 11:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10 13:09 [PATCH] kbuild: use smaller dictionary size for zstd module compression Piotr Gorski
2021-09-17 15:07 ` Piotr Górski
2021-09-19 11:36   ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).