8.1-PRERELEASE: CPU packages not detected correctly

Andriy Gapon avg at icyb.net.ua
Fri Aug 27 22:02:18 UTC 2010


on 28/08/2010 00:43 Jung-uk Kim said the following:
>> Things like that probably do not happen with real hardware much,
>> but they could.
> 
> AFAIK, it never happened on a real hardware.
> 
>> The only way to deal with this is by following the correct procedure
>> instead of making assumptions based on BSP.  But that may be hard.
> 
> Feel free to rewrite the patch.  I never intended to commit the patch, 
> any way.  If I ever did, it was a year ago. :-)

:-)
BTW, it may be not that hard.
It seems that 0x4 topology building involves knowing the masks and we already
have that data (just interpreted differently), and APIC IDs of the CPUs and it
seems that we also have that.  We don't need to bind to CPUs to learn their IDs,
we can just iterate over cpu_apic_ids[].

The only problem is that currently topo_probe() is called before
assign_cpu_ids() which populates cpu_apic_ids.
assign_cpu_ids depends on topo_probe to know hyperthreading_cpus value.
So, either cpu_apic_ids could be split out or alternatively we could use
cpu_info[] similarly to how it's done in topo_probe_0xb (skipping !cpu_present
and cpu_disabled entries).


-- 
Andriy Gapon


More information about the freebsd-stable mailing list