Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 May 2002 09:36:59 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Doug Rabson <dfr@nlsystems.com>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/i386/include cpufunc.h
Message-ID:  <XFMail.20020522093659.jhb@FreeBSD.org>
In-Reply-To: <200205220947.11913.dfr@nlsystems.com>

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

On 22-May-2002 Doug Rabson wrote:
> On Tuesday 21 May 2002 9:21 pm, John Baldwin wrote:
>> jhb         2002/05/21 13:21:54 PDT
>>
>>   Modified files:
>>     sys/i386/include     cpufunc.h
>>   Log:
>>   Add an inline function cpu_pause() for the IA32 'pause' instruction.
> 
> Is this the hyperthreading thing that you are supposed to call from the idle 
> loop?

Not sure if it is related to hyper-threading.  What it does do is tell the
processor to slow down and not issue memory reads faster than the bus speed
so that when the loop is terminated the processor doesn't have to take a
penalty waiting for all the outstanding memory accesses to complete.  (Or
something like that.)  I've heard various rumors about it also being used
with hyperthreading to cause the CPU to switch threads but I haven't seen
any docco from Intel that confirms this.  The IA-32 books I have here also
state that the penalty at the end of the spin loop wait is for a memory
order violation, not pending accesses.  I imagine that if we are slowing
the processor down to bus speed we can be executing another thread while
we are idle though.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"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.20020522093659.jhb>