[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-port-i386
Subject:    Re: rdtscp instruction
From:       Jean-Yves Migeon <jeanyves.migeon () free ! fr>
Date:       2010-07-26 12:26:47
Message-ID: afd32740a965a3dedff365cc12bfadb9 () localhost
[Download RAW message or body]


On Mon, 26 Jul 2010 11:46:02 +0200, "Christoph Egger"
<Christoph_Egger@gmx.de> wrote:
>> What do other kernels store in this MSR?
> 
> OpenSolaris stores the cpu id,
> Linux stores the cpu id and NUMA node
> and Xen stores the guest incarnation into this MSR.
> 
> If in cr4 the TSC bit is set then userland can use
> the rdtsc and rdtscp instructions.
> 
> Userland can get per-cpu informations with the rdtscp
> instruction.
> 
> When we fill in the cpu id in MSR_TSC_AUX then userland
> can detect and deal with TSC clock skews between different
> physical cpus. However, on CPUs w/o a constant TSC
> (e.g. AMD K8), the tsc is bound on the cpu clock frequency
> and the tsc is not guarateed to increase at
> constant rate. Switching between different P-States
> changes the cpu frequency and the TSC rate.
> 
> When we fill in the cpu id and the NUMA node then userland
> can also detect that it moved to a different NUMA node or
> that its threads run on different NUMA nodes.
> 
> I think we should fill in the MSR_TSC_AUX the cpuid,
> reserve some bits for the NUMA node (will be used once we have NUMA) and
> reserve some bits for the future.

I agree.

-- 
Jean-Yves Migeon
jeanyves.migeon@free.fr


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic