First of all , thanks for all your experiences ;-)
Forgive me , i didn't response to all your mail.

So let me do a summary , after collection all you mails:

I) generating CPU featured assemble takes longer time , also risks in creating wrong code II) customize compiler flag on OpenBSD doesn't values so much as what we costs to achieve it.

Thanks again !

Ivan Nudzik wrote:
        Aaron,
I built 3.7 base + OpenVPN for VPN gateway with custom CFLAGS/LDFLAGS and it worked well for years, even with such aggressive flags as CFLAGS="-O3 -march=c3 -mmmx -m3dnow -fomit-frame-pointer" and LDFLAGS="-Wl,-z,combreloc -Wl,-O2 -Wl,--sort-common -Wl,--enable-new-dtags". But build was broken and I must to fix many things in OpenBSD makefiles, to get binaries done. Such LDFLAGS significantly speedups application loading, cause it's doing the same things as prelink utility, but it link time. CFLAGS helps me speedup C3 500MHz router device as about 20-30%, but it was synthetic measurement on nbench built with and without CLFAGS. Kernel build was also forced for such CFLAGS and no stability issue and subjectively more speedy.
I've read about that , e.g kernel avoid intel MMX instructions , cause it may cause interrupts (handle lots of register together to combine a bigger register)
It was few years ago, when I've had mood to compile everything with all CPU features on. ;-)
Yeah , i'm so interesting with CPU features on my Linux right now , like what you did a few years ago ;-)

Looking at this concrete OpenBSD build my summary is that it took me more than 20h to build it and speedups was not such significant, comparing that it should took an about 1h to do the same functionality with release binaries only bit slow. And two other things to keep on mind: nowadays x86 CPUs has very heuristic instruction handling/prefetching so it will not speedup as much with custom CFLAGS; OpenBSD still use gcc 3.3.5 which can't do as good optimization for new CPUs as to loose time with custom flags build. And many makefiles in OpenBSD base don't handle CFLAGS/LDFLAGS correctly. The last time I tried it (about 1/2y. ago), I made only kernel with custom flags (for kernel it is COPTS variable if I remember right). Rest of system didn't build and I didn't had a time to bother with broken makefiles. So if you don't want to do HPC, don't loose time with custom flags. I if you want to do HPC, choose other operating system, cause OpenBSD strengths are other.

I take your suggestion , ain't gonna waste time playing gcc's flags.


--
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode

Reply via email to