4 Comments
User's avatar
Roger Shepherd's avatar

What's with the "Machine 3491 Total"? You've got 8G of memory on your machine; I've got 16G on mine and I get the same hw.cachesize = 3660136448 as you.

Expand full comment
Brice's avatar

Looks like the main memory is partitioned between CPU (what lstopo shows in Machine) and GPU (what's in the OpenCL device at the bottom)? Not sure how that's configured.

Expand full comment
Roger Shepherd's avatar

That would go against the fuss that Apple have made about the "unified memory architecture" of the M1 Macs. I've not got round to putting brew on to my machine so I can't check what hwloc says, but I will get round to doing that and I'll try hwloc when I do.

I've tried to find out the meaning of the numbers that come back as hw.cachesize. I can't find an explanation even though I've found where they seem to get set up in XNU.

Expand full comment
Jim Cownie's avatar

As you can see it's what the kernel is reporting, but I agree that it makes little sense. FWIW the XNU code seems to be available at https://github.com/apple/darwin-xnu#what-is-xnu

The OS is clearly being "economical with the truth" about teh caches, though, since the cache sizes apparently differ between the the two types of core (see second page of the Anadtech article below).

The best u-arch analysis I can find is at Anandtech https://www.anandtech.com/show/16226/apple-silicon-m1-a14-deep-dive/2 though it's based on analysis of the A14 core in the iPhone, rather than M1 Si. It does point at some u-arch benchmarks ( https://github.com/Veedrac/microarchitecturometer ) if you want to play with them!

Expand full comment