mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Finn Thain <fthain@linux-m68k.org>
To: Artem Novak <artem122novak@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-m68k@lists.linux-m68k.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH] m68k: add Zstandard-compressed vmlinux target
Date: Fri, 4 Dec 2026 12:00:14 +1100 (AEDT)	[thread overview]
Message-ID: <d04dc637-544c-38b4-f4ce-ab63cdd5c972@linux-m68k.org> (raw)
In-Reply-To: <CAPufuhZVOArUJUe_PQ_4a2jZ_ju1hfARdw6SVudoS_RRn2j0dg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2526 bytes --]


On Thu, 3 Dec 2026, Artem Novak wrote:

> Hello,
> 
> On Wed, Dec 2, 2026 at 5:38 PM Finn Thain <fthain@linux-m68k.org> wrote:
> > With which bootloader did you test your patch? How shall reviewers test
> > it?
> 
> I tested the decompressed kernel under QEMU,
> but I haven't tested a bootloader loading the Zstandard compressed
> image directly.
> 

If this is intended for CONFIG_VIRT then it's hard to see much benefit. 
You can help reviewers to understand the problem that your patch solves by 
following the usual kernel development process:

    "[the patch] description can be as long as is required; it should say 
    what the patch does and why it should be applied to the kernel."

> Regarding the reviewers part, I will provide steps on how to verify
> the target in the v2.
> Also how am I going to reach out to them?
> 

Please read Documentation/process/5.Posting.rst
and so on.

> > A compression level of 19 would be infeasible on m68k hardware as it's too
> > expensive to uncompress it. Compared to level 1, level 19 costs about 30x
> > the CPU time (measured on this IA32 laptop, with huge caches relative to
> > 68040).
> >
> > Recall that any bootloader needs sufficient RAM for the dictionary, the
> > uncomressed kernel image, plus an initrd, as well as whatever overhead is
> > imposed by the loader operating system. So your code probably won't work
> > on small systems (anything with less than about 32 MB of memory).
> >
> > $ f=vmlinux ; zstd -1 -c < $f | ( time zstd -M1M -dc ) | cmp - $f
> >
> > real    0m0.089s
> > user    0m0.037s
> > sys     0m0.000s
> > $ f=vmlinux ; zstd -19 -c < $f | ( time zstd -M8M -dc ) | cmp - $f
> >
> > real    0m2.835s
> > user    0m0.049s
> > sys     0m0.005s
> > $ f=vmlinux ; zstd -19 -c < $f | ( time zstd -M7M -dc ) | cmp - $f
> > /*stdin*\ : Decoding error (36) : Frame requires too much memory for decoding
> > /*stdin*\ : Window size larger than maximum : 8388608 > 7340032
> > /*stdin*\ : Use --long=23 or --memory=8MB
> >
> > real    0m1.404s
> > user    0m0.002s
> > sys     0m0.000s
> > cmp: EOF on '-' which is empty
> > $
> 
> Oh I see. I'll revise the patch to v2 in a day or so.
> Also one more thing: does your testing laptop have i386 instructions
> or familiar?
> 

I don't plan to use zstd on IA32. That 30x I quoted was merely a ballpark 
figure intended to give you some insight into time-space tradeoff involved 
in data compression in case you're unfamiliar with it.

  reply	other threads:[~2026-12-04  1:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  7:32 Artem Novak
2026-12-02 23:38 ` Finn Thain
2026-12-03  6:37   ` Artem Novak
2026-12-04  1:00     ` Finn Thain [this message]
2026-12-04  1:16       ` Artem Novak
2026-12-04  8:01         ` Geert Uytterhoeven
2026-12-04 16:04           ` Artem Novak
2026-12-05  0:41             ` Finn Thain
2026-12-03 10:15 ` Daniel Palmer
2026-12-03 10:44   ` Geert Uytterhoeven
2026-12-03 22:02   ` Artem Novak

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=d04dc637-544c-38b4-f4ce-ab63cdd5c972@linux-m68k.org \
    --to=fthain@linux-m68k.org \
    --cc=artem122novak@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®