Re: 4.7 vs 5.2.1 SMP/UP bridging performance

From: Robert Watson <rwatson_at_FreeBSD.org>
Date: Fri, 7 May 2004 10:39:09 -0400 (EDT)
On Fri, 7 May 2004, Brad Knowles wrote:

> At 10:55 PM -0400 2004/05/06, Robert Watson wrote:
> 
> >  On occasion, I've had conversations with Peter Wemm about providing HAL
> >  modules with optimized versions of various common routines for specific
> >  hardware platforms.  However, that would require us to make a trade-off
> >  between the performance benefits of inlining and the performance benefits
> >  of a HAL module...
> 
> 	I'm confused.  Couldn't you just do this sort of stuff as
> conditional macros, which would have both benefits? 

Well, the goal of introducing HAL modules would be that you don't have to
recompile the kernel in order to perform local hardware-specific
optimization of low level routines.  I.e., you could substitute faster
implementations of zeroing, synchronization, certain math routines, etc
based on the CPU discovered at run-time.  While you can have switch
statements, etc, it's faster just to relink the kernel to use the better
implementation for the available CPU.  However, if you do that, you still
end up with the function call cost, which might well out-weight the
benefits of specialization.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert_at_fledge.watson.org      Senior Research Scientist, McAfee Research
Received on Fri May 07 2004 - 05:39:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:53 UTC