Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 May 2002 14:45:36 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org, <cvs-committers@FreeBSD.org>
Subject:   Re: cvs commit: src/sys/i386/include cpufunc.h
Message-ID:  <20020522144304.C1736-100000@herring.nlsystems.com>
In-Reply-To: <XFMail.20020522093659.jhb@FreeBSD.org>

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

On Wed, 22 May 2002, John Baldwin wrote:

>
> 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.

We had an Intel guy come around to explain hyperthreading recently and I
think the way it works is that if one thread is paused (I think its with
this same pause instruction), the other thread can use all the functional
units in the cpu. If both threads are running, certain cpu resources are
divided between them.

-- 
Doug Rabson				Mail:  dfr@nlsystems.com
					Phone: +44 20 8348 6160



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?20020522144304.C1736-100000>