From owner-freebsd-current@FreeBSD.ORG Thu Aug 25 14:50:33 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 812F416A41F for ; Thu, 25 Aug 2005 14:50:33 +0000 (GMT) (envelope-from will+freebsd-current@will.iki.fi) Received: from will.iki.fi (will.iki.fi [217.169.64.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B30643D45 for ; Thu, 25 Aug 2005 14:50:28 +0000 (GMT) (envelope-from will+freebsd-current@will.iki.fi) Received: from [10.0.20.56] (fa-3-0-0.fw.exomi.com [217.169.64.99]) by will.iki.fi (Postfix) with ESMTP id 8614611A; Thu, 25 Aug 2005 17:50:27 +0300 (EEST) Message-ID: <430DDAB2.1030101@will.iki.fi> Date: Thu, 25 Aug 2005 17:50:26 +0300 From: Ville-Pertti Keinonen User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050721) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeremie Le Hen References: <430D68D4.50609@drexel.edu> <430D6C0F.1070909@freebsd.org> <8cb6106e0508250035f066aa1@mail.gmail.com> <20050825134942.GO659@obiwan.tataz.chchile.org> In-Reply-To: <20050825134942.GO659@obiwan.tataz.chchile.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, josh.carroll@psualum.com Subject: Re: On a hyperthreaded system, top and gnome system monitor only report one processor X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2005 14:50:33 -0000 Jeremie Le Hen wrote: > It is commonly accepted that HyperThreading decreases performances > on FreeBSD systems. Both 4BSD and ULE consider dual-core processors > as two separates processors. This is a problem because dual-core > processors use the same L2 cache for their logical processors (IIRC) > and therefore we cannot schedule whatever threads on them without > taking care of not invalidating the cache too much. You seem to be confusing dual-core and HyperThreading. Dual-core (and multi-core in general) is "real" SMP; it may or may not share various levels of caches (but then again, historically so can SMP on machines with multiple separately packaged processors), but there are definitely multiple independent CPUs. HyperThreading (and various non-Intel forms of SMT) doesn't just share caches, but there's basically just one CPU with multiple sets of registers. Instructions from several threads can be "in flight" simultaneously in the (single) execution core, in order to make better use of the resources available...sometimes, for certain types of code.