From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 11 01:13:06 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 3E442F7C for ; Wed, 11 Mar 2015 01:13:06 +0000 (UTC) Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0064.outbound.protection.outlook.com [65.55.169.64]) (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 D2504E3 for ; Wed, 11 Mar 2015 01:13:05 +0000 (UTC) Received: from DM2PR0801MB0944.namprd08.prod.outlook.com (25.160.131.27) by DM2PR0801MB0943.namprd08.prod.outlook.com (25.160.131.26) with Microsoft SMTP Server (TLS) id 15.1.106.15; Wed, 11 Mar 2015 01:12:57 +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 01:12:57 +0000 From: "Pokala, Ravi" To: Rui Paulo Subject: Re: detecting hyperthreading Thread-Topic: detecting hyperthreading Thread-Index: AQHQWqyImRFHWPGSCkqtx00nVjUfFZ0U6yCA//+MIICAAWfagP//i6mAgAB3AgCAAByoAIAAdn2A//+RZAA= Date: Wed, 11 Mar 2015 01:12:57 +0000 Message-ID: References: <9F2E1411-B517-4BC8-AF61-BB15EE35083C@me.com> <54FF1343.1020705@gmx.de> <70D59C1C-8047-4A80-A172-D7CB3D8679AE@me.com> In-Reply-To: <70D59C1C-8047-4A80-A172-D7CB3D8679AE@me.com> 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: me.com; dkim=none (message not signed) header.d=none; x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0801MB0943; x-forefront-antispam-report: BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(13464003)(164054003)(51704005)(377424004)(24454002)(86362001)(87936001)(221733001)(93886004)(2656002)(77156002)(66066001)(2900100001)(106116001)(40100003)(2950100001)(92566002)(19580405001)(19580395003)(36756003)(110136001)(102836002)(62966003)(76176999)(46102003)(50986999)(83506001)(99286002)(122556002)(54356999)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0801MB0943; 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:DM2PR0801MB0943; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0801MB0943; x-forefront-prvs: 0512CC5201 Content-Type: text/plain; charset="us-ascii" Content-ID: <18EFD6B88EBE31469A6F812A51981FC7@namprd08.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: panasas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Mar 2015 01:12:57.4821 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: acf01c9d-c699-42af-bdbb-44bf582e60b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0801MB0943 Cc: "freebsd-hackers@freebsd.org" , "lokadamus@gmx.de" 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:13:06 -0000 -----Original Message----- From: Rui Paulo Date: 2015-03-10, Tuesday at 17:48 To: Ravi Pokala Cc: Freddie Cash , "lokadamus@gmx.de" , "freebsd-hackers@freebsd.org" Subject: Re: detecting hyperthreading >On 11 Mar 2015, at 09:44, Pokala, Ravi wrote: >> Yeah. There's tons of info that could be scraped out of dmesg.boot, but >>actually doing that - let alone from C - is a pain. :-P > >At my $DAYJOB, I wrote some code to detect the number of CPU sockets via >topology_spec using expat (bsdxml library). It was probably less than 50 >lines of code. Detecting HTT/SMT shouldn't be hard. That's a fair point. We currently don't have an XML parser linked to the chunk of code I'm working in, but adding that wouldn't be too terrible if it came to that. Thanks, Ravi