Transcription of NVDIMM Namespace 1.0 - pmem.io
1 NVDIMM Namespace Specification April 2015 Revision 2 You may not use or facilitate the use of this document in connection with any infringement or other legal analysis concerning Intel products described herein. You agree to grant Intel a non- exclusive, royalty- free license to any patent claim thereafter drafted which includes subject matter disclosed herein. All information provided here is subject to change without notice.
2 Contact your Intel representative to obtain the latest Intel product specifications and roadmaps. No license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by this document. The products described may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request. Copies of documents which have an order number and are referenced in this document, or other Intel literature may be obtained by calling 1- 800- 548- 4725 or by visiting Intel's website at Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.
3 *Other names and brands may be claimed as the property of others. Copyright 2015, Intel Corporation 3 Contents 1 Introduction .. 6 Document Scope .. 6 Related Documents .. 7 NVDIMM Firmware Interface Table (NFIT) .. 7 NVDIMM DSM Example Definition .. 7 Terminology .. 7 Overview .. 10 NVDIMMs and the System Physical Address Space .. 10 NVDIMM Access via Block Window .. 12 Namespaces .. 13 Driver Software .. 17 2 Namespaces .. 20 Namespace Label Index Block Layout.
4 21 The Label Index Block seq Field .. 24 The Label Index Block free Field .. 25 Namespace Label Layout .. 25 The Label uuid Field .. 28 The Label name Field .. 28 The Label flags Field .. 28 The Label nlabel and position Fields .. 29 The Label isetcookie Field .. 30 The Label lbasize Field .. 31 Namespace Label Rules .. 31 Validating Label Index Blocks and Labels .. 32 Reading Namespace Labels .. 32 Recovery Steps on Namespace Labels .. 33 Assembling Namespace Labels into Complete Sets.
5 34 Incomplete Namespaces .. 34 Updating the Contents of the Label Storage Area .. 35 Writing New Namespace Labels .. 35 Writing New Persistent Memory Namespace Labels .. 36 Writing New Block Mode Namespace Labels .. 36 Updating Existing Namespace Labels .. 37 Updating Persistent Memory Namespace Labels .. 37 4 The Label- less Namespace .. 38 Virtualization Considerations .. 38 I/O on Namespaces .. 38 3 Block Translation Table (BTT) .. 40 BTT Data Structures .. 41 The BTT Info Block.
6 41 The BTT Data Area .. 44 The BTT Map .. 44 The BTT Flog .. 46 BTT Theory of Operation .. 47 The Read Path .. 48 The Write Path .. 48 BTT Recovery .. 49 4 Example C Structure Definitions .. 51 Namespace Label Index Block Structure .. 52 Namespace Label Structure .. 53 BTT Info Block Structure .. 53 BTT Flog Structure .. 54 5 Example Algorithms .. 56 The Fletcher64 Checksum .. 56 5 Figures Figure 1: Typical NVDIMM Software Architecture .. 7 Figure 2: Persistent Memory Mapped into the System Physical Address Space.
7 11 Figure 3: 2- Way Interleave Set of Persistent Memory .. 12 Figure 4: DPA- Based Access Through a Block Window (BW) .. 13 Figure 5: 2- Way Interleave Set Containing a Persistent Memory Namespace .. 14 Figure 6: Block Namespaces Associated with Individual DIMMs .. 15 Figure 7: NVDIMMs Contributing to Both Persistent Memory and Block Namespaces .. 15 Figure 8: Creating a Multi- Range Namespace Due to Fragmentation .. 16 Figure 9: Example Software Organization for Block I/O .. 17 Figure 10: Example Software Organization for Namespace Management.
8 18 Figure 11: Namespace Label Storage on the NVDIMM .. 21 Figure 12: Cyclic Sequence Numbers in Label Index Block .. 24 Figure 13: I/O on a Multi- Range Namespace .. 39 Figure 14: The BTT Data Structures in a Block Namespace .. 40 Figure 15: A BTT With Multiple Arenas in a Large Block Namespace .. 41 Figure 16: Cyclic Sequence Numbers for Flog Entries .. 47 Figure 17: BTT Read Path Overview .. 48 Figure 18: BTT Write Path Overview (Error Cases Not Shown) .. 49 Figure 19: Namespace Label Index Block Structure.
9 52 Figure 20: Namespace Label Structure .. 53 Figure 21: BTT Info Block Structure .. 54 Figure 22: BTT Flog Structure .. 55 Figure 23: The Fletcher64 Algorithm Used in this Specification .. 56 Tables Table 1: Terminology .. 10 Table 2: Namespace Label Index Block Fields .. 24 Table 3: Namespace Label Fields .. 28 Table 4: BTT Info Block Fields .. 43 Table 5: BTT Map Layout .. 45 Table 6: BTT Flog Layout .. 47 Introduction 6 1 Introduction This document describes a mechanism for sub- dividing Non- Volatile DIMMs (NVDIMMs) into namespaces, which are logic units of storage similar to SCSI LUNs or NVM Express namespaces.
10 The primary audience for this document is driver writers and NVDIMM manageability software developers, although NVDIMM designers and platform OEMs may also find this specification useful. This chapter contains an over of the motivation for NVDIMM namespaces, covers the related terminology, and provides examples of the software architecture that might utilize this specification. Chapter 2 defines NVDIMM namespaces and provides the on- media data stuctures and rules for using them. Chapter 3 defines the Block Translation Table (BTT) mechanism, which is an optional layout within a Namespace for providing block writes that cannot be torn by a system interruption such as a power failure.