From owner-cvs-all Fri Jan 31 9:10: 9 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EF0A37B406 for ; Fri, 31 Jan 2003 09:10:07 -0800 (PST) Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58BCB43F75 for ; Fri, 31 Jan 2003 09:10:06 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 16600 invoked from network); 31 Jan 2003 17:10:10 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 31 Jan 2003 17:10:10 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id h0VHA4UT072219; Fri, 31 Jan 2003 12:10:04 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200301301952.h0UJqA0h089352@apollo.backplane.com> Date: Fri, 31 Jan 2003 12:10:10 -0500 (EST) From: John Baldwin To: Matthew Dillon Subject: Re: RE: cvs commit: src/sys/i386/i386 mp_machdep.c Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 <>< 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 <>< 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