Re: cannot compile sched_ule without options SMP

From: Jeff Roberson <jroberson_at_jroberson.net>
Date: Thu, 30 Apr 2009 19:14:46 -1000 (HST)
On Fri, 1 May 2009, pluknet wrote:

> 2009/5/1 pluknet <pluknet_at_gmail.com>:
>> 2009/5/1 Jeff Roberson <jroberson_at_jroberson.net>:
>>> On Thu, 30 Apr 2009, pluknet wrote:
>>>
>>>> 2009/4/30 Jeff Roberson <jroberson_at_jroberson.net>:
>>>>>
>>>>> On SMP machines you should now see output like this:
>>>>> FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
>>>>> FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 SMT threads
>>>>>
>>>>> If you detect any irregularities with kern.sched.topology_spec or this
>>>>> dmesg
>>>>> line please report them.
>>>>>
>>>>
>>>> Hi, Jeff.
>>>>
>>>> I have such mismatch. This is an Intel E7200.
>>>>
>>>> FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
>>>> FreeBSD/SMP: 1 package(s) x 1 core(s) x 2 HTT threads
>>>> cpu0 (BSP): APIC ID:  0
>>>> cpu1 (AP/HT): APIC ID:  1
>>>>
>>>> So it should be instead: 1 package(s) x 2 core(s)
>>>> cpu0 (BSP): APIC ID:  0
>>>> cpu1 (AP): APIC ID:  1
>>>
>>> Can you please repeat the following steps as I have done here:
>>>
>>
>> (kgdb) p/x cpu_high
>> $1 = 0x2
>> (kgdb) p/x cpu_cores
>> $2 = 0x1
>> (kgdb) p/x cpu_logical
>> $3 = 0x2
>> (kgdb) p/x cpu_feature
>> $4 = 0xbfebfbff
>> (kgdb) p/x logical_cpus
>> $5 = 0x2
>> (kgdb) p/x hyperthreading_cpus
>> $6 = 0x2
>>
>
> Follow up myself:
>
> What is embarrassing me is HTT feature enabled. May the reason be in a
> buggy CPUID ?

This is very curious.  With older revisions did the system believe your 
CPUs were HTT?  You can tell if you had sysctl 
machdep.hyperthreading_allowed or via the ULE kern.sched.topology_spec 
sysctl.

I didn't realize there were any core2 CPUs without leaf 4 of cpuid. 
However, I didn't write the earlier hyperthread detection code.  I'll see 
if I can get jhb to chime in.

The HTT feature bit is set on many processors that don't have 
hyperthreads.  So we need a secondary way of differentiating.  I don't 
know what that is in this case.

Thanks,
Jeff

>
> -- 
> wbr,
> pluknet
>
Received on Fri May 01 2009 - 03:12:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:46 UTC