[PATCH] AMD multicore detection
jkim at FreeBSD.org
Thu Sep 22 12:05:11 PDT 2005
On Thursday 22 September 2005 02:47 am, Colin Percival wrote:
> Martin Nilsson wrote:
> > Jung-uk Kim wrote:
> >> New patch is here:
> >> http://people.freebsd.org/~jkim/multicore.diff
> >> Please test and let me know. I don't have multicore CPU to test
> >> it for myself. :-(
> > The below is on a Pentium D 820 (Dualcore). I don't like that the
> > two cores are reported as hyperthreading when the CPU does not
> > support hyperthreading (only the 840 EE does). If we ship 6.0
> > with HT disabled I'm afraid that it will turn off one of the
> > cores, right?
> It shouldn't. Dual-core processors claim to be hyperthreaded, but
> when I wrote the patch which disabled hyperthreading I added extra
> (and rather complicated) code to detect dual-core processors and
> *not* disable them.
> If I got it wrong, please let me know. :-)
I think what's happening is this:
* If the deterministic cache parameters are not
* available, or if no caches were reported to exist,
* just accept what the HTT flag indicated.
if (hyperthreading_cpus == 0)
hyperthreading_cpus = logical_cpus;
I googled a bit and found this:
It's japanese but you will be able to read the report. ;-)
cpuid with %eax = 4 doesn't seem to return anything.
> Colin Percival
More information about the freebsd-current