home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!mips!sdd.hp.com!hpscdc!hplextra!hpcc05!aspen!morris
- From: morris@aspen.NSA.HP.COM (Dale Morris)
- Newsgroups: comp.arch
- Subject: Re: Caches and Hashing
- Message-ID: <1360025@aspen.NSA.HP.COM>
- Date: 19 Aug 92 17:41:07 GMT
- References: <1992Aug18.182506.23744@ross.COM>
- Organization: HP Networked Systems Architecture - Cupertino, CA
- Lines: 38
-
- Preston Briggs writes:
-
- > 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).
-
- The hash that HP uses does not disturb stride 1 access. These are
- still the good old days for your rule. I think you're right in
- thinking that breaking this rule would be a bad idea.
-
- The function used hashes in bits that are not part of the 32-bit
- address space that the user sees. Generally speaking, these bits are
- constant for each user process. The hash serves only to randomize
- cache placement for one process' references versus anothers'.
-
- ------------------------------------------------------------------------------
- Dale Morris | Now is the time, and now is the record...
- morris@nsa.hp.com | of the time.
- ------------------------------------------------------------------------------
-