Ssh / scp broken with O3

On target mvebu, between r7474 - r7488, built with O3, using ssh or scp causes dropbear to peg (100%) a single core on either a rango and mamba, with no timeout of the ssh client. Looking at the commit log nothing really leaps out as a likely suspect, not sure why the LTO stuff would have an impact here, but nothing other than backing off to Os seems to resolve the issue.

Wondering if anyone else is seeing this issue, just trying to narrow down on the cause. Maybe I'll take a kick at ath79 on C7V2 to check for same behaviour.

Excacly because of such misbehavior i do not use -O3...

What about -O2, -O1 or only O?

Should have stated that I have been using O3 for a long time with no issues, on targets mvebu, ar71xx and recently on ath79 (but not since this reared its head). This is a recent occurrence, without an obvious case as to the regression, so looking to address what may have occurred.

Yes, take a look into this...

There are some or probably many packages that strip of the -O options or does set it´s own (always the last one is used) optimization. For example openssl or openvpn...

For the kernel you could also not set -O3, you will have only the option for performance (-O2) or for size (-Os)...
Don´t think it´s worth the not very huge performance gain for some not heavily used user space packages.
Especially on a router device that should work without issues and does the most work in kernel space.

https://wiki.gentoo.org/wiki/GCC_optimization#-O
Please read that

Regarding optimization in general, these are "safe" hacks...

https://github.com/openwrt/openwrt/pull/858 (Generic)
https://github.com/diizzyy/openwrt/commit/f425e8893f8b5188d5c7da41693ab96d9244f328 (ARM: Armada 385 only, greatly improves performance of NEON instructions are available in lib/application)
https://github.com/diizzyy/openwrt/commit/61d76ec732ccf0e40ba22f7242f85ba69390f846 (MIPS: should be benchmarked properly but in my simple tests it's faster at the expense of binary size)
https://github.com/diizzyy/openwrt/commit/d948159e571de1e54f5c20041d075c4e0a654b6d (MIPS: depends on Atheros/QCA SoC, 74kc should be marginally better than 24kc)
https://github.com/diizzyy/openwrt/commit/663e32d0f1c68002407e56ca571982041b3f9e9d (Generic, sets O2 by default)
https://github.com/diizzyy/openwrt/commit/35556552f966f6dc38345bd90328e1e60c21cc1f (MT7621 only, needs benchmarkning)

There are a few packages that greatly benefits using O3 such as zlib (option available), OpenSSL (option available), LAME (option available), ffmpeg (not available) to name a few.

Somewhere along the way a commit resolved, or maybe it is GCC 9.x, but O3 works again, please proceed with great rapidity.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.