Skip to main content

PMemTrace: Lightweight and Efficient Memory Access Monitoring for Persistent Memory

  • Conference paper
  • First Online:
Algorithms and Architectures for Parallel Processing (ICA3PP 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13777))

  • 1453 Accesses

Abstract

Persistent memory gains increasing popularity in recent years. Many persistent memory systems leverage memory access monitoring to achieve user-transparent crash consistency enforcement. However, traditional program analysis-oriented memory access monitoring mechanisms incur prohibitive performance overheads in persistent memory applications. Especially, for applications developed for systems with hybrid DRAM and persistent memory, existing memory tracking approaches cannot distinguish volatile and persistent memory writes, which leads to significant unnecessary runtime cost.

This paper describes PMemTrace, a lightweight and efficient memory access monitoring approach for persistent memory. PMemTrace conducts best-effort pointer analysis to speculatively reduce as many redundant instrumentations to volatile writes as possible at compile time. Besides, PMemTrace enforces thread-local memory access permission control with the Memory Protection Keys (MPK) hardware primitive in recent Intel processors to track the mistakenly filtered persistent writes.

The evaluation results show that PMemTrace substantially outperforms the state-of-the-art memory tracking systems.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Zhang, W., Kai, L.U., Wang, X., Jian, J.: Fast persistent heap based on non-volatile memory. IEICE Trans. Inf. Syst. 100(5), 1035–1045 (2017)

    Article  Google Scholar 

  2. Baldassin, A., Barreto, J., Castro, D., Romano, P.: Persistent memory: a survey of programming support and implementations. ACM Comput. Sur. 54, 1–37 (2021)

    Google Scholar 

  3. Fu, X., et al.: Witcher: systematic crash consistency testing for non-volatile memory key-value stores. In: Proceedings of the ACM SIGOPS 28th Symposium on Operating Systems Principles (2021)

    Google Scholar 

  4. Ly, D., Kosmatov, N., Signoles, J., Loulergue, F.: Soundness of a dataflow analysis for memory monitoring. ACM SIGAda Ada Lett. 38(2), 97–108 (2019)

    Article  Google Scholar 

  5. Wang, H. Zhai, J., Tang, X., Yu, B., Ma, X., Chen, W.: Spindle: informed memory access monitoring, in 2018 USENIX Annual Technical Conference (USENIX ATC 18). Boston, MA: USENIX Association, Jul. 2018, pp. 561–574. https://www.usenix.org/conference/atc18/presentation/wang-haojie

  6. Nalli, S., Haria, S., Hill, M. D., Swift, M. M., Volos, H., Keeton, K.: An analysis of persistent memory use with whisper. In: Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating Systems, ser. ASPLOS ’17. New York, NY, USA: Association for Computing Machinery 45, pp. 135–148 (2017). https://doi.org/10.1145/3037697.3037730

  7. Payer, M., Kravina, E., Gross, T. R.: Lightweight memory tracing. In: 2013 USENIX Annual Technical Conference (USENIX ATC 13). San Jose, CA: USENIX Association, pp. 115–126 (2013). https://www.usenix.org/conference/atc13/technical-sessions/presentation/payer

  8. Laurenzano, M.A., Tikir, M.M., Carrington, L., Snavely, A.: PEBIL: efficient static binary instrumentation for Linux. In: IEEE International Symposium on Performance Analysis of Systems Software (2010)

    Google Scholar 

  9. Nethercote, N., Seward, J.: Valgrind: a program supervision framework. Electron. Notes Theoret. Comput. Sci. 89(2), 44–66 (2003)

    Article  Google Scholar 

  10. Luk, C.-K.: Pin: building customized program analysis tools with dynamic instrumentation, SIGPLAN Not., 40(6), 190–200 (2005). https://doi.org/10.1145/1064978.1065034

  11. Luk, C.-K.: Pin: building customized program analysis tools with dynamic instrumentation, ACM SIGPLAN notices, 40(6), 190–200 (2005)

    Google Scholar 

  12. Kalbfleisch, S.,Werling, L., Bellosa, F.: Vinter: automatic non-volatile memory crash consistency testing for full systems. In: 2022 USENIX Annual Technical Conference (USENIX ATC 22). Carlsbad, CA: USENIX Association, pp. 933–950 (2022). http://www.usenix.org/conference/atc22/presentation/werling

  13. Hsu, T. C.-H., Brügner, H., Roy, I., Keeton, K., Eugster, p.: Nvthreads: practical persistence for multi-threaded applications. In: Proceedings of the Twelfth European Conference on Computer Systems, ser. Euro Sys ’17. New York, NY, USA: Association for Computing Machinery, pp. 468–482 (2017). https://doi.org/10.1145/3064176.3064204

  14. Chakrabarti, D. R., Boehm, H.-J., Bhandari, k.: Atlas: leveraging locks for non-volatile memory consistency, SIGPLAN Not., 49(10), 433–452 (2014). https://doi.org/10.1145/2714064.2660224

  15. Wu, Z., Lu, K., Nisbet, A., Zhang, W., Luján, M.: PMThreads: persistent memory threads harnessing versioned shadow copies. In: Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation, ser. PLDI 2020. New York, NY, USA: Association for Computing Machinery, pp. 623–637 (2020). https://doi.org/10.1145/3385412.3386000

  16. Shang, L., Xie, X., Xue, J.: On-demand dynamic summary-based points-to analysis. In: Proceedings of the Tenth International Symposium on Code Generation and Optimization, ser. CGO ’12. New York, NY, USA: Association for Computing Machinery, pp. 264–274 (2012). https://doi.org/10.1145/2259016.2259050

  17. Sridharan, M., Bodík, R.: Refinement-based context-sensitive points-to analysis for java, SIGPLAN Not., 416, 387–400 (2006). https://doi.org/10.1145/1133255.1134027

  18. MSridharan, M., Gopan, D., Shan, L., Bodík, R.: Demand-driven points-to analysis for java, SIGPLAN Not., 40(10), 59–76 (2005). https://doi.org/10.1145/1103845.1094817

  19. Xu, G., Rountev, A., Sridharan, M.: Scaling CFL-reachability-based points-to analysis using context-sensitive must-not-alias analysis. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 98–122. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-03013-0_6

    Chapter  Google Scholar 

  20. Yan, D., Xu, G., Rountev, A.: Demand-driven context-sensitive alias analysis for java. In: Proceedings of the 2011 International Symposium on Software Testing and Analysis, ser. ISSTA’11. New York, NY, USA: Association for Computing Machinery, pp. 155–165 (2011). https://doi.org/10.1145/2001420.2001440

  21. Neal, I., et al.: AGAMOTTO: how persistent is your persistent memory application? In: 14th USENIX Symposium on Operating Systems Design and Implementation (OSDI 20). USENIX Association, pp. 1047–1064 (2020). https://www.usenix.org/conference/osdi20/presentation/neal

  22. Zheng, X., Rugina, R.: Demand-driven alias analysis for C, SIGPLAN Not., 43(1), 197–208 (2008). https://doi.org/10.1145/1328897.1328464

  23. Zhang, Q., Lyu, M.R., Yuan, H., Su, Z.: Fast algorithms for DYCK-CFL-reachability with applications to alias analysis, SIGPLAN Not., 48(6), 435–446 (2013). https://doi.org/10.1145/2499370.2462159

  24. Steensgaard, B.: Points-to analysis in almost linear time. In: Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, ser. POPL’96. New York, NY, USA: Association for Computing Machinery, pp. 32–41 (1996). https://doi.org/10.1145/237721.237727

Download references

Acknowledgment

This work is supported by National High-level Personnel for Defense Technology Program (2017-JCJQ-ZQ-013), NSF 61902405, the National University of Defense Technology Foundation under Grant Nos. ZK20-09, the Natural Science Foundation of Hunan Province of China under Grant No. 2021JJ40692 and NUDT HPCL Research Fund 202101-04. Kai Lu is the corresponding author of this paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kai Lu .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Zhang, Y., Lu, K., Wu, Z., Zhang, W. (2023). PMemTrace: Lightweight and Efficient Memory Access Monitoring for Persistent Memory. In: Meng, W., Lu, R., Min, G., Vaidya, J. (eds) Algorithms and Architectures for Parallel Processing. ICA3PP 2022. Lecture Notes in Computer Science, vol 13777. Springer, Cham. https://doi.org/10.1007/978-3-031-22677-9_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-22677-9_5

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-22676-2

  • Online ISBN: 978-3-031-22677-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics