From owner-freebsd-current@FreeBSD.ORG Mon Feb 23 14:05:54 2009 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28FAE10656C4; Mon, 23 Feb 2009 14:05:54 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id E13538FC1E; Mon, 23 Feb 2009 14:05:53 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.38] (S0106001372fd1e07.vs.shawcable.net [70.71.171.106]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n1NE5pDs095827 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 23 Feb 2009 06:05:52 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <49A2AD30.1040007@FreeBSD.org> Date: Mon, 23 Feb 2009 06:05:36 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Robert Watson References: <49A23C1A.3070403@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jeff Roberson , "current@freebsd.org" , stable@FreeBSD.org Subject: Re: The machdep.hyperthreading_allowed & ULE weirdness in 7.1 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: Mon, 23 Feb 2009 14:05:55 -0000 Robert Watson wrote: > > On Sun, 22 Feb 2009, Maxim Sobolev wrote: > >> Hi Jeff, >> >> I have a single-CPU system with P4 HTT-enabled processor >> (7.1-RELEASE-p3), kernel compiled with SCHED_ULE. > > This is because machdep.hlt_logical_cpus doesn't do what you think it > does. It causes HTT cores to invoke the hlt instruction in their idle Hmm, as the subject says I am actually talking about flipping machdep.hyperthreading_allowed, not machdep.hlt_logical_cpus sysctl here. I provided current value of the latter only to simplify diagnosis and had not changed it from the default value. AFAIK, the machdep.hyperthreading_allowed is designed to prevent logical cores from running any code, works just fine with 6.x/SCHED_4BSD. Below are screenshots from the dual-core 6.2 system with 4BSD. As you can easily see, after flipping machdep.hyperthreading_allowed only cores 0 and 2 run actual code, so that it's definitely regression of ULE/7.x: machdep.hyperthreading_allowed=1: top: http://sobomax.sippysoft.com/~sobomax/ScreenShot462.png machdep.hyperthreading_allowed=0: top: http://sobomax.sippysoft.com/~sobomax/ScreenShot463.png IMHO, at the very least, if SCHED_ULE doesn't support machdep.hyperthreading_allowed properly, then when that scheduler is selected the sysctl should return ENOTSUP or something like this. -Maxim