Linux has "getconf LEVEL1_DCACHE_LINESIZE"
Mac OS has "sysctl hw.cachelinesize"
All I've found is a reference to "prtconf -v", but my output doesn't
include anything about caches. I can use cpuid directly on x86, but I
haven't found anything sparc-ish to work yet.
Thanks in advance,
Luke
No entries like:
name='l1-dcache-size' type=int items=1
value=00006000
name='l1-dcache-line-size' type=int items=1
value=00000040
name='l1-dcache-associativity' type=int items=1
value=00000006
name='l1-icache-size' type=int items=1
value=00008000
name='l1-icache-line-size' type=int items=1
value=00000040
name='l1-icache-associativity' type=int items=1
value=00000008
name='l2-cache-size' type=int items=1
value=00080000
name='l2-cache-line-size' type=int items=1
value=00000040
name='l2-cache-associativity' type=int items=1
value=00000008
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
I believe it's generally 64 bytes as shown below, but it would
be a mistake to assume that all CPUs in the system have the same
cache-line-size -- sparc systems in particular have a long history
of allowing use of mixtures of CPUs of different specs so if it
were to change, you might find some CPUs on a system have different
cache-line-size than others, and that this might change whilst the
system is running.
> No entries like:
>
> name='l1-dcache-size' type=int items=1
> value=00006000
> name='l1-dcache-line-size' type=int items=1
> value=00000040
> name='l1-dcache-associativity' type=int items=1
> value=00000006
> name='l1-icache-size' type=int items=1
> value=00008000
> name='l1-icache-line-size' type=int items=1
> value=00000040
> name='l1-icache-associativity' type=int items=1
> value=00000008
> name='l2-cache-size' type=int items=1
> value=00080000
> name='l2-cache-line-size' type=int items=1
> value=00000040
> name='l2-cache-associativity' type=int items=1
> value=00000008
--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]
Unfortunately, no. I was hoping for that, but I just get a bunch of
this...
cpu (driver not attached)
cpu (driver not attached)
cpu (driver not attached)
cpu (driver not attached)
cpu (driver not attached)
cpu (driver not attached)
cpu (driver not attached)
Luke
Hmm... that's awkward. I guess I can just use 128, it just seems wrong
to embed a constant into the configuration like that.
Luke
prtpicl -v -c cpu
Great! Thanks Fred, that's just what I need.
Luke