From owner-freebsd-stable@FreeBSD.ORG Mon Dec 29 18:10:00 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE6F6106566C for ; Mon, 29 Dec 2008 18:10:00 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-bw0-f19.google.com (mail-bw0-f19.google.com [209.85.218.19]) by mx1.freebsd.org (Postfix) with ESMTP id 25B7E8FC18 for ; Mon, 29 Dec 2008 18:09:59 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: by bwz12 with SMTP id 12so13152209bwz.19 for ; Mon, 29 Dec 2008 10:09:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:to:subject:references :organization:from:original-sender:in-reply-to:message-id:lines :user-agent:mime-version:content-type:date; bh=genE9Qn/KRjoC2hVfJc/PgXeUfGwreYL0buV+FVhAks=; b=AOsVJ2/zJTKj7uDn+dqP1dlZfqnPBuN8ulYHeyiasRF+cH9JRgkyVuWr6EUP7608t0 6OxZK9uVLzei5CRlX4OYaIUez0R3DQtaJ7vZjOe70JT0wbvB8+u0PocBicX+gPYhw2Pz m+5FNG56uBwVKdXv9mGp6LYuQX4jG4ojMFEnw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=to:subject:references:organization:from:original-sender:in-reply-to :message-id:lines:user-agent:mime-version:content-type:date; b=DoPQC4QdtdcJByiUWckaNPz+3SarchPyya++Z49t56Z9J0R6xIrMqKe5f55XWxrz/m QpP7+6M7VCl1Bb0bSI1oiPUf0tpmJMBKcUCTZRoSeakzXb2jYQnlUutw6YyFk77pm7rN O38w7qBAFdvOn1sZXL0dxkkm3eKmbx00VY3EA= Received: by 10.223.104.74 with SMTP id n10mr10071761fao.5.1230572373875; Mon, 29 Dec 2008 09:39:33 -0800 (PST) Received: from localhost (vpn-195-69-246-143.customer.onet.com.ua [195.69.246.143]) by mx.google.com with ESMTPS id 28sm27075416fkx.22.2008.12.29.09.39.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 29 Dec 2008 09:39:33 -0800 (PST) To: "FreeBSD Stable Mailing List" References: <200812241536.10563.0ld@ukr.net> Organization: TOA Ukraine From: Mikolaj Golub Original-Sender: Mikolaj Golub In-Reply-To: <200812241536.10563.0ld@ukr.net> Message-ID: <86y6xylw35.fsf@kopusha.onet> Lines: 64 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 29 Dec 2008 09:39:33 -0800 (PST) Subject: Re: can't disable hyperthreading on 7.1 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 18:10:01 -0000 On Wed, 24 Dec 2008 15:36:10 +0200 Alexander Melnik wrote: AM> Hi AM> I have several computers with 2 xeon processors with hyperthreading under FreeBSD 7.1-RC2 and in any case can not turn off hyperthreading: AM> [old@vmat ~]$ cat /boot/loader.conf AM> machdep.hyperthreading_allowed="0" AM> machdep.hlt_logical_cpus="1" AM> [old@vmat ~]$ sysctl machdep.hyperthreading_allowed AM> machdep.hyperthreading_allowed: 0 AM> [old@vmat ~]$ sysctl machdep.hlt_logical_cpus AM> machdep.hlt_logical_cpus: 1 AM> [old@vmat ~]$ sysctl hw.ncpu AM> hw.ncpu: 4 AM> If machdep.hyperthreading_allowed = "0", the hw.ncpu must be equal to 2? AM> [old@vmat ~]$ top -nd 1 AM> last pid: 825; load averages: 0.00, 0.00, 0.00 up 0+00:21:19 15:22:24 AM> 17 processes: 1 running, 16 sleeping AM> Mem: 6228K Active, 6984K Inact, 20M Wired, 9520K Buf, 960M Free AM> Swap: 2048M Total, 2048M Free AM> PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND AM> 762 root 1 4 0 8428K 3936K sbwait 2 0:00 0.00% sshd AM> 767 old 1 8 0 4396K 2212K wait 2 0:00 0.00% bash AM> 765 old 1 44 0 8428K 3952K select 0 0:00 0.00% sshd AM> 571 root 1 44 0 3184K 1200K select 1 0:00 0.00% syslogd AM> 706 root 1 44 0 5876K 3196K select 0 0:00 0.00% sendmail AM> 716 root 1 8 0 3212K 1276K nanslp 2 0:00 0.00% cron AM> 759 root 1 5 0 3184K 1088K ttyin 2 0:00 0.00% getty AM> 758 root 1 5 0 3184K 1088K ttyin 3 0:00 0.00% getty AM> 760 root 1 5 0 3184K 1088K ttyin 0 0:00 0.00% getty AM> 700 root 1 44 0 5752K 3276K select 0 0:00 0.00% sshd AM> 710 smmsp 1 20 0 5876K 3200K pause 2 0:00 0.00% sendmail AM> 297 root 1 96 0 3128K 1208K select 0 0:00 0.00% dhclient AM> 737 root 1 96 0 3240K 1152K select 3 0:00 0.00% inetd AM> 163 root 1 20 0 1380K 804K pause 0 0:00 0.00% adjkerntz AM> 512 root 1 44 0 1888K 564K select 0 0:00 0.00% devd AM> 313 _dhcp 1 44 0 3128K 1320K select 0 0:00 0.00% dhclient AM> 825 old 1 44 0 3496K 1656K CPU0 0 0:00 0.00% top AM> AM> If machdep.hlt_logical_cpus = "1" in the output top in any case should not be seen processors 2 and 3? You can run vmstat -i | grep cpu to see how many CPUs are actually used. I also observe on some hosts (6.3) with machdep.hlt_logical_cpus=1 that in C column of top output there appear CPU numbers for CPUs that are actually halted according to vmstat -i and I am curious too what this means. -- Mikolaj Golub