| Summary: | Slow OpenSSL 64bit performance - fails tests with optimization flags | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Brent Baude (RETIRED) <ranger> |
| Component: | [OLD] Core system | Assignee: | ppc64 architecture team <ppc64> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | joslwah, toolchain |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | Update the ebuild for openssl-0.9.7i to give large speed improvement. | ||
|
Description
Brent Baude (RETIRED)
2006-04-20 13:37:13 UTC
adding ppc64 team i'm pretty sure it's the ppc64 toolchain Created attachment 86968 [details, diff]
Update the ebuild for openssl-0.9.7i to give large speed improvement.
O.k. Two more sets of data points. Here is a patch that gives a large improvement in speed, but it kinda overlooks the problem.
The second is that the problem with -O2 (or greater) is crypto/ripemd. This is the rmd160 hash algorithm. I haven't seen this used much, but I may just not be observant enough. With this algorithm removed then all the tests pass with full (well -O2) optimisation. I don't see any reason why they should fail at -Os or -O3 though since they pass all the tests before the ripemd ones.
Need more information than this?
I agree the problem is probably the toolchain. Further details: 1) All but crypto/ripemd compiles, tests, and (as far as I've seen) runs fine at -O2. This implies to mean that there is no systemic problem with the openssl library. 2) The whole library compiles, tests and runs fine (again, as far as I've seen) at -O. Together with (1) this suggests that there is a probably an optimisation bug in gcc (-3.4.6). 3) That there are similar problems with crypto/ripemd without optimisation flags suggests to me that the problem is indeed gcc. From what I've read gcc is not always that reliable without any -O flags. So, apart from having a sticking plaster to cover the problem (using the previous patch to set -O) the next step probably seems to be getting some compiler guru to look at the crypto/ripemd case. This is a relatively small test case. The rest of the library appears to be reliable and trustworthy so this example should demonstrate the compiler issue. I'm not up on powerpc assembly so can't push this much further forward. you'd prob be better off doing tests with gcc-4.1.x on ppc64 and it'd be a ton of help to rip down the crypto/ripemd stuff to a simpler test case for a compiler guru to review I compiled once using an unmodified ebuild and no test failed. then I applied the patch attached in the bug, but left out the 'replace-flags' parts. It compiled just fine using CFLAGS="-O2 -pipe -mtune=power5 -mcpu=power5" and passed all tests. The tests run quicker than without optimazion. This is gcc-4.1.0-r1. gcc 4.1 is stable. guess this is fixed then. marking as FIXED. please reopen if I misunderstood the situation. |