Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
libnvdimm: Non-Volatile Devices
Browse files Browse the repository at this point in the history
Maintainer information and documentation for drivers/nvdimm

Cc: Andy Lutomirski <[email protected]>
Cc: Boaz Harrosh <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Neil Brown <[email protected]>
Cc: Greg KH <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
  • Loading branch information
djbw committed Jun 26, 2015
1 parent 6bc7561 commit bc30196
Show file tree
Hide file tree
Showing 3 changed files with 858 additions and 13 deletions.
24 changes: 17 additions & 7 deletions Documentation/nvdimm/btt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,17 @@ block. Each map entry is 32 bits. The two most significant bits are special
flags, and the remaining form the internal block number.

Bit Description
31 : TRIM flag - marks if the block was trimmed or discarded
30 : ERROR flag - marks an error block. Cleared on write.
29 - 0 : Mappings to internal 'postmap' blocks
31 - 30 : Error and Zero flags - Used in the following way:
Bit Description
31 30
-----------------------------------------------------------------------
00 Initial state. Reads return zeroes; Premap = Postmap
01 Zero state: Reads return zeroes
10 Error state: Reads fail; Writes clear 'E' bit
11 Normal Block – has valid postmap


29 - 0 : Mappings to internal 'postmap' blocks


Some of the terminology that will be subsequently used:
Expand Down Expand Up @@ -127,10 +135,11 @@ old_map': alternate old postmap entry
new_map': alternate new postmap entry
seq' : alternate sequence number.

Each of the above fields is 32-bit, making one entry 16 bytes. Flog updates are
Each of the above fields is 32-bit, making one entry 32 bytes. Entries are also
padded to 64 bytes to avoid cache line sharing or aliasing. Flog updates are
done such that for any entry being written, it:
a. overwrites the 'old' section in the entry based on sequence numbers
b. writes the new entry such that the sequence number is written last.
b. writes the 'new' section such that the sequence number is written last.


c. The concept of lanes
Expand All @@ -141,8 +150,9 @@ concurrently, 'nlanes' is the number of IOs the BTT device as a whole can
process.
nlanes = min(nfree, num_cpus)
A lane number is obtained at the start of any IO, and is used for indexing into
all the on-disk and in-memory data structures for the duration of the IO. It is
protected by a spinlock.
all the on-disk and in-memory data structures for the duration of the IO. If
there are more CPUs than the max number of available lanes, than lanes are
protected by spinlocks.


d. In-memory data structure: Read Tracking Table (RTT)
Expand Down
Loading

0 comments on commit bc30196

Please sign in to comment.