From: torvic9@mailbox.org
To: "masahiroy@kernel.org" <masahiroy@kernel.org>,
"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>
Subject: [PATCH] Makefile: use smaller dictionary size for xz module compression
Date: Wed, 16 Dec 2020 13:58:02 +0100 (CET) [thread overview]
Message-ID: <924931182.70312.1608123482150@office.mailbox.org> (raw)
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>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 076d4e6b9..f9a6d0a4d 100644
--- a/Makefile
+++ b/Makefile
@@ -1058,7 +1058,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
--
2.29.2
next reply other threads:[~2020-12-16 12:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 12:58 torvic9 [this message]
2020-12-21 11:17 ` [PATCH] Makefile: use smaller dictionary size for xz module compression Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=924931182.70312.1608123482150@office.mailbox.org \
--to=torvic9@mailbox.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=masahiroy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.