home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.arch
- Path: sparky!uunet!cs.utexas.edu!usc!wupost!rice!dawn.cs.rice.edu!preston
- From: preston@dawn.cs.rice.edu (Preston Briggs)
- Subject: Re: Caches and Hashing
- Message-ID: <Bt7KEF.8Lq@rice.edu>
- Sender: news@rice.edu (News)
- Organization: Rice University, Houston
- References: <1992Aug18.182506.23744@ross.COM>
- Distribution: usa
- Date: Wed, 19 Aug 1992 02:03:49 GMT
- Lines: 57
-
- john@netnews.jhuapl.edu (John Hayes) writes:
- >
- >> There was an interesting idea in a recent article in Microprocessor
- >> Report. The article was describing HP's PA-RISC. Here is what caught
- >> my eye:
- >> "The caches are direct mapped to eliminate the performance
- >> impact of multiplexers that would be required with set-
- >> associativity. To reduce the cache miss rates, the addresses
- >> are hashed before they drive the cache SRAMS."*
- >> 1) How much does hashing improve the miss rate of a direct-mapped
- >> cache?
-
- mitch@sparhawk.com (Mitch Alsup) writes:
- >As usual, your milage may vary due to: Application, O/S, cache size.
- >With 65KByte sized caches, many applications see only 5% miss rate
- >(and with a 10 cycle miss penalty they achieve only 50% machine
- >peak performance). With 1MByte sized caches one could expect ~1%
- >miss rate and therefore greater than 90% machine peak performance.
- >
- >Excellent Hashing can be expected to achieve 40% improvement (max--
- >Moyers rule of SQRT(2)-1 for performance gains). This could allow
- >the 65KB cache to achieve 3% miss rates and 70% peak performance;
- >or the 1MB cache to achieve 94% machine performance. Considerable
- >gains in the first case and useful in the second. The 65KB cache
- >PROBABLY would benefit LESS than the larger cache because it is
- >operating closed to its intrinsic COMPUSOLRY miss rate (it is smaller)
- >while the 1MB cache could benefit more IF the WORKING SET of the
- >applicationS fit in the cache. Also note that the difference in the
- >miss rate for the larger cache in direct mapped configruation to
- >a set associative configuration is considerably smaller than that
- >of the smaller cache.
-
- I don't understand what is people are suggesting here. Are we talking
- about scrambling addresses so that sequential accesses aren't
- necessarily mapped sequentially to cache? Is it some kind of
- permutation or can to nearby items (where near is less than cache
- size) ever collide? Does stride 1 access still pay off?
-
- Back in the good ol' days (before I heard of this idea, anyway), we
- all had a rule we could live by:
-
- Elements in a vector don't interfere with each other
- (as long as the vector is smaller than cache).
-
- This even held for direct-mapped caches, primitive beasts though they
- are. Of course, for a 4-way set-associative cache, we could plan on
- keeping 4 vectors in cache, with no interference at all (as long as we
- block the vectors to 1/4 the cache size). And more ways of
- associativity would allow even more complex applications to be
- handled without problems.
-
- Even with a direct-mapped cache, we can take advantage of the rule and
- copy many randomly placed chunks of data into locations that are safe
- (that is, we copy many things into a single vector).
-
- Wondering what the world is coming to,
- Preston Briggs
-