mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: Dave Jones <davej@codemonkey.org.uk>
Cc: jamesclv@us.ibm.com, Jason Lunz <lunz@falooley.org>,
	linux-kernel@vger.kernel.org
Subject: Re: detecting hyperthreading in linux 2.4.19
Date: Fri, 10 Jan 2003 12:19:07 +0100	[thread overview]
Message-ID: <15902.44075.649993.9488@harpo.it.uu.se> (raw)
In-Reply-To: <20030110110547.GC29190@codemonkey.org.uk>

Dave Jones writes:
 > On Fri, Jan 10, 2003 at 08:05:07AM +0100, Mikael Pettersson wrote:
 > 
 >  > If the kernel has sched_setaffinity() or some other way of binding a process
 >  > to a given CPU (as numbered by the kernel, which may or may not be related
 >  > to any physical CPU numbers), then this will do it: execute CPUID on each
 >  > CPU and check the initial APIC ID field. If you find one that's non-zero,
 >  > then HT is enabled.
 > 
 > That's a horrible way of reimplementing /dev/cpu/x/cpuid  8-)

True. I forgot about that interface since I personally never configure or use it.

So this answers the original question. Just access /dev/cpu/$CPU/cpuid
for all (accessible) values of $CPU.

  reply	other threads:[~2003-01-10 11:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-09 20:02 Jason Lunz
2003-01-09 21:37 ` James Cleverdon
2003-01-09 21:54   ` John Bradford
2003-01-10  0:16     ` James Cleverdon
2003-01-10  0:58     ` Mike Dresser
2003-01-09 21:57   ` Jason Lunz
2003-01-10 12:29     ` Mark Hounschell
2003-01-10  7:05   ` Mikael Pettersson
2003-01-10 11:05     ` Dave Jones
2003-01-10 11:19       ` Mikael Pettersson [this message]
2003-01-10  0:20 ` Dave Jones
2003-01-09 22:29 Kamble, Nitin A
2003-01-09 23:26 Pallipadi, Venkatesh
2003-01-10  8:16 Pallipadi, Venkatesh
2003-01-10  8:43 ` Mikael Pettersson

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=15902.44075.649993.9488@harpo.it.uu.se \
    --to=mikpe@csd.uu.se \
    --cc=davej@codemonkey.org.uk \
    --cc=jamesclv@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lunz@falooley.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

all inboxes | Powered by JetHome®