Topology aware scheduling algorithm.
jroberson at chesapeake.net
Tue Feb 26 07:49:24 UTC 2008
On Tue, 26 Feb 2008, David Xu wrote:
> Jeff Roberson wrote:
>> I think our identcpu.c already detects this information. That's what I'm
>> using. Although I assume that all cpus are identical and fall back on a
>> flat topology if this isn't the case. I'd like to start including more
>> cache information though.
> The patch does not assume all cpus are identical, in theory, one can have a
> machine with one cpu is 4-core and another is 2-core cpu.
> only one place needs to be fixed in the patch,the global variable
> cpu_feature, which is easy to fix for the patch.
cpuid_count(4, cache_level, regs);
if ((regs & 0x1f) == 0)
threads_per_cache = ((regs & 0x3ffc000) >> 14) + 1;
Does this work on all intel/amd cpus?
> David Xu
> freebsd-current at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
More information about the freebsd-current