Port-i386 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: rdtscp instruction
On Mon, 26 Jul 2010 11:46:02 +0200, "Christoph Egger"
<Christoph_Egger%gmx.de@localhost> 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@localhost
Home |
Main Index |
Thread Index |
Old Index