diff options
author | Dan Williams <dan.j.williams@intel.com> | 2015-06-25 04:48:19 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-06-26 11:23:38 -0400 |
commit | bc30196f715ed3a94d050ef8bc465e567a6050be (patch) | |
tree | f6eb086e69aeaec577b9a168933dadfaa2288f61 /Documentation/nvdimm/btt.txt | |
parent | 6bc756193ff61bf5e7b3cfedfbb0873bf40f8055 (diff) |
libnvdimm: Non-Volatile Devices
Maintainer information and documentation for drivers/nvdimm
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Boaz Harrosh <boaz@plexistor.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jens Axboe <axboe@fb.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Neil Brown <neilb@suse.de>
Cc: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'Documentation/nvdimm/btt.txt')
-rw-r--r-- | Documentation/nvdimm/btt.txt | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/Documentation/nvdimm/btt.txt b/Documentation/nvdimm/btt.txt index 95134d5ec4a0..b91443f577dc 100644 --- a/Documentation/nvdimm/btt.txt +++ b/Documentation/nvdimm/btt.txt | |||
@@ -80,9 +80,17 @@ block. Each map entry is 32 bits. The two most significant bits are special | |||
80 | flags, and the remaining form the internal block number. | 80 | flags, and the remaining form the internal block number. |
81 | 81 | ||
82 | Bit Description | 82 | Bit Description |
83 | 31 : TRIM flag - marks if the block was trimmed or discarded | 83 | 31 - 30 : Error and Zero flags - Used in the following way: |
84 | 30 : ERROR flag - marks an error block. Cleared on write. | 84 | Bit Description |
85 | 29 - 0 : Mappings to internal 'postmap' blocks | 85 | 31 30 |
86 | ----------------------------------------------------------------------- | ||
87 | 00 Initial state. Reads return zeroes; Premap = Postmap | ||
88 | 01 Zero state: Reads return zeroes | ||
89 | 10 Error state: Reads fail; Writes clear 'E' bit | ||
90 | 11 Normal Block – has valid postmap | ||
91 | |||
92 | |||
93 | 29 - 0 : Mappings to internal 'postmap' blocks | ||
86 | 94 | ||
87 | 95 | ||
88 | Some of the terminology that will be subsequently used: | 96 | Some of the terminology that will be subsequently used: |
@@ -127,10 +135,11 @@ old_map': alternate old postmap entry | |||
127 | new_map': alternate new postmap entry | 135 | new_map': alternate new postmap entry |
128 | seq' : alternate sequence number. | 136 | seq' : alternate sequence number. |
129 | 137 | ||
130 | Each of the above fields is 32-bit, making one entry 16 bytes. Flog updates are | 138 | Each of the above fields is 32-bit, making one entry 32 bytes. Entries are also |
139 | padded to 64 bytes to avoid cache line sharing or aliasing. Flog updates are | ||
131 | done such that for any entry being written, it: | 140 | done such that for any entry being written, it: |
132 | a. overwrites the 'old' section in the entry based on sequence numbers | 141 | a. overwrites the 'old' section in the entry based on sequence numbers |
133 | b. writes the new entry such that the sequence number is written last. | 142 | b. writes the 'new' section such that the sequence number is written last. |
134 | 143 | ||
135 | 144 | ||
136 | c. The concept of lanes | 145 | c. The concept of lanes |
@@ -141,8 +150,9 @@ concurrently, 'nlanes' is the number of IOs the BTT device as a whole can | |||
141 | process. | 150 | process. |
142 | nlanes = min(nfree, num_cpus) | 151 | nlanes = min(nfree, num_cpus) |
143 | A lane number is obtained at the start of any IO, and is used for indexing into | 152 | A lane number is obtained at the start of any IO, and is used for indexing into |
144 | all the on-disk and in-memory data structures for the duration of the IO. It is | 153 | all the on-disk and in-memory data structures for the duration of the IO. If |
145 | protected by a spinlock. | 154 | there are more CPUs than the max number of available lanes, than lanes are |
155 | protected by spinlocks. | ||
146 | 156 | ||
147 | 157 | ||
148 | d. In-memory data structure: Read Tracking Table (RTT) | 158 | d. In-memory data structure: Read Tracking Table (RTT) |