From owner-freebsd-questions@FreeBSD.ORG Mon Dec 22 20:25:41 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D3401065674 for ; Mon, 22 Dec 2008 20:25:41 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 6C5278FC19 for ; Mon, 22 Dec 2008 20:25:39 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LErLM-0000pC-UX for freebsd-questions@freebsd.org; Mon, 22 Dec 2008 20:25:36 +0000 Received: from 93-138-92-40.adsl.net.t-com.hr ([93.138.92.40]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Dec 2008 20:25:36 +0000 Received: from ivoras by 93-138-92-40.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Dec 2008 20:25:36 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Ivan Voras Date: Mon, 22 Dec 2008 21:25:27 +0100 Lines: 69 Message-ID: References: <200812202039.NAA10290@lariat.net> <494D5B32.50806@gmail.com> <11167f520812211526h55a56a91ue4c06c02a170f439@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF99E5472C57462DD0B52F6D2" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 93-138-92-40.adsl.net.t-com.hr User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) In-Reply-To: <11167f520812211526h55a56a91ue4c06c02a170f439@mail.gmail.com> X-Enigmail-Version: 0.95.7 Sender: news Subject: Re: Status of hyperthreading in FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 20:25:41 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF99E5472C57462DD0B52F6D2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sam Fourman Jr. wrote: >> as far as i know, just enabling smp will allow ht to function. also, i= don't >> know if intel changed ht in the new atom processor, they could have. > is FreeBSD's smp special in some way that it would be the exception to > the following statement. > I know there was a lot of changes made in the new ULE2 scheduler maybe > that is why? >=20 > /* > Hyper-threading relies on support in the operating system as well as > the CPU. Conventional multiprocessor support is not enough to take > advantage of hyper-threading.[1] For example, even though Windows 2000 > supports multiple CPUs, Intel does not recommend that hyper-threading > be enabled under that operating system. > */ >=20 > I found this in wikipedia at the following link > http://en.wikipedia.org/wiki/Hyper-threading Yes, system respond variously to hyperthreading but it's mostly in two areas: a) Granularity of locking - systems with "big locks" like FreeBSD's Giant was when HTT was new don't scale well in multi-CPU configurations ("logical" CPUs) and simply using HTT can expose and increase these inefficiencies. Modern FreeBSD locking is "good enough" for 8 cores in 7.x and it's improving in 8.x. b) Behaviour in multi-core (or multi-CPU) case when individual CPUs or cores support HTT. This is a scheduler issue - if the scheduler isn't aware that some logical CPU's are "fake" and some are not (i.e. if it treats all of them equally) it could move processes or threads from one CPU or CPU core to another when it would be much better to move it from one "fake" (hyperthreaded) CPU to another within the same "real" CPU. There are more similar issues here, but none of them (including those I described) are applicable to Atom since a) locking in FreeBSD is good enough for it in recent releases (even in 6.x) and b) there are only two "fake" logical CPUs and they really can be treated equally. Now, with Nehalem design (i7) the system can have a quad-core CPU (actually, several of those) with each core supporting hyperthreading. A system with 16 logical CPUs (2 x quadcore x HTT) isn't really strange any more. The scheduler knows about HTT, so the issues under "a)" are much more noticable. --------------enigF99E5472C57462DD0B52F6D2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAklP97cACgkQldnAQVacBciN0gCfXWIxegNpLrbl5meIi3pj4dmt GwsAnjLjB9Kk/KSVYWOZQAoAql0szZEV =Kxp5 -----END PGP SIGNATURE----- --------------enigF99E5472C57462DD0B52F6D2--