summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTor Vic <torvic9@mailbox.org>2020-12-16 13:58:02 +0100
committerMasahiro Yamada <masahiroy@kernel.org>2021-02-11 21:11:19 +0100
commitdb4632c65eb505410f2e6be9c4d50226c973a129 (patch)
treed99439e7c9069ffaf16bdcbe223c01bff8a1bbf5 /Makefile
parentia64: remove generated/nr-irqs.h generation to fix build warning (diff)
downloadlinux-db4632c65eb505410f2e6be9c4d50226c973a129.tar.xz
linux-db4632c65eb505410f2e6be9c4d50226c973a129.zip
Makefile: use smaller dictionary size for xz module compression
By default, xz without parameters uses a dictionary size of 8 MB. However, most modules are much smaller than that. The xz manpage states that 'increasing dictionary size usually improves compression ratio, but a dictionary bigger than the uncompressed file is waste of memory'. Use a dictionary size of 2 MB for module compression, resulting in slightly higher compression speed while still maintaining a good compression ratio. Signed-off-by: Tor Vic <torvic9@mailbox.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ade44ac4cc2f..f0cfcc7e0886 100644
--- a/Makefile
+++ b/Makefile
@@ -1053,7 +1053,7 @@ ifdef CONFIG_MODULE_COMPRESS
mod_compress_cmd = $(KGZIP) -n -f
endif # CONFIG_MODULE_COMPRESS_GZIP
ifdef CONFIG_MODULE_COMPRESS_XZ
- mod_compress_cmd = $(XZ) -f
+ mod_compress_cmd = $(XZ) --lzma2=dict=2MiB -f
endif # CONFIG_MODULE_COMPRESS_XZ
endif # CONFIG_MODULE_COMPRESS
export mod_compress_cmd