[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-05-22 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #18 from Bill Schmidt --- I asked around a bit. On x86, user-user attacks are not mitigated by default. To enable user-user mitigation: echo 2 > /sys/kernel/debug/x86/ibrs_enabled My source tells me: 8<--- Red Hat

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-05-20 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #17 from Bill Schmidt --- OK, thanks! I'd be very interested in hearing what you discover.

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-05-20 Thread tpearson at raptorengineering dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #16 from Timothy Pearson --- (In reply to Bill Schmidt from comment #15) > PHP's reliance on frequent indirect branches makes it essentially the worst > case for this sort of thing. When Spectre v2 CVE mitigations are in place > for

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-05-20 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #15 from Bill Schmidt --- PHP's reliance on frequent indirect branches makes it essentially the worst case for this sort of thing. When Spectre v2 CVE mitigations are in place for user code, you will see performance issues on all

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-05-20 Thread tpearson at raptorengineering dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #14 from Timothy Pearson --- (In reply to Bill Schmidt from comment #13) > This was prototyped and measured against the firmware fixes with > indistinguishable results. So the complexity of a software solution, with > its impacts on

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-05-20 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #13 from Bill Schmidt --- This was prototyped and measured against the firmware fixes with indistinguishable results. So the complexity of a software solution, with its impacts on Linux distributions, was not warranted. (That is,

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-05-19 Thread tpearson at raptorengineering dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #12 from Timothy Pearson --- After quite a bit of investigation, this is down to the Spectre v2 user mode protections on POWER9, which (from what I understand) involve completely disabling the branch predictor. My question then

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-04-09 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #11 from Bill Schmidt --- (In reply to Timothy Pearson from comment #10) > > It's even slow compared to P8 with mitigations applied. Do you have a link > to the hostboot commit that may have enabled the P9 mitigation, or to the >

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-04-05 Thread tpearson at raptorengineering dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #10 from Timothy Pearson --- (In reply to Bill Schmidt from comment #9) > You mentioned you're on a POWER9 machine. It could be that you have > firmware with Spectre mitigations applied, which will affect all indirect > branches.

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-04-05 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #9 from Bill Schmidt --- You mentioned you're on a POWER9 machine. It could be that you have firmware with Spectre mitigations applied, which will affect all indirect branches. It may be that you do not have Spectre mitigations

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-04-05 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #8 from Richard Biener --- (In reply to Timothy Pearson from comment #4) > (In reply to Andrew Pinski from comment #3) > > This is 100% the equivalent code. > > > > jmp *(%r15) # opline.199_67->handler > > Does two things: > >

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-04-04 Thread dje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #7 from David Edelsohn --- One possibility is bad luck and the branch happens to fall on an address that conflicts with another branch.

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-04-04 Thread tpearson at raptorengineering dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #6 from Timothy Pearson --- Understood. I'll update this report if we find a way to get the predictor working optimally in this scenario.

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-04-04 Thread dje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 David Edelsohn changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-04-04 Thread tpearson at raptorengineering dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #4 from Timothy Pearson --- (In reply to Andrew Pinski from comment #3) > This is 100% the equivalent code. > > jmp *(%r15) # opline.199_67->handler > Does two things: > loads a pointer from %r15 and then jumps to that pointer.

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-04-04 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 Andrew Pinski changed: What|Removed |Added Status|WAITING |RESOLVED Last reconfirmed|2018-04-05

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-04-04 Thread tpearson at raptorengineering dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 --- Comment #2 from Timothy Pearson --- (In reply to David Edelsohn from comment #1) > What two additional instructions? x86 is a CISC architecture and Power is a > RISC architecture. x86 has an instruction that directly performs an > indirect

[Bug target/85216] Performance issue with PHP on ppc64 systems

2018-04-04 Thread dje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216 David Edelsohn changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|