home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / arch / 8976 < prev    next >
Encoding:
Text File  |  1992-08-20  |  3.2 KB  |  61 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!usc!sol.ctr.columbia.edu!ira.uka.de!rz.uni-karlsruhe.de!usenet
  3. From: S_JUFFA@iravcl.ira.uka.de (|S| Norbert Juffa)
  4. Subject: Re: CACHE MISS PENALTY FOR 386/486??
  5. In-Reply-To: eletanjm@nuscc.nus.sg's message of Wed, 19 Aug 1992 04: 23:18 GMT
  6. Message-ID: <1992Aug20.165858.1029@rz.uni-karlsruhe.de>
  7. Sender: usenet@rz.uni-karlsruhe.de (USENET News System)
  8. Organization: University of Karlsruhe (FRG) - Informatik Rechnerabt.
  9. References:  <1992Aug19.042318.10163@nuscc.nus.sg>
  10. Date: Thu, 20 Aug 1992 16:58:58 GMT
  11. X-News-Reader: VMS NEWS 1.23
  12. Lines: 47
  13.  
  14. In <1992Aug19.042318.10163@nuscc.nus.sg> eletanjm@nuscc.nus.sg writes:
  15.  
  16. > Just what is a typical cache miss penalty on 
  17. > (1) a 386 system with external cache 
  18. > (2) a 486 system with only internal cache
  19. > (3) a 486 system with internal cache and external secondary cache 
  20. > I'm assuming an typical AT style system.
  21. > Just how do you determine the miss penalty anyway?
  22.  
  23. The German computer magazine c't had a review of several identical configured
  24. 386 motherboards recently, each with a different chip set. They measured the
  25. cache miss penalty for the cache controllers that are included in the chip set.
  26. The cache miss penalty ranged between 3 clock cycles for an ACT chip set, 4
  27. clock cycles for the Forex chip set up to 40 (for an UMC chip set, I think).
  28. Apart from the speed of the cache logic, the cache line length heavily
  29. influences time for a cache miss. Most 386 systems have 4 byte cache lines
  30. that can be filled by a single access to memory. There are some that feature
  31. longer cache lines, though. I think line sizes of up to 16 bytes are common.
  32. In a naive approach, the CPU would have to wait until the complete cache line
  33. had been loaded. There is a more clever approach possible that delivers the
  34. word the CPU wanted directly to the CPU and fills the cache line afterwards
  35. (I think this is called "read-around" or similar). 
  36.  
  37. You should find data about the cache miss penalty for the 486 in the i486 
  38. Hardware Reference Manual available from Intel's literature department.
  39.  
  40. As for measuring the miss penalty, you try to force cache misses and measure
  41. the load time from memory and then compare it to the time it takes the
  42. memory access to complete in the case of 100% cache hits. Assume you have an
  43. 8 kByte cache. If you load a block of memory of exactly 8 kByte and read it
  44. twice, you will have close to 100% hit rate on the second access (since the
  45. 386/486 feature unified code/data caches, executing the instructions to
  46. read from memory throws out some of the data read before, but not much).
  47. Now assume you read a 16 kByte block linearly into the same cache. After
  48. the first read, the second 8 kByte half of the 16 kByte block will completely 
  49. occupy the cache. Now you read the same 16 kByte block again. On every access
  50. to a cache line for the first 8 KByte, you have a cache miss. If you measure
  51. the for both read operations and factor in the cache line length, you can
  52. compute the miss time. I have tried this approach and it seems to work
  53. quite well. There may be more sophisticated ideas though I am not aware of.
  54.  
  55.  
  56. Norbert 
  57. ------------------------------------------------------------------------------
  58. Norbert Juffa     email: S_JUFFA@IRAVCL.IRA.UKA.DE          Live and let live!
  59.