lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	07 Feb 2007 10:54:49 +0100
From:	Andi Kleen <ak@...e.de>
To:	David Miller <davem@...emloft.net>
Cc:	dada1@...mosbay.com, mchan@...adcom.com, netdev@...r.kernel.org
Subject: Re: [PATCH] tg3 : avoid an expensive divide

David Miller <davem@...emloft.net> writes:
> 
> Because I've seen gcc optimize this properly before (at least on
> sparc64), it means that either:
> 
> 1) There is a GCC bug where the properties of the constants
>    do not propagate.
> 
> 2) GCC really thinks the divide is cheaper (code density vs.
>    cycle count tradeoffs etc.)

Probably Eric compiled with the now default CONFIG_CC_OPTIMIZE_FOR_SIZE/-Os.
With that gcc decides to use the shorter hardware divide instruction, even
though it is significantly slower than an expanded optimized sequence
for constant dividend.

We've seen this in a few other cases while during performance regression
testing between kernels that still used -O2 vs the newer -Os.

No good solution found unfortunately.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ