From owner-freebsd-current@FreeBSD.ORG Wed Sep 5 07:02:12 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58395106564A for ; Wed, 5 Sep 2012 07:02:12 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 8FE648FC0C for ; Wed, 5 Sep 2012 07:02:11 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA13141; Wed, 05 Sep 2012 10:02:09 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1T99cm-0002OM-J4; Wed, 05 Sep 2012 10:02:08 +0300 Message-ID: <5046F8EF.7070403@FreeBSD.org> Date: Wed, 05 Sep 2012 10:02:07 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120901 Thunderbird/15.0 MIME-Version: 1.0 To: Ryan Stone References: In-Reply-To: X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD Current Subject: Re: machdep.hyperthreading_allowed does not affect SMT cores 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: Wed, 05 Sep 2012 07:02:12 -0000 on 04/09/2012 19:01 Ryan Stone said the following: > I have a Intel Sandy Bridge system that reports that it has SMT cores > instead of HTT(under a derivative of FreeBSD 8.2). I'll admit that I > don't at all understand the distinction between the two -- I thought > that HTT was just Intel's name for SMT. In any case, is there any > reason that machdep.hyperthreading_allowed should not apply to SMT > cores, too? I tend to agree with you. What we have now is a historic artifact. For reasons, that are irrelevant now, "HTT" is used as a code name for "old" Intel's SMT aka HTT and "SMT" is used for "newer" Intel's SMT aka HTT. It was considered that old HTT was "bad and ugly" and new HTT was good. So all kinds of limitations were applied to the old one and not to the new one. While there is certain truth to that distinction, what FreeBSD currently does is still illogical. HTT is still HTT whether it's new or old. E.g. I think that it doesn't make sense to assign interrupts to the second thread with either version of HTT. Besides, I think that the current CPU detection code sucks at deciding which HTT is which. I have some new SMP topology detection code in the works. It eliminates the artificial difference and retires "HTT" name in favor of the vendor-agnostic "SMT". I just a final push to tidy up that code before suggesting it for the tree. But I wasn't able to make that push in over a year, sigh... -- Andriy Gapon