From: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
To: "Jason Lunz" <lunz@falooley.org>, <linux-kernel@vger.kernel.org>
Subject: RE: detecting hyperthreading in linux 2.4.19
Date: Thu, 9 Jan 2003 15:26:38 -0800 [thread overview]
Message-ID: <C8C38546F90ABF408A5961FC01FDBF1912E206@fmsmsx405.fm.intel.com> (raw)
Systems running the latest RH, SuSE releases, with standard smp kernel
should see some entries in /proc/cpuinfo, which gives information about
HT configuration on the system. The latest 2.5 kernel also has similar
information in /proc/cpuinfo.
The entries look something like:
Physical processor ID : 0
Number of siblings : 2
Unfortunately, 2.4.19 doesn't have such information. One possible
workaround is to check big enough 'dmesg' and look for cpu_sibling_map.
That tells you the mapping of logical processors to physical package. Or
you can have a init script like this (attached) in place, to run at boot
time, so that you have a better chance of finding these particular
messages in log (without overflowing).
HTH,
Venkatesh
-------------------
#!/bin/sh
# checkht kernel RC file.
#
# chkconfig: 35 98 98
# description: check for hyperthreaded CPUs
HASHT=`/bin/dmesg | /bin/grep cpu_sibling_map`
if [ -n "$HASHT" ]; then
/bin/echo "Machine is running HT"
/bin/echo 1 > /etc/hyperthreaded
else
/bin/echo "Machine isn't running HT"
/bin/echo 0 > /etc/hyperthreaded
Fi
--------------
> -----Original Message-----
> From: Jason Lunz [mailto:lunz@falooley.org]
> Sent: Thursday, January 09, 2003 12:03 PM
> To: linux-kernel@vger.kernel.org
> Subject: detecting hyperthreading in linux 2.4.19
>
>
> Is there a way for a userspace program running on linux 2.4.19 to tell
> the difference between a single hyperthreaded xeon P4 with HT enabled
> and a dual hyperthreaded xeon P4 with HT disabled? The /proc/cpuinfos
> for the two cases are indistinguishable.
>
> Jason
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
next reply other threads:[~2003-01-10 1:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-09 23:26 Pallipadi, Venkatesh [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-01-10 8:16 Pallipadi, Venkatesh
2003-01-10 8:43 ` Mikael Pettersson
2003-01-09 22:29 Kamble, Nitin A
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
2003-01-10 0:20 ` Dave Jones
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=C8C38546F90ABF408A5961FC01FDBF1912E206@fmsmsx405.fm.intel.com \
--to=venkatesh.pallipadi@intel.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®