[U-Boot] [PATCH] arm: Kirkwood: Add memory barriers to kwgbe_send/recv

Detlev Zundel dzu at denx.de
Fri Jul 3 11:15:29 CEST 2009


Hi Stefan & Scott,

> Stefan Roese wrote:
>> I know that we advertised the usage of the io accessor functions for quite 
>> some time now. But I'm not so sure here anymore. One disadvantage of this 
>> usage could be speed penalty by the usage of too many unnecessary barriers 
>> (included via the accessor functions on some platforms). 
>
> Hot paths (or tiny bootstraps) can be optimized if needed, but why 
> invite screwups for the majority of code?

I fully agree with Scott here.  Experience has shown that robustness
pays off much more than premature optimizations.  If you happen to have
performance problems, then I also seriously advise not to optimize
without actual performance data collected by a profiling run.  

This will not be easy for U-Boot but still I've seen so many examples of
effort put into "optimizations" which in the end turned out not to be
relevant for the total performance at all.

Cheers
  Detlev

-- 
Programming X-Windows is like trying to find the square root of pi
using roman numerals.
                                          -- The UNIX Haters Handbook
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the U-Boot mailing list