Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jan 2003 12:10:10 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: RE: cvs commit: src/sys/i386/i386 mp_machdep.c
Message-ID:  <XFMail.20030131121010.jhb@FreeBSD.org>
In-Reply-To: <200301301952.h0UJqA0h089352@apollo.backplane.com>

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

On 30-Jan-2003 Matthew Dillon wrote:
> 
>:>   Log:
>:>   MFC: Basic support for Hyperthreading.  This uses the values from cpuid to
>:>   enmuerate logical CPUs.
>:>   
>:>   Requested heavily by:   ps
>:
>:I highly recommend turning on machdep.cpu_idle_hlt for HTT boxes as it
>:provides a noticable performance improvement.  I'm still testing some
>:other patches to rework the locking code in 4.x to make use of the pause
>:instruction and be more intelligent about spinning on locks in general.
>:
>:-- 
>:
>:John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
> 
>     Ouch.  That's rather counter-intuitive since idle_hlt usually 
>     degrades performance, but I see how it would improve performance on
>     an HTT box.

Well, idle_hlt can only really hurt if you are doing compute bound stuff.
You get at least 128 clock interrupts per second from the RTC that get
IPI'd to all the other CPUs, so no CPU would errantly stay halted for more
than 1/128th of a second with idle_hlt on anyways.  As Peter has mentioned,
the idle_hlt thing shows some rather impressive thermal benefits, and I
imagine it can provide power savings of some sort.  I would argue that
being fully compute bound is not the common case and that we should probably
default to having it on in general.

>     If the idle loop can be tightened up sufficiently - particularly if
>     locked bus cycles can be removed from it (or removed for the HTT case
>     anyway), then idle_hlt should go back to its more intuitive loss of
>     performance instead of generating a performance improvement :-).

Improving the idle loop would probably help on SMP systems as well as
just HTT systems.

>     Also, I perused the linux archives a bit and they had some rather
>     severe scheduling issues with HTT.  Apparently the logical cpus are
>     not equivalent to each other (?), and are definitely not as effective
>     as physical cpus (which makes sense), so if you have two KSEs and two
>     physical cpus each with an extra logical cpu, you absoultely want to
>     schedule the two KSEs on the two physical cpu's.

This is a much harder problem to solve and one that 4.x is not going to
see a solution for.  At least not a solution that I am going to develop. :)

-- 

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