From: "dada1" <dada1@cosmosbay.com>
To: <linux-kernel@vger.kernel.org>, "Dan Behman" <dbehman@ca.ibm.com>
Subject: Re: Hyperthreading: easiest userland method?
Date: Fri, 12 Sep 2003 16:55:18 +0200 [thread overview]
Message-ID: <00db01c3793d$e22aaf40$890010ac@edumazet> (raw)
In-Reply-To: OFACE20891.664CABA8-ON85256D9F.004FBBDE@torolab.ibm.com
Hi
Have you checked x86info ? http://www.codemonkey.org.uk/projects/x86info/
You may ask Dave Jones to add a single option that could never change, and
returns TRUE or FALSE, depending on HT enabled CPUS.
From: "Dan Behman" <dbehman@ca.ibm.com>
> Hi,
>
> I have a need to programmatically determine whether or not hyperthreading
> is enabled (and in use) for licensing reasons in my application.
> Currently, I know of two ways to do this:
>
> 1) parse /proc/cpuinfo for "processor id"
> 2) port Intel's documented method (written for Windows) to directly query
> the CPUs
>
> Both methods have drawbacks - 1) relying on specific text that could
change
> is a bad idea; 2) this doesn't take into account whether or not Linux
> and/or the BIOS is making use of the hyperthreading.
>
> >From scouring the archives and the net, it doesn't seem like there's any
> API that currently exists, but perhaps I've missed something.
> /proc/cpuinfo gathers its information from somewhere - is there a way in
> userland to bypass /proc/cpuinfo and directly get this data manually?
>
> I'm interested in both 2.4 and 2.6 implementations and would like to be
> personally CC'ed on any repsonses.
>
> Thanks in advance!
>
> Dan Behman.
> IBM Canada Ltd.
next prev parent reply other threads:[~2003-09-12 14:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-12 14:41 Hyperthreading: easiest userland method? Dan Behman
2003-09-12 14:55 ` dada1 [this message]
2003-09-12 15:10 ` Chris Friesen
2003-09-12 16:12 ` Dave Hansen
-- strict thread matches above, loose matches on Subject: below --
2003-09-12 17:00 Nakajima, Jun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00db01c3793d$e22aaf40$890010ac@edumazet' \
--to=dada1@cosmosbay.com \
--cc=dbehman@ca.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox