A Study on the Prediction Accuracy Bounds of Instruction Prefetching

명령어 선인출 예측 정확도의 한계에 관한 연구

  • 김성백 (제주대학교 컴퓨터교육과) ;
  • 민상렬 (서울대학교 컴퓨터공학부) ;
  • 김종상 (서울대학교 컴퓨터공학부)
  • Published : 2000.08.15

Abstract

Prefetching aims at reducing memory latency by fetching, in advance, data that are likely to be requested by the processor in a near future. The effectiveness of prefetching is determined by how accurate the prediction on the needed instructions and data is. Most previous studies on prefetching were limited to proposing a particular prefetch scheme and its performance evaluation, paying little attention to theoretical aspects of prefetching. This paper focuses on the theoretical aspects of instruction prefetching. For this purpose, we propose a clairvoyant prefetch model that makes use of perfect history information. Based on this theoretical model, we analyzed upper limits on the prefetch prediction accuracies of the SPEC benchmarks. The results show that the prefetch prediction accuracy is very high when there is no cache. However, as the size of the instruction cache increases, the prefetch prediction accuracy drops drastically. For example, in the case of the spice benchmark, the prefetch prediction accuracy drops from 53% to 39% when the cache size increases from 2Kbyte to 16Kbyte (assuming 16byte block size). These results indicate that as the cache size increases, most localities are captured by the cache and that instruction prefetching based on the information extracted from the references that missed in the cache suffers from prediction inaccuracies

선인출은 프로세서에 의해 사용될 데이타를 예측하여 미리 프로세서 근처에가져오므로써 메모리 지연 시간을 줄이는 기법이다. 선인출의 효율성은 미래에 사용될 데이타를 얼마나 정확하게 예측하는가(선인출 예측 정확도)에 따라 결정된다. 기존의 명령어 선인출에 관한 연구들은 특정 선인출 기법의 제안 및 성능 평가에 그치고 있어서 명령어 선인출의 특성이 체계적으로 분석 정리되지 못하고 있다. 이에 본 논문에서는 명령어 선인출의 예측 정확도에 대해서 이론적으로 분석하여 이의 한계를 알아보고자 한다. 그 방안으로 명령어 선인출 상한 모델이라는 이론적인 선인출 모델을 제안하고 이 모델을 기반으로 명령어 선인출에 대해 체계화된 분석을 한다. 특히 이러한 연구 결과로써 궁극적으로 시스템 성능을 효 과적으로 향상시킬 수 있는 효율적인 명령어 선인출을 가능하게 하는 데 그 목적이 있으므로 주로 명령어 선인출 효율성 측면에서 분석을 시도하였다. 이러한 선인출 모델을 이용하여 본 논문에서는 SPEC 벤치 마크 프로그램들의 명령어 선인출 예측 정확도의 한계를 이론적으로 분석하였다. 그 결과로 캐쉬가 없는 경우에는 선인출 정확도가 매우 높게 나타남을 보였다. 반면에 캐쉬가 있을 경우에는 캐쉬 크기가 커짐에 따라 선인출의 정확도가 급격히 떨어짐을 관찰하였다. 예를 들어 spice의 경우 플록크기가 16바이트이고 직접사상 캐쉬에서 캐쉬 크기가 2K 바이트와 16K 바이트일 때 이론적으로 가능한 최대 선인출 정확도가 각각 53%,39%로 크게 떨어지는 것을 관찰하였다. 캐쉬의 크기가 커질수록 선인출로 메모리 지연 시간을 줄일 수 있는 명령어 참조의 많은 부분을 캐쉬가 처리하게 되고 또한 캐쉬에서 접근 실패된 명령어 참조는 그 참조 행태가 불규칙하여 예측이 어렵기 때문에 일정 크기 이상의 명령어 캐쉬를 사용하는 경우 명령어 선인출을 사용하는 것은 전체 시스템 성능의 향상에 큰 도움이 되지 않음을 이론적으로 규명하였다.

Keywords

References

  1. SPEC Newsletter, Vol. 1, 1989
  2. D. Callahan, K. Kennedy, and A. Porterfield. Software prefetching. In Proceedings of the Fourth International Conference on Architectural Support on Programming Languages and Operating Systems, pages 40-52, 1991 https://doi.org/10.1145/106972.106979
  3. T. Chen and J. Baer. Reducing memory latency via non-blocking and prefetching caches.Techinical report, Department of Computer Science and Engineering, University of Washington, Jun. 1992
  4. J. D. Gee and M. D. Hill and A. J. Smith. Cache Performance of the SPEC Benchmark Suite. Technical Report UCB/CSD 91/648, Computer Science Division, University of California, Berkeley, Oct. 1991
  5. E. H. Gornish, E. D. Granston, and A. V. Veidenbaum. Compiler-directed data prefetching in multiprocessors with memory hierarchies. In Proceedings of the 1990 International Conference on Supercomputing, pages 354-368, 1990 https://doi.org/10.1145/77726.255176
  6. J. L. Hennessy and D. A. Patterson. Computer Architecture: A Quantitative approach (second edition). Morgan Kaufmann Publishers, San Mateo, CA, 1996
  7. N. P. Jouppi. Improving Directed-Mapped Cache Performance by the Addition of a Small Fully-Associative Cache and Prefetch Buffers. In Proceedings of the 17th Annual International Symposium on Computer Architecture, pages 364-373, 1990 https://doi.org/10.1109/ISCA.1990.134547
  8. S. B. Kim and M. S. Park and S. Park and S. L. Min and H. Shin and C. S. Kim and D. Jeong. Threaded prefetching: An adaptive instruction prefetch mechanism, Microprocessing and Microprogramming, 39, 1993 https://doi.org/10.1016/0165-6074(93)90257-L
  9. A. C. Klaiber and H. M. Levy. Architecture for software-controlled data prefetching. In Proceedings of the 18th Annual International Symposium on Computer Architecture, pages 43-63, 1991 https://doi.org/10.1145/115952.115958
  10. R. L. Lee, The Effectiveness of Caches and Data Prefetch Buffers in Large-Scale Shared Memory Multiprocessors. PhD Thesis, University of Illinois, Urbana-Champaign, May 1987
  11. R. L. Lee, P. C. Yew, and D. H. Lawrie. Data prefetching in shared memory multiprocessors. In Proceedings of the 1990 International Conference on Parallel Processing, pages 28-31, 1987
  12. A. J. Smith. Bibliography and readings on CPU cache memories. Computer Architecture News, 14(1):22-42, Jan. 1986 https://doi.org/10.1145/381730.381737
  13. A. J. Smith. Second bibliography on cache memories. Computer Architecture News, 19(4):154-182, Jun. 1991 https://doi.org/10.1145/122576.122592
  14. A. J. Smith. Cache Memories. ACM Computing Surveys, 14(3):473-530, Sep. 1982 https://doi.org/10.1145/356887.356892
  15. M. D. Smith. Tracing with pixie. Technical Report CSL-TR-91-497, Stanford University, Nov. 1991
  16. D. Thiebaut. From the fractal dimension of the intermiss gaps to the cache miss ratio. IBM Journal of Research and Development, 32(6):796-803, Nov. 1988
  17. D. Thiebaut and H. S. Stone. Footprints in the cache. ACM Transactions on Computer Systems, 5(4):305-329, Nov. 1987 https://doi.org/10.1145/29868.32979