Skip to contentSkip to conversation

Decompressors: Add boot-time XZ support

PATCH Pavel Vasilyev 2 participants 2 messages Dec 10, 2010 2 messages not in the archive x86

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 1 line · Lasse Collin

From: Lasse Collin <[email protected]>

[--- ням ---]

Quoted 9 lines
(quoted diff) +8 -0
+config KERNEL_XZ
+	bool "XZ"
+	depends on HAVE_KERNEL_XZ
+	help
+	  XZ uses the LZMA2 algorithm and instruction set specific
+	  BCJ filters which can improve compression ratio of executable
+	  code. The size of the kernel is about 30% smaller with XZ in
+	  comparison to gzip. On architectures for which there is a BCJ

Review

Quoted 10 lines
(quoted diff) +7 -0
+	  filter (i386, x86_64, ARM, IA-64, PowerPC, and SPARC), XZ
+	  will create a few percent smaller kernel than plain LZMA.
+
+	  The speed is about the same as with LZMA: The decompression
+	  speed of XZ is better than that of bzip2 but worse than gzip
+	  and LZO. Compression is slow.
+
 config KERNEL_LZO
 	bool "LZO"
 	depends on HAVE_KERNEL_LZO

Not worked without this:

--- кусь ---

arch/x86/Kconfig +1 -0
index e330da2..d27a9c7 100644
@@ -52,6 +52,7 @@ config X86
        select HAVE_KERNEL_BZIP2
        select HAVE_KERNEL_LZMA
        select HAVE_KERNEL_LZO
+       select HAVE_KERNEL_XZ
        select HAVE_HW_BREAKPOINT
        select HAVE_MIXED_BREAKPOINTS_REGS
        select PERF_EVENTS

--- кусь ---

.... and for other archs needed.

#3 lore raw
Quoted 45 lines · On 2010-12-10 Pavel Vasilyev wrote:
Quoted 1 line · Lasse Collin

From: Lasse Collin <[email protected]>

[--- ням ---]

Quoted 10 lines
(quoted diff) +10 -0
+config KERNEL_XZ
+	bool "XZ"
+	depends on HAVE_KERNEL_XZ
+	help
+	  XZ uses the LZMA2 algorithm and instruction set specific
+	  BCJ filters which can improve compression ratio of executable
+	  code. The size of the kernel is about 30% smaller with XZ in
+	  comparison to gzip. On architectures for which there is a BCJ
+	  filter (i386, x86_64, ARM, IA-64, PowerPC, and SPARC), XZ
+	  will create a few percent smaller kernel than plain LZMA.

Review

Quoted 10 lines
(quoted diff) +5 -0
+
+	  The speed is about the same as with LZMA: The decompression
+	  speed of XZ is better than that of bzip2 but worse than gzip
+	  and LZO. Compression is slow.
+
 
 config KERNEL_LZO
 
 	bool "LZO"
 	depends on HAVE_KERNEL_LZO

Not worked without this:

--- кусь ---

arch/x86/Kconfig +1 -1
index e330da2..d27a9c7 100644
@@ -52,6 +52,7 @@ config X86
        select HAVE_KERNEL_BZIP2
        select HAVE_KERNEL_LZMA
        select HAVE_KERNEL_LZO
+       select HAVE_KERNEL_XZ
        select HAVE_HW_BREAKPOINT
        select HAVE_MIXED_BREAKPOINTS_REGS
        select PERF_EVENTS
 
--- кусь ---
Quoted 1 line

.... and for other archs needed.

Support for XZ-compressed kernel on x86 is in a separate patch:

    http://lkml.org/lkml/2010/12/2/236

I hope other people will do similar patches for other archs later.

Signature · 1 line
Lasse Collin  |  IRC: Larhzu @ IRCnet & Freenode