[Beowulf] [EXTERNAL] Re: Deskside clusters

Lux, Jim (US 7140) james.p.lux at jpl.nasa.gov
Mon Sep 20 17:41:24 UTC 2021

From: Beowulf <beowulf-bounces at beowulf.org> on behalf of Lawrence Stewart <stewart at serissa.com>
Date: Monday, September 20, 2021 at 9:17 AM
To: Jim Cownie <jcownie at gmail.com>
Cc: Lawrence Stewart <stewart at serissa.com>, Douglas Eadline <deadline at eadline.org>, "beowulf at beowulf.org" <beowulf at beowulf.org>
Subject: Re: [Beowulf] [EXTERNAL] Re: Deskside clusters

Well said.  Expanding on this, caches work because of both temporal locality and
spatial locality.  Spatial locality is addressed by having cache lines be substantially
larger than a byte or word.  These days, 64 bytes is pretty common.  Some prefetch schemes,
like the L1D version that fetches the VA ^ 64 clearly affect spatial locality.  Streaming
prefetch has an expanded notion of “spatial” I suppose!

What puzzles me is why compilers seem not to have evolved much notion of cache management. It
seems like something a smart compiler could do.  Instead, it is left to Prof. Goto and the folks
at ATLAS and BLIS to figure out how to rewrite algorithms for efficient cache behavior. To my
limited knowledge, compilers don’t make much use of PREFETCH or any non-temporal loads and stores
either. It seems to me that once the programmer helps with RESTRICT and so forth, then compilers could perfectly well dynamically move parts of arrays around to maximize cache use.


I suspect that there’s enough variability among cache implementation and the wide variety of algorithms that might use it that writing a smart-enough compiler is “hard” and “expensive”.

Leaving it to the library authors is probably the best “bang for the buck”.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://beowulf.org/pipermail/beowulf/attachments/20210920/7adfd095/attachment-0001.htm>

More information about the Beowulf mailing list