From owner-freebsd-arch@FreeBSD.ORG Fri Mar 6 20:50:39 2015 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8DC8D6C for ; Fri, 6 Mar 2015 20:50:39 +0000 (UTC) Received: from mailout.easymail.ca (mailout.easymail.ca [64.68.201.169]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BAB1A9 for ; Fri, 6 Mar 2015 20:50:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 9097BE3E5 for ; Fri, 6 Mar 2015 15:50:36 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at mailout.easymail.ca X-Spam-Flag: NO X-Spam-Score: -3.845 X-Spam-Level: X-Spam-Status: No, score=-3.845 required=5 tests=[ALL_TRUSTED=-1.8, AWL=-0.138, BAYES_00=-2.599, DNS_FROM_AHBL_RHSBL=0.692] Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (easymail-mailout.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XCOpjyaia+KJ for ; Fri, 6 Mar 2015 15:50:36 -0500 (EST) Received: from bsddt1241.lv01.astrodoggroup.com (unknown [40.141.24.126]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 2BB3AE3DF for ; Fri, 6 Mar 2015 15:50:36 -0500 (EST) Message-ID: <54FA1180.3080605@astrodoggroup.com> Date: Fri, 06 Mar 2015 12:43:44 -0800 From: Harrison Grundy User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: freebsd-arch@freebsd.org Subject: Re: RFC: Simplfying hyperthreading distinctions References: <1640664.8z9mx3EOQs@ralph.baldwin.cx> In-Reply-To: <1640664.8z9mx3EOQs@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 20:50:39 -0000 On 03/06/15 12:44, John Baldwin wrote: > Currently we go out of our way a bit to distinguish Pentium4-era > hyperthreading from more recent ("modern") hyperthreading. I > suspect that this distinction probably results in confusion more > than anything else. Intel's documentation does not make near as > broad a distinction as far as I can tell. Both types of SMT are > called hyperthreading in the SDM for example. However, we have the > astonishing behavior that 'machdep.hyperthreading_allowed' only > affects "old" hyperthreads, but not "new" ones. We also try to be > overly cute in our dmesg output by using HTT for "old" > hyperthreading, and SMT for "new" hyperthreading. I propose the > following changes to simplify things a bit: > > 1) Call both "old" and "new" hyperthreading HTT in dmesg. > > 2) Change machdep.hyperthreading_allowed to apply to both new and > old HTT. However, doing this means a POLA violation in that we > would now disable modern HTT by default. Balanced against > re-enabling "old" HTT by default on an increasingly-shrinking pool > of old hardware, I think the better approach here would be to also > change the default to allow HTT. > > 3) Possibly add a different knob (or change the behavior of > machdep.hyperthreading_allowed) to still bring up hyperthreads, but > leave them out of the default cpuset (set 1). This would allow > those threads to be re-enabled dynamically at runtime by adjusting > the mask on set 1. The original htt settings back when > 'hyperthreading_allowed' was introduced actually permitted this via > by adjusting 'machdep.hlt_cpus' at runtime. > > What do people think? > I'm not sure of how interrupt handling works as it relates to HTT, but wouldn't using cpuset potentially leave them active for interrupt handling? Other than that question, this all makes sense to me. --- Harrison