All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edwin Bennink <edwin@svi.nl>
To: linux-smp@vger.kernel.org
Subject: Read the local apic id of the current logical processor
Date: Thu, 20 Jan 2011 11:38:14 +0100	[thread overview]
Message-ID: <4D381096.9020609@svi.nl> (raw)

Dear smp list members,


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

             reply	other threads:[~2011-01-20 10:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 10:38 Edwin Bennink [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-01-20 13:19 Read the local apic id of the current logical processor Edwin Bennink

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=4D381096.9020609@svi.nl \
    --to=edwin@svi.nl \
    --cc=linux-smp@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.