Abstract
In this book chapter, we introduce a post-silicon validation solution for multi-core memory consistency. We first introduce several memory consistency models widely used in modern multi-core microprocessors, and explain memory consistency validation efforts in the literature. We then present MTraceCheck, our post-silicon memory consistency validation framework. MTraceCheck is based on a constrained-random testing approach that generates many constrained-random test programs designed to stress-test a variety of memory-access interleaving behaviors across multiple cores. We instrument the generated tests with our novel observability-enhancing code, which computes a compact signature representing the memory-access interleaving patterns observed during the test execution. The instrumented tests are then repeatedly run to exhibit subtle memory ordering behaviors, and we gather a collection of signatures from the repeated runs. Finally, we apply a novel efficient checking algorithm to detect any consistency violation from the collection of signatures. We evaluate MTraceCheck on two platforms: an x86-based desktop and an ARM-based single-board computer. Compared to a conventional memory-tracking method, we significantly reduce memory operations introduced for the purpose of verification by 93% on average. In addition, we reduce the checking computation requirements by 81% on average, compared to a conventional checking algorithm. We also demonstrate that MTraceCheck can detect subtle bugs in a full-system simulator.
This work is based on an earlier work: “MTraceCheck: Validating Non-Deterministic Behavior of Memory Consistency Models in Post-Silicon Validation” by Doowon Lee and Valeria Bertacco in the 44th Annual International Symposium on Computer Architecture (ISCA ’17) ©ACM 2017. https://doi.org/10.1145/3079856.3080235.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
The signature-sorting time can be significantly reduced by two optimizations: (1) the sorting routine can utilize multiple cores available, and (2) the sorting routine can be run on the more powerful Cortex-A15 cluster. These two are not implemented in our experimental evaluations.
References
A. Adir, M. Golubev, S. Landa, A. Nahir, G. Shurek, V. Sokhin, A. Ziv, Threadmill: a post-silicon exerciser for multi-threaded processors, in Proceedings of the 48th Design Automation Conference (2011), pp. 860–865. https://doi.org/10.1145/2024724.2024916
S.V. Adve, K. Gharachorloo, Shared memory consistency models: a tutorial. Computer 29(12), 66–76 (1996). https://doi.org/10.1109/2.546611
J. Alglave, A formal hierarchy of weak memory models. Form. Methods Syst. Design 41(2), 178–210 (2012). https://doi.org/10.1007/s10703-012-0161-5
J. Alglave, L. Maranget, S. Sarkar, P. Sewell, Fences in weak memory models, in Computer Aided Verification: 22nd International Conference, CAV 2010 (2010), pp. 258–272. https://doi.org/10.1007/978-3-642-14295-6_25
J. Alglave, L. Maranget, S. Sarkar, P. Sewell, Litmus: running tests against hardware, in Tools and Algorithms for the Construction and Analysis of Systems: 17th International Conference, TACAS 2011 (2011), pp. 41–44. https://doi.org/10.1007/978-3-642-19835-9_5
J. Alglave, L. Maranget, M. Tautschnig, Herding cats: modelling, simulation, testing, and data mining for weak memory. ACM Trans. Program. Lang. Syst. 36(2), 7:1–7:74 (2014). https://doi.org/10.1145/2627752
ARM: Barrier Litmus Tests and Cookbook (2009)
ARM: Cortex-A9 MPCore Programmer Advice Notice Read-after-Read Hazards, ARM Reference 761319 (2011)
ARM: Embedded Trace Macrocell Architecture Specification (2011)
ARM: ARM Architecture Reference Manual, ARMv7-A and ARMv7-R edition (2012)
ARM: ARM Architecture Reference Manual, ARMv8, for ARMv8-A architecture profile (2017)
Arvind, J.W. Maessen, Memory model \(=\) instruction reordering \(+\) store atomicity, in Proceedings of the 33rd Annual International Symposium on Computer Architecture (2006), pp. 29–40. https://doi.org/10.1109/ISCA.2006.26
T. Ball, J.R. Larus, Efficient path profiling, in Proceedings of the 29th Annual ACM/IEEE International Symposium on Microarchitecture (1996), pp. 46–57. https://doi.org/10.1109/MICRO.1996.566449
N. Binkert, B. Beckmann, G. Black, S.K. Reinhardt, A. Saidi, A. Basu, J. Hestness, D.R. Hower, T. Krishna, S. Sardashti, R. Sen, K. Sewell, M. Shoaib, N. Vaish, M.D. Hill, D.A. Wood, The gem5 simulator. ACM SIGARCH Comput. Archit. News 39(2), 1–7 (2011). https://doi.org/10.1145/2024716.2024718
H.W. Cain, M.H. Lipasti, R. Nair, Constraint graph analysis of multithreaded programs, in Proceedings of the 12th International Conference on Parallel Architectures and Compilation Techniques (2003), pp. 4–14. https://doi.org/10.1109/PACT.2003.1237997
K. Chen, S. Malik, P. Patra, Runtime validation of memory ordering using constraint graph checking, in 2008 IEEE 14th International Symposium on High Performance Computer Architecture (2008), pp. 415–426. https://doi.org/10.1109/HPCA.2008.4658657
Y. Chen, Y. Lv, W. Hu, T. Chen, H. Shen, P. Wang, H. Pan, Fast complete memory consistency verification, in 2009 IEEE 15th International Symposium on High Performance Computer Architecture (2009), pp. 381–392. https://doi.org/10.1109/HPCA.2009.4798276
T.H. Cormen, C.E. Leiserson, R.L. Rivest, C. Stein, Introduction to Algorithms, 3rd edn. (The MIT Press, Cambridge, 2009)
Das U-Boot – the universal boot loader (2016), http://www.denx.de/wiki/U-Boot
M. Elver, V. Nagarajan, McVerSi: a test generation framework for fast memory consistency verification in simulation, in 2016 IEEE International Symposium on High Performance Computer Architecture (2016), pp. 618–630. https://doi.org/10.1109/HPCA.2016.7446099
N. Foutris, D. Gizopoulos, M. Psarakis, X. Vera, A. Gonzalez, Accelerating microprocessor silicon validation by exposing ISA diversity, in Proceedings of the 44th Annual IEEE/ACM International Symposium on Microarchitecture (2011), pp. 386–397. https://doi.org/10.1145/2155620.2155666
gem5 mercurial repository host (2016), http://repo.gem5.org
GNU coreutils version 8.25 (2016), http://ftp.gnu.org/gnu/coreutils
S. Hangal, D. Vahia, C. Manovit, J.Y.J. Lu, S. Narayanan, TSOtool: a program for verifying memory systems using the memory consistency model, in Proceedings of the 31st Annual International Symposium on Computer Architecture (2004), pp. 114–123. https://doi.org/10.1109/ISCA.2004.1310768
IBM: Power ISA Version 2.07B (2015)
Intel: Intel 64 Architecture Memory Ordering White Paper (2007)
Intel: Intel 64 and IA-32 Architectures Software Developer’s Manual (2015)
Intel: 6th Generation Intel Processor Family Specification Update (2016)
k-medoids algorithm (2016), https://en.wikipedia.org/wiki/K-medoids
R. Komuravelli, S.V. Adve, C.T. Chou, Revisiting the complexity of hardware cache coherence and some implications. ACM Trans. Archit. Code Optim. 11(4), 37:1–37:22 (2014). https://doi.org/10.1145/2663345
L. Lamport, How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput. 28(9), 690–691 (1979). https://doi.org/10.1109/TC.1979.1675439
D. Lee, V. Bertacco, MTraceCheck: validating non-deterministic behavior of memory consistency models in post-silicon validation, in Proceedings of the 44th Annual International Symposium on Computer Architecture (2017), pp. 201–213. https://doi.org/10.1145/3079856.3080235
D. Lin, T. Hong, Y. Li, E. S, S. Kumar, F. Fallah, N. Hakim, D.S. Gardner, S. Mitra, Effective post-silicon validation of system-on-chips using quick error detection. IEEE Trans. Comput. Aided Design Integr. Circuits Syst. 33(10), 1573–1590 (2014). https://doi.org/10.1109/TCAD.2014.2334301
D. Lustig, M. Pellauer, M. Martonosi, PipeCheck: specifying and verifying microarchitectural enforcement of memory consistency models, in Proceedings of the 47th Annual IEEE/ACM International Symposium on Microarchitecture (2014), pp. 635–646. https://doi.org/10.1109/MICRO.2014.38
D. Lustig, C. Trippel, M. Pellauer, M. Martonosi, ArMOR: defending against memory consistency model mismatches in heterogeneous architectures, in Proceedings of the 42nd Annual International Symposium on Computer Architecture (2015), pp. 388–400. https://doi.org/10.1145/2749469.2750378
D. Lustig, A. Wright, A. Papakonstantinou, O. Giroux, Automated synthesis of comprehensive memory model litmus test suites, in Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating Systems (2017), pp. 661–675. https://doi.org/10.1145/3037697.3037723
S. Mador-Haim, R. Alur, M.M. Martin, Generating litmus tests for contrasting memory consistency models, in Computer Aided Verification: 22nd International Conference, CAV 2010 (2010), pp. 273–287. https://doi.org/10.1007/978-3-642-14295-6_26
B.W. Mammo, V. Bertacco, A. DeOrio, I. Wagner, Post-silicon validation of multiprocessor memory consistency. IEEE Trans. Comput. Aided Design Integr. Circuits Syst. 34(6), 1027–1037 (2015). https://doi.org/10.1109/TCAD.2015.2402171
Y.A. Manerkar, D. Lustig, M. Martonosi, M. Pellauer, RTLCheck: verifying the memory consistency of RTL designs, in Proceedings of the 50th Annual IEEE/ACM International Symposium on Microarchitecture (2017), pp. 463–476. https://doi.org/10.1145/3123939.3124536
A. Meixner, D.J. Sorin, Dynamic verification of memory consistency in cache-coherent multithreaded computer architectures. IEEE Trans. Dependable Secur. Comput. 6(1), 18–31 (2009). https://doi.org/10.1109/TDSC.2007.70243
M. Naylor, S.W. Moore, A. Mujumdar, A consistency checker for memory subsystem traces, in 2016 Formal Methods in Computer-Aided Design (FMCAD) (2016), pp. 133–140. https://doi.org/10.1109/FMCAD.2016.7886671
T. Rabetti, R. Morad, A. Goryachev, W. Kadry, R.D. Peterson, SLAM: SLice And Merge - effective test generation for large systems, in Hardware and Software: Verification and Testing (2013), pp. 151–165
A. Roy, S. Zeisset, C.J. Fleckenstein, J.C. Huang, Fast and generalized polynomial time memory consistency verification, in Computer Aided Verification: 18th International Conference, CAV 2006 (2006), pp. 503–516. https://doi.org/10.1007/11817963_46
E. Seligman, T. Schubert, M.V.A.K. Kumar, Formal Verification (Morgan Kaufmann, San Francisco, 2015)
O. Shacham, M. Wachs, A. Solomatnikov, A. Firoozshahian, S. Richardson, M. Horowitz, Verification of chip multiprocessor memory systems using a relaxed scoreboard, in Proceedings of the 41st Annual IEEE/ACM International Symposium on Microarchitecture (2008), pp. 294–305. https://doi.org/10.1109/MICRO.2008.4771799
D.J. Sorin, M.D. Hill, D.A. Wood, A Primer on Memory Consistency and Cache Coherence, 1st edn. (Morgan & Claypool Publishers, 2011)
The Coq proof assistant (2016), https://coq.inria.fr
I. Wagner, V. Bertacco, Reversi: Post-silicon validation system for modern microprocessors, in IEEE International Conference on Computer Design (2008), pp. 307–314. https://doi.org/10.1109/ICCD.2008.4751878
A. Waterman, K. Asanovic, SiFive Inc., The RISC-V Instruction Set Manual, Volume I: User-Level ISA, Version 2.2 (2017)
D. Weaver, T. Germond, The SPARC Architectural Manual (Version 9) (Prentice-Hall Inc., Englewood Cliffs, 1994)
Acknowledgements
We would like to thank Prof. Todd Austin, Biruk Mammo, and Cao Gao for their advice and counseling throughout the development of this project. The work was supported in part by C-FAR, one of six centers of STARnet, a Semiconductor Research Corporation program sponsored by MARCO and DARPA. Doowon Lee was also supported by a Rackham Predoctoral Fellowship at the University of Michigan.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Lee, D., Bertacco, V. (2019). Test Generation and Lightweight Checking for Multi-core Memory Consistency. In: Mishra, P., Farahmandi, F. (eds) Post-Silicon Validation and Debug. Springer, Cham. https://doi.org/10.1007/978-3-319-98116-1_9
Download citation
DOI: https://doi.org/10.1007/978-3-319-98116-1_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-98115-4
Online ISBN: 978-3-319-98116-1
eBook Packages: EngineeringEngineering (R0)