public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Edwin Bennink <edwin@svi.nl>
To: linux-acpi@vger.kernel.org
Subject: Read the local apic id of the current logical processor
Date: Thu, 20 Jan 2011 14:19:13 +0100	[thread overview]
Message-ID: <4D383651.3010206@svi.nl> (raw)

Dear acpi list members,


I'm not sure if this is the correct place to post this question, but I'm 
looking for a way to read the local apic id (not the initial one) of the 
current logical processor in a simple user-space program.
According to the documentation I found, this local apic id is stored in 
a memory mapped msr register. Unfortunately I could not find a way to 
access this value from within user-space. All search results on the web 
involved kernel code...

The purpose of getting this id is to determine the processor hierarchy 
on a cluster; i.e. the number of logical processors, physical 
processors, packages, and nodes. The initial apic id (the one cpuid 
returns) is set by the bios and therefore it does not distinguish 
between the nodes in a cluster.

Any other way to get some kind of node id for the current logical 
processor makes me happy too :-)


Best,
Edwin



ps. I posted the same message in the linux-smp list earlier, but after 
that I noticed that the list was dead...

                 reply	other threads:[~2011-01-20 13:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4D383651.3010206@svi.nl \
    --to=edwin@svi.nl \
    --cc=linux-acpi@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