[Tfug] Dual cores and hyperthreading

John Gruenenfelder johng at as.arizona.edu
Sun Aug 20 13:02:41 MST 2006


On Sun, Aug 20, 2006 at 12:36:48PM -0700, Brian Masur wrote:
>Anyone, correct me if I'm wrong, but should it not have a performance hit or 
>any other problems if John leaves in support for both SMP and HT in the 
>kernel?  From what I remember it will have support for HT but just won't 
>turn it on if it's not available in the hardware.  If so, I would leave them 
>both in there (especially SMP).
>
>Brian

The kernel config help for the "HT scheduler" item is not crystal clear, but I
think it says it is simply adding the availabilty of a HT scheduler which the
kernel can then choose to use or not.

However, according to "cpuid" output, this architecture supports
hyperthreading.  But, after chatting briefly with Rik van Reil (kernel memory
architecture guru) on #kernelnewbies, he informed me that while the base
architecture supports HT, my particular CPU (core duo) only has one thread per
core.

So... the question would then be, will the kernel make the right choice in
this case?  If it only checks for the HT feature bit, it might use the less
optimal scheduler.  If it checks for both the feature bit and the number of
threads it should make the right choice.  Looking at dmesg output, though, I
didn't see any indication either way.

However... in this case, in my last email I was actually referring to the fact
that I had set the CPU type for my kernel compile to P4.  I had confused the
pentium-m with the pentium4m, which Harry cleared up for me.  So when I
recompiled, I made sure to set the CPU type correctly.  And, since I was
already recompiling for that, I switched off the HT scheduler option since
this hardware doesn't need it.


-- 
--John Gruenenfelder    Research Assistant, UMass Amherst student
                        Systems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for PalmOS  --  http://gutenpalm.sf.net
"This is the most fun I've had without being drenched in the blood
of my enemies!"
        --Sam of Sam & Max




More information about the tfug mailing list