From: Javier Càceres on

Hi there,


The MSDN documentation tells that __readmsr functions read a register at the
specified address, but which core in multi-core processor?
The same function talks about AMD, but what about Intel?
The link: http://msdn.microsoft.com/es-es/library/y55zyfdx.aspx


Javier Andrés Cáceres Alvis
Blog Personal: http://speechflow.spaces.live.com/
Blog Intel: http://software.intel.com/en-us/blogs/author/javierandrescaceres/
From: Tim Roberts on
Javier C�ceres <JavierCceres(a)discussions.microsoft.com> wrote:
>
>The MSDN documentation tells that __readmsr functions read a register at the
>specified address, but which core in multi-core processor?

Naturally, it's whichever core you are running on at the time.

>The same function talks about AMD, but what about Intel?
>The link: http://msdn.microsoft.com/es-es/library/y55zyfdx.aspx

For Intel MSRs, check the Intel documetation.
--
Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.
From: Javier Càceres on

Hi Tim,

How can I force a block of code (not necesary a thread) to run in a given
core?

Thanks,

"Tim Roberts" wrote:

> Javier Càceres <JavierCceres(a)discussions.microsoft.com> wrote:
> >
> >The MSDN documentation tells that __readmsr functions read a register at the
> >specified address, but which core in multi-core processor?
>
> Naturally, it's whichever core you are running on at the time.
>
> >The same function talks about AMD, but what about Intel?
> >The link: http://msdn.microsoft.com/es-es/library/y55zyfdx.aspx
>
> For Intel MSRs, check the Intel documetation.
> --
> Tim Roberts, timr(a)probo.com
> Providenza & Boekelheide, Inc.
>
From: m on
Set the thread affinity at the start of the block and restore it at the end.
Look at SetThreadAffinityMask in MSDN:

http://msdn.microsoft.com/en-us/library/ms686247(VS.85).aspx

Note that this procedure has performance side effects - especially if the
restore fails

"Javier Càceres" <JavierCceres(a)discussions.microsoft.com> wrote in message
news:22F30081-7BD8-44E3-AE58-913A0889D148(a)microsoft.com...
>
> Hi Tim,
>
> How can I force a block of code (not necesary a thread) to run in a given
> core?
>
> Thanks,
>
> "Tim Roberts" wrote:
>
>> Javier Càceres <JavierCceres(a)discussions.microsoft.com> wrote:
>> >
>> >The MSDN documentation tells that __readmsr functions read a register at
>> >the
>> >specified address, but which core in multi-core processor?
>>
>> Naturally, it's whichever core you are running on at the time.
>>
>> >The same function talks about AMD, but what about Intel?
>> >The link: http://msdn.microsoft.com/es-es/library/y55zyfdx.aspx
>>
>> For Intel MSRs, check the Intel documetation.
>> --
>> Tim Roberts, timr(a)probo.com
>> Providenza & Boekelheide, Inc.
>>

From: G�nter Prossliner on
Hallo m!

> Set the thread affinity at the start of the block and restore it at
> the end. Look at SetThreadAffinityMask in MSDN:

Does the Thread give up this quantum when it's not currently running on a
Thread set in the Mask, or is e.g. a Sleep(0) required to manually give up
the Quantum on the "wrong" CPU?


GP