On 4/20/2011 11:08 PM, John Mathew wrote:
> Intel hyperthreaded cores does not exactly behave like if it was 2 real cores.
> -     Actual HW cstate is roughly minimal cstate of the 2 threads.
>       As most of the resources are shared, HW resources are only really 
> powered
>       down when both threads are idle.
> -     Interrupts always wakes up the 2 threads. i.e. terminate the 2 mwait.
> So in case of an hyperthreaded core a wakeup event is affecting power only 
> when
> both the threads are asleep. A wakeup event that occurs when one of
> the thread is active should not be considered as a wakeup event.

while your reasoning might be right.... (I'll argue that but hey...)

your code is not unfortunately ;-(.
}
> +             if (strstr(line, "ht")) {
> +                     hyper_threading = 1;
> +             }

the "ht" flag only means that the MSRs that report the number of 
siblings is valid. It does not mean that you actually have siblings.


> +             if (cpu&  1){

and this "it's the last bit" is not correct behavior; first of all, 
that's only valid for APIC IDs not Linux CPU numbers, and only IF you 
have exactly 2 siblings,
which you don't check. Reality is that you must use the topology 
information exported by the kernel if you want to use this.



_______________________________________________
Power mailing list
[email protected]
https://bughost.org/mailman/listinfo/power

Reply via email to