From: "Arnd Bergmann" <arnd@arndb.de>
To: "Andrew Morton" <akpm@linux-foundation.org>,
"Biplab Raut" <Biplab.Raut@amd.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
"Gao Xiang" <hsiangkao@linux.alibaba.com>,
"Nick Terrell" <terrelln@fb.com>,
yann.collet.73@gmail.com, guoxuenan@huawei.com,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <n.schier@fritz.com>,
"Kees Cook" <kees@kernel.org>
Subject: Re: [PATCH] lib/lz4: add software-pipelined prefetch to decode fast loop
Date: Wed, 14 Oct 2026 10:50:41 +0200 [thread overview]
Message-ID: <e2afcf01-c77a-4da6-8f56-237d97abdaf6@app.fastmail.com> (raw)
In-Reply-To: <20261012203257.614d88c12146544aa6487b4d@linux-foundation.org>
On Tue, Oct 13, 2026, at 05:32, Andrew Morton wrote:
> On Tue, 13 Oct 2026 03:20:10 +0000 Biplab Raut <Biplab.Raut@amd.com> wrote:
>>
>> Kernel LZ4 median scan: 1.0994 s
>> Patched median scan: 1.0472 s
>> Median paired speedup: 5.09% (range 4.19%–6.99%)
>> Patched was faster in all 15 rounds.
>
> Well that's nice. I can't actually recall a case where prefetch made a
> measurable difference, although I'm sure there are such cases.
>
> We used to use prefetches often (10+ years ago) but it seems to fallen
> out of favor. This code is a prime candidate. mm/ barely uses
> prefetch. Maybe it should,
Unfortunately the patch causes a build regression on x86 when using lz4
compressed bzImage files:
x86_64-linux-ld: error: unplaced orphan section `.altinstructions' from `arch/x86/boot/compressed/misc.o'
x86_64-linux-ld: error: unplaced orphan section `.altinstr_replacement' from `arch/x86/boot/compressed/misc.o'
I see that the zero-day bot has also reported this[1].
The problem is that the prefetch() helpers use SMP alternatives
that are not available in the decompressor. This has been a problem
in other patches before [2].
Not sure if there is an easy way to stop the decompressor from using
the alternatives here, for 7.4 I assume the only option is to drop
the patch and try again once that is resolved.
Arnd
[1] https://lore.kernel.org/all/202610140857.6jRIqXf1-lkp@intel.com/
[2] https://lore.kernel.org/all/CAHk-=whrc-ruKs4Kt90EGzKd+pYhZFKs6bgBVCV=55BK+p1nzg@mail.gmail.com/
prev parent reply other threads:[~2026-10-14 8:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 3:20 Biplab Raut
2026-10-13 3:32 ` Andrew Morton
2026-10-14 8:50 ` Arnd Bergmann [this message]
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=e2afcf01-c77a-4da6-8f56-237d97abdaf6@app.fastmail.com \
--to=arnd@arndb.de \
--cc=Biplab.Raut@amd.com \
--cc=akpm@linux-foundation.org \
--cc=guoxuenan@huawei.com \
--cc=hsiangkao@linux.alibaba.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=n.schier@fritz.com \
--cc=nathan@kernel.org \
--cc=terrelln@fb.com \
--cc=yann.collet.73@gmail.com \
/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®