Date: Mon, 18 Feb 2002 13:34:33 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Julian Elischer <julian@elischer.org> Cc: current@FreeBSD.ORG Subject: Re: Patch to improve mutex collision performance Message-ID: <200202182134.g1ILYXi42633@apollo.backplane.com> References: <Pine.BSF.4.21.0202181310500.52663-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
:> 
:> :can you detail in more clarity the flip-flopping you were seeing?
:> 
:>     Basically what is happening is that switch/wakeup overhead is being
:>     imposed unnecessarily.  There is no need to switch if there is nothing
:>     to switch to, and this also causes the other process to not have to
:>     wakeup anyone when it releases Giant because process #1 is spinning
:>     on it instead of sleeping on it.  So you immediate remove four context
:>     switches from the critical path.
:
:true, though the original code would halt the processor to reduce power
:consumption on laptops etc. procrunnable doesn't include the idle
:process. (a side-effect).
    That would still work, the spin only occurs when multiple cpus are vying
    for a sleep lock.  But it's moot now, something isn't working as expected.
    It's as though procrunnable() is broken.
					-Matt
					Matthew Dillon 
					<dillon@backplane.com>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202182134.g1ILYXi42633>
