Re: likely and unlikely was: Re: [PATCH] split xfs_ioc_xattr

Andi Kleen
2008-04-18T13:34:42Z

Timothy Shimmin wrote:
> Hi,
>
> Thanks for the explanation, Andi.
> So I guess the upshot is, that it can make a difference but
> in many cases (where the perf difference isn't an issue)
> it is probably not worth the ugliness.
> And in performance cases, it would be best to test the hypothesis
> with the unlikely profiler patch
> => it will be _unlikely_ we will bother ;-)
> So I don't think I'll be bothering with them then unless
> an issue comes up :)

Ideal would be to not bother by default, but occasionally
run oprofile with icache and branch misprediction profiling for macro
benchmarks (significant user space code running) and if you see
any icache miss/mispredict hot spots in your code add the annotations
there and then double check with the unlikely profiler.

-Andi