From: David Sterba <dsterba@suse.cz>
To: Usama Arif <usama.arif@linux.dev>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Eric Biggers <ebiggers@kernel.org>,
David Sterba <dsterba@suse.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Nick Terrell <terrelln@fb.com>,
Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
yosry@kernel.org, Johannes Weiner <hannes@cmpxchg.org>,
Nhat Pham <nphamcs@gmail.com>,
Chengming Zhou <chengming.zhou@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Kernel Team <kernel-team@meta.com>
Subject: Re: [PATCH 0/3] zstd: probe the CPU for BMI2 support once, not per context
Date: Mon, 31 Aug 2026 19:08:23 +0200 [thread overview]
Message-ID: <20260831170823.GH9053@suse.cz> (raw)
In-Reply-To: <c0bca273-1395-419a-a2eb-5627f2243452@linux.dev>
On Fri, Aug 28, 2026 at 10:54:07PM +0100, Usama Arif wrote:
> > pattern entirely, and be taught to have a *helper* macro that just turns
> > into 0 for when DYNAMIC_BMI2 is not set, and turns into using that stupid
> > flag in user mode, and for the kernel it should just turn into that
> > "cpu_feature_enabled(X86_FEATURE_BMI2)"
> >
> > Why does it check for both BMI1 and BMI2 anyway? And Arif added an
> > extra check for ABM. That all looks bogus. You can't have BMI2 without
> > having BMI1, so all this code looks completely bogus to begin with.
> >
>
> The three checks came from interpreting BMI2_TARGET_ATTRIBUTE("lzcnt,bmi,bmi2")
> as requiring all three feature bits. Agreed that this is unnecessary here.
> The kernel path should check only X86_FEATURE_BMI2.
>
> I was also trying to preserve zstd’s standalone-library behavior.
I've created https://github.com/facebook/zstd/issues/4752 upstream so
the canges can be synced back and not lost on next update. Regarding the
whole ZSTD code update, there's no 1.6.0 release yet.
next prev parent reply other threads:[~2026-08-31 17:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-28 20:19 [PATCH 0/3] zstd: probe the CPU for BMI2 support once, not per context Linus Torvalds
2026-08-28 21:54 ` Usama Arif
2026-08-31 17:08 ` David Sterba [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-08-26 12:25 Usama Arif
2026-08-26 17:10 ` Nhat Pham
2026-08-27 2:39 ` Eric Biggers
2026-08-27 14:21 ` Usama Arif
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=20260831170823.GH9053@suse.cz \
--to=dsterba@suse.cz \
--cc=chengming.zhou@linux.dev \
--cc=dsterba@suse.com \
--cc=ebiggers@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@meta.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nphamcs@gmail.com \
--cc=shakeel.butt@linux.dev \
--cc=terrelln@fb.com \
--cc=torvalds@linux-foundation.org \
--cc=usama.arif@linux.dev \
--cc=yosry@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox