From: Andreas Schwab <schwab@linux-m68k.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
x86@kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] futex: improve user space accesses
Date: Sun, 08 Dec 2024 23:54:53 +0100 [thread overview]
Message-ID: <87bjxl6b0i.fsf@igel.home> (raw)
In-Reply-To: <20241122193305.7316-1-torvalds@linux-foundation.org> (Linus Torvalds's message of "Fri, 22 Nov 2024 11:33:05 -0800")
On Nov 22 2024, Linus Torvalds wrote:
> Josh Poimboeuf reports that he got a "will-it-scale.per_process_ops 1.9%
> improvement" report for his patch that changed __get_user() to use
> pointer masking instead of the explicit speculation barrier. However,
> that patch doesn't actually work in the general case, because some (very
> bad) architecture-specific code actually depends on __get_user() also
> working on kernel addresses.
>
> A profile showed that the offending __get_user() was the futex code,
> which really should be fixed up to not use that horrid legacy case.
> Rewrite futex_get_value_locked() to use the modern user acccess helpers,
> and inline it so that the compiler not only avoids the function call for
> a few instructions, but can do CSE on the address masking.
This breaks userspace on ppc32. As soon as /init in the initrd is
started the kernel hangs (without any messages).
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
next prev parent reply other threads:[~2024-12-08 23:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 19:33 [PATCH] futex: improve user space accesses Linus Torvalds
2024-11-23 2:47 ` Josh Poimboeuf
2024-12-08 22:54 ` Andreas Schwab [this message]
2024-12-09 0:32 ` Linus Torvalds
2024-12-09 8:00 ` Christophe Leroy
2024-12-09 18:32 ` Andreas Schwab
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=87bjxl6b0i.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=torvalds@linux-foundation.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.