From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 11 01:05:17 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD1DCC3B; Wed, 11 Mar 2015 01:05:17 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0054.outbound.protection.outlook.com [157.56.110.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3073AF62; Wed, 11 Mar 2015 01:05:16 +0000 (UTC) Received: from DM2PR0801MB0944.namprd08.prod.outlook.com (25.160.131.27) by DM2PR0801MB0941.namprd08.prod.outlook.com (25.160.131.24) with Microsoft SMTP Server (TLS) id 15.1.106.15; Wed, 11 Mar 2015 00:50:33 +0000 Received: from DM2PR0801MB0944.namprd08.prod.outlook.com ([25.160.131.27]) by DM2PR0801MB0944.namprd08.prod.outlook.com ([25.160.131.27]) with mapi id 15.01.0106.007; Wed, 11 Mar 2015 00:50:33 +0000 From: "Pokala, Ravi" To: Alan Somers , Freddie Cash Subject: Re: detecting hyperthreading Thread-Topic: detecting hyperthreading Thread-Index: AQHQWqyImRFHWPGSCkqtx00nVjUfFZ0U6yCA//+MIICAAWfagP//i6mAgAB3AgCAAAFzgIAAHNWA Date: Wed, 11 Mar 2015 00:50:33 +0000 Message-ID: References: <9F2E1411-B517-4BC8-AF61-BB15EE35083C@me.com> <54FF1343.1020705@gmx.de> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.4.8.150116 x-originating-ip: [24.6.178.251] authentication-results: freebsd.org; dkim=none (message not signed) header.d=none; x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0801MB0941; x-forefront-antispam-report: BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(377424004)(13464003)(106116001)(66066001)(86362001)(87936001)(221733001)(122556002)(102836002)(40100003)(92566002)(93886004)(77156002)(83506001)(76176999)(36756003)(54356999)(2900100001)(19580405001)(2950100001)(62966003)(2656002)(46102003)(19580395003)(99286002)(50986999)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0801MB0941; H:DM2PR0801MB0944.namprd08.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(5002009)(5005006); SRVR:DM2PR0801MB0941; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0801MB0941; x-forefront-prvs: 0512CC5201 Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: panasas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2015 00:50:33.5026 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: acf01c9d-c699-42af-bdbb-44bf582e60b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0801MB0941 Cc: "freebsd-hackers@freebsd.org" , "lokadamus@gmx.de" , Rui Paulo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2015 01:05:17 -0000 -----Original Message----- From: Alan Somers Date: 2015-03-10, Tuesday at 09:07 To: Freddie Cash Cc: Ravi Pokala , "freebsd-hackers@freebsd.org" , "lokadamus@gmx.de" , Rui Paulo Subject: Re: detecting hyperthreading >I always look at "sysctl kern.sched.topology_spec" to tell if >hyperthreading is enabled. It's overkill, but it works. Yeah, David pointed me at that yesterday. It should be easy enough to take the same source data and create something that just returns the numbers. (i.e. kern.sched.active_{sockets,cores,threads}). -Ravi