On 23 August 2010 18:56, Paul Gilmartin <[email protected]> wrote:
> Is there a query at execution time to extract cache line size to > adjust the geometry of the pointer arrays adaptively? On newer machines, yes - there's Extract Cache Attribute (ECAG), which is unprivileged, and will tell you the size of a cache line, and various other things about the shape and size of the cache(s). > Yukk! I'm designing an algorithm around the hardware. Shame on me! Well it'd be ugly if you were hard coding it, but asking for the info on the fly doesn't seem like a bad thing. That the instruction is unprivileged sugegsts that they intended this to be used by moret than just the OS. Tony H.
