From: Ingo Molnar <mingo@kernel.org>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
x86@kernel.org, linux-kernel@vger.kernel.org,
Andy Lutomirski <luto@kernel.org>, Nadav Amit <namit@vmware.com>,
Brian Gerst <brgerst@gmail.com>,
Denys Vlasenko <dvlasenk@redhat.com>,
"H . Peter Anvin" <hpa@zytor.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>,
Josh Poimboeuf <jpoimboe@redhat.com>
Subject: Re: [RFC PATCH 0/4] x86/percpu: Use segment qualifiers
Date: Mon, 2 Oct 2023 15:22:17 +0200 [thread overview]
Message-ID: <ZRrECdIoKCXALl39@gmail.com> (raw)
In-Reply-To: <CAFULd4YsPnCfw-NV_0ck1_za=WPc-FxYKV1bb99UcAwMJ=34YA@mail.gmail.com>
* Uros Bizjak <ubizjak@gmail.com> wrote:
> > > Clang isn't much better, but at least it doesn't generate bad code. It
> > > just crashes with an internal compiler error on the above trivial
> > > test-case:
> > >
> > > fatal error: error in backend: cannot lower memory intrinsic in
> > > address space 257
> > >
> > > which at least tells the user that they can't copy memory from that
> > > address space. But once again shows that no, this feature is not ready
> > > for prime-time.
> > >
> > > If literally the *first* thing I thought to test was this broken, what
> > > else is broken in this model?
> > >
> > > And no, the kernel doesn't currently do the above kinds of things.
> > > That's not the point. The point was "how well is this compiler support
> > > tested". The answer is "not at all".
>
> I don't agree with the above claims. The generated code was the product
> of a too limited selection of available copy algorithms in unusual
> circumstances, but even in the case of generic fallback code, the
> generated code was *correct*. As said in the previous post, and
> re-confirmed by the patch in the PR, the same code in GCC handles
> implicit (__thread) and named address spaces. At the end of the day, the
> problematic code was merely a missing-optimization (the bug with the
> lowest severity in GCC).
Yeah, so the feature generated really crappy code for Linus's
testcase. That's never a good sign for compiler features, full stop.
Do we want the kernel to be at the bleeding edge of an
unusual compiler feature that is only used internally by the
compiler in a very specific fashion?
Maybe, but Linus's reluctance and caution is justified IMHO,
and at minimum this feature needs some careful evaluation of
long-time suitability [*] ...
Thanks,
Ingo
[*] euphemism for: "I have no idea how to evaluate this risk"... :-/
next prev parent reply other threads:[~2023-10-02 13:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-01 13:14 [RFC PATCH 0/4] x86/percpu: Use segment qualifiers Uros Bizjak
2023-10-01 13:14 ` [RFC PATCH 1/4] x86/percpu: Update arch/x86/include/asm/percpu.h to the current tip Uros Bizjak
2023-10-01 13:14 ` [RFC PATCH 2/4] x86/percpu: Detect compiler support for named address spaces Uros Bizjak
2023-10-01 13:14 ` [RFC PATCH 3/4] x86/percpu: Use compiler segment prefix qualifier Uros Bizjak
2023-10-01 13:14 ` [RFC PATCH 4/4] x86/percpu: Use C for percpu read/write accessors Uros Bizjak
2023-10-01 17:07 ` [RFC PATCH 0/4] x86/percpu: Use segment qualifiers Linus Torvalds
2023-10-01 19:53 ` Uros Bizjak
2023-10-01 20:21 ` Linus Torvalds
2023-10-01 20:30 ` Linus Torvalds
2023-10-01 21:47 ` Uros Bizjak
2023-10-02 12:13 ` Uros Bizjak
2023-10-02 13:22 ` Ingo Molnar [this message]
2023-10-03 9:49 ` Uros Bizjak
2023-10-03 13:38 ` Ingo Molnar
2023-10-03 19:31 ` Linus Torvalds
2023-10-03 19:43 ` Ingo Molnar
2023-10-03 21:43 ` Linus Torvalds
2023-10-04 6:01 ` Uros Bizjak
2025-04-29 16:31 ` Uros Bizjak
2025-04-29 16:49 ` Linus Torvalds
2025-04-29 17:05 ` Uros Bizjak
2025-04-29 17:44 ` Linus Torvalds
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=ZRrECdIoKCXALl39@gmail.com \
--to=mingo@kernel.org \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=namit@vmware.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=ubizjak@gmail.com \
--cc=x86@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