See comments
xxxxx@xxxxx.com 2005-06-13 21:22:01 GMT
Modify the psrinfo(1M) command to optionally print processor cache information.
This information is available form the cpuid instruction on x86.
Solaris currently queries the cpuid instruction with eax=4 in cpuid_pass2() in
file usr/src/uts/i86pc/os/cpuid.c. Currently cpuid_pass2() does not consume
this information. A user land tool has been written in house to correctly
parse the cpuid cache information. Parts of this tool can be used as a model
for the portion of cpuid_pass2() which should parse cpu cache info into
useful structures in the cpuid_info struct. Users should be able to observe
the complete cache architecture provided by the cpuid instruction including
cache sharing between cores/hyper-threads.
prsinfo can then query the cpuid_info structs in each cpu to get the cache info
and then print it.
Those who do SPEC submissions need to be able to verify their
platforms' configurations. The ideal would be something like
this in response to 'psrinfo -pv'
The physical processor has 1 virtual processor (0)
x86 (AuthenticAMD family 15 model 5 step 10 clock 2393 MHz)
AMD Opteron(tm) Processor 850
L1 cache data/instr 64KB/64KB per core
L2 cache size 1MB per core