[lkml]   [2006]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] use unlikely() for current_kernel_time() loop

On Thu, 08 Jun 2006, Andi Kleen wrote:
> AFAIK gcc mostly uses the probability information for block reordering
> to make the fast path fall through without jumps.

After a quick try on RH EL4 gcc 3.4.4-2 it appears that
-fno-reorder-blocks indeed defeats __builtin_expect() as you
say. (Which is rather bizarre as __builtin_expect() no longer
does what one expects.) I think that I'm going to strip it out
for my externally compiled modules. Otherwise, the source code
rearrangements necessary to get the same effect will make the
source code unreadable and generate larger code, which I think
is worse than those effects on the assembler code.

Thanks again.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-06-08 09:45    [W:0.057 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site