Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jan 2001 17:36:15 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Jason Evans <jasone@FreeBSD.org>
Subject:   Re: cvs commit: src/sys/alpha/include mutex.h src/sys/i386/inclu
Message-ID:  <XFMail.010121173615.jhb@FreeBSD.org>
In-Reply-To: <3A6B6581.E8FFB917@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 21-Jan-01 Julian Elischer wrote:
> Jason Evans wrote:
>> 
>> jasone      2001/01/21 14:34:43 PST
>> 
>>   Modified files:
>>     sys/alpha/include    mutex.h
>>     sys/i386/include     mutex.h
>>     sys/kern             kern_mutex.c
>>     sys/net              if.c
>>     sys/sys              mutex.h
>>   Log:
>>   Move most of sys/mutex.h into kern/kern_mutex.c, thereby making the mutex
>>   inline functions non-inlined.  Hide parts of the mutex implementation that
>>   should not be exposed.
> 
> hmmm how much performance difference is there in doing this?
> I presume that we lose the optimisation of gcc removing all the unused paths 
> and tests when the arguments include constants. (I guess this can be
> regained by giving differnt kinds of mutexes different names.)
> (haven't checked the files, hope I understand what was done correnctly)

The flags are going away most likely in the future, resulting in only 1 runtime
check to see if the mutex is a spin or sleep mutex.

> What is the reasoning? (not complaining, just curious)

Inlining all of these can bloat the kernel unfortunately.  Jason estimated
650kb of extra code in a non-debug kernel from this when we hit 5.0.

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010121173615.jhb>