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:	Mon, 12 Nov 2007 10:43:41 +0100
From:	Frank Seidel <fseidel@...e.de>
To:	Adrian Bunk <bunk@...nel.org>
Cc:	Jiri Slaby <jirislaby@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [RFC 13/13] Char: nozomi, cleanup read and write

On Montag 12 November 2007 08:54:52, you (Adrian Bunk) wrote:
> On Sat, Nov 10, 2007 at 11:04:41PM +0100, Jiri Slaby wrote:
> > Why? Anyway I think this is the case. The body of the then branch is executed at
> > most once, while the else branch each time but last. If you write/read 1002
> > bytes, it means 250:1. ...and it's invoked from interrupt too...
> 
> AFAIK there is no well defined semantics whether likely/unlikely means 
> 10:1 or 10000:1 that is guaranteed to not change during the next
> 10 years.
> 
> Unless there's a measurable difference, it's best to write readable 
> C code and simply leave all optimizations to the compiler.

>From my (totally) beginners point of view i would have guessed a chance of
very well below one percent that this condition is true could be called
"unlikely",
but i have to admit this is most probably a much too naive way of thinking,
especially in regards of compiler optimizations.
And in this special case now there are already most calls (about 80 percent)
caught by the switch-case-shortcuts anyway.

So, i'll revert it.

Thanks a lot for your feedback,
Frank	
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ