Thread (36 messages) 36 messages, 4 authors, 2025-07-05

Re: [PATCH 0/5] powerpc: Implement masked user access

From: David Laight <hidden>
Date: 2025-07-05 18:33:36
Also in: linux-fsdevel, linux-mm, lkml

On Thu, 26 Jun 2025 17:01:48 -0500
Segher Boessenkool [off-list ref] wrote:
On Thu, Jun 26, 2025 at 07:56:10AM +0200, Christophe Leroy wrote:
...
I have no idea why you think power9 has it while older CPUS do not.  In
the GCC source code we have this comment:
  /* For ISA 2.06, don't add ISEL, since in general it isn't a win, but
     altivec is a win so enable it.  */
and in fact we do not enable it for ISA 2.06 (p8) either, probably for
a similar reason.
Odd, I'd have thought that replacing a conditional branch with a
conditional move would pretty much always be a win.
Unless, of course, you only consider benchmark loops where the
branch predictor in 100% accurate.

OTOH isn't altivec 'simd' instructions?
They pretty much only help for loops with lots of iterations.
I don't know about ppc, but I've seen gcc make a real 'pigs breakfast'
of loop vectorisation on x86.

For the linux kernel (which as Linus keeps reminding people) tends
to run 'cold cache', you probably want conditional moves in order
to avoid mis-predicted branches and non-linear execution, but
don't want loop vectorisation because the setup and end cases
cost too much compared to the gain for each iteration.

	David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help