Re: [PATCH 1/3] Fix Unlikely(x) == y

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Geoff Levand <geoffrey.levand@...>
Cc: Willy Tarreau <w@...>, Roel Kluin <12o3l@...>, <linuxppc-dev@...>, <cbe-oss-dev@...>, lkml <linux-kernel@...>
Date: Saturday, February 16, 2008 - 2:39 pm

On Sat, 16 Feb 2008 10:31:26 -0800
Geoff Levand <geoffrey.levand@am.sony.com> wrote:


for mordern (last 10 years) x86 cpus... the cpu branchpredictor is better
than the coder in general. Same for most other architectures.

unlikely() creates bigger code as well.

Now... we're talking about your super duper hotpath function here right?
One where you care about 0.5 cycle speed improvement? (less on modern
systems ;)

Because if not, the bigger code and general "compiler second guessing" is just
more harmful than good, shown already here by the fact that the code was just incorrect
as a virtue of having the unlikely() in.

-- 
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/3] Fix Unlikely(x) == y, Roel Kluin, (Sat Feb 16, 12:08 pm)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Geoff Levand, (Sat Feb 16, 2:41 pm)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Arjan van de Ven, (Sat Feb 16, 1:25 pm)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Willy Tarreau, (Sat Feb 16, 1:33 pm)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Arjan van de Ven, (Sat Feb 16, 1:42 pm)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Andi Kleen, (Mon Feb 18, 10:39 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Nick Piggin, (Mon Feb 18, 10:33 pm)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Andi Kleen, (Tue Feb 19, 5:25 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Nick Piggin, (Tue Feb 19, 5:46 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Andi Kleen, (Tue Feb 19, 5:57 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Nick Piggin, (Tue Feb 19, 6:25 pm)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Willy Tarreau, (Tue Feb 19, 1:58 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Andi Kleen, (Tue Feb 19, 5:28 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Willy Tarreau, (Wed Feb 20, 3:32 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Nick Piggin, (Tue Feb 19, 2:20 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Arjan van de Ven, (Mon Feb 18, 10:40 pm)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Nick Piggin, (Tue Feb 19, 12:41 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Geoff Levand, (Sat Feb 16, 2:31 pm)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Arjan van de Ven, (Sat Feb 16, 2:39 pm)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Michael Ellerman, (Sun Feb 17, 7:50 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Adrian Bunk, (Mon Feb 18, 9:56 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Geert Uytterhoeven, (Mon Feb 18, 10:01 am)
Re: [Cbe-oss-dev] [PATCH 1/3] Fix Unlikely(x) == y, Andrew Pinski, (Mon Feb 18, 3:22 pm)
Re: [PATCH 1/3] Fix Unlikely(x) == y, David Howells, (Mon Feb 18, 10:27 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, , (Mon Feb 18, 2:11 pm)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Arjan van de Ven, (Mon Feb 18, 2:33 pm)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Roel Kluin, (Mon Feb 18, 10:59 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Adrian Bunk, (Mon Feb 18, 10:13 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Michael Ellerman, (Mon Feb 18, 5:46 pm)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Adrian Bunk, (Tue Feb 19, 3:43 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Willy Tarreau, (Sat Feb 16, 1:58 pm)
Re: [Cbe-oss-dev] [PATCH 1/3] Fix Unlikely(x) == y, Andrew Pinski, (Sun Feb 17, 5:45 am)
Re: [Cbe-oss-dev] [PATCH 1/3] Fix Unlikely(x) == y, Willy Tarreau, (Sun Feb 17, 6:08 am)
Re: [PATCH 1/3] Fix Unlikely(x) == y, Arjan van de Ven, (Sat Feb 16, 2:29 pm)