>From "Comment bridged from LTC Bugzilla" in a bug discussion:

"FWIW, I verified this on z14, and there clearly lz4 is (as expected)
the fastest decompression algorithm.

With vanilla 5.3-rc6 and defconfig I get the following kernel uncompression 
times:
lzo: 27us
lz4: 24us

An initrd (uncompressed size ~55MB) gets these uncompression times:
lzo: 62us
lz4: 49us

So I'd clearly vote to switch to lz4 on s390 as well."

Also:


"I also instrumented the kernel code to only measure the time to decompress the 
kernel. If its stckf or stcke doesn't matter in this case.
Note that if you shift a tod clock value 12 bits to the right will give you 
microseconds. (All numbers I posted were actually milliseconds not microseconds 
by the way).

I measured both runs (z13 + z14) when running within z/VM and IPL'ed
from the punch card reader.

Times used for decompressing the initrd were just extracted from dmesg;
no kernel instrumentation required here, since there are two messages
provided before and after initrd decompression.

Find below an extract of the patch to measure decompression time.

diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c
index 7b0d054..cee3d97 100644
--- a/arch/s390/boot/startup.c
+++ b/arch/s390/boot/startup.c
@@ -146,7 +146,10 @@ void startup_kernel(void)
}

if (!IS_ENABLED(CONFIG_KERNEL_UNCOMPRESSED)) {
+ start = get_tod_clock();
img = decompress_kernel();
+ end = get_tod_clock();
+ time = (end - start) >> 12;
memmove((void *)vmlinux.default_lma, img, vmlinux.image_size);
} else if (__kaslr_offset)
memcpy((void *)vmlinux.default_lma, img, vmlinux.image_size);
..."

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1840934

Title:
  Change kernel compression method to improve boot speed

Status in linux package in Ubuntu:
  Fix Released

Bug description:
  Colin King has done some analysis of kernel boot speed using different
  kernel compression methods. Results for x86 are at:

  
https://kernel.ubuntu.com/~cking/boot-speed-eoan-5.3/kernel-compression-method.txt
  
https://kernel.ubuntu.com/~cking/boot-speed-eoan-5.3/boot-speed-compression-5.3-rc4.ods

  Testing of s390 gave the following:

  GZIP    31528972
  LZ4     192348049
  LZO      85990145

  From Colin: "I used the monotonic TOD timer using the stckf opcode to
  fetch a 64 bit time value.  Not sure how this maps to 'real time' in
  seconds."

  Conclusion: We should switch x86 to LZ4 and s390 to LZO. PPC and ARM
  do not support LZO or LZ4, so we will stick with gzip there.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1840934/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to