OpenSSD Cosmos+ Platform Firmware
0.0.2
The firmware of Cosmos+ OpenSSD Platform for TOSHIBA nand flash module.
|
The structure of the data buffer entry. More...
#include <data_buffer.h>
Data Fields | |
unsigned int | logicalSliceAddr |
unsigned int | prevEntry: 16 |
unsigned int | nextEntry: 16 |
unsigned int | blockingReqTail: 16 |
unsigned int | hashPrevEntry: 16 |
unsigned int | hashNextEntry: 16 |
unsigned int | dirty: 1 |
unsigned int | reserved0: 15 |
The structure of the data buffer entry.
Since only a limited number of data buffer entries could be maintained in DRAM, the fw must reuse the data buffer entries by maintaining a LRU list which is consist of data buffer entries.
The nodes of the LRU list are linked using the two members prevEntry
and nextEntry
of this structure.
dirty
of that entry is marked as true.Besides storing the data needed by the requests, the data buffer entries are also used as cache to speed up the read/write requests. When a new request is created the fw should first check if there is any data buffer entry cached the data needed by the new request (check ReqTransSliceToLowLevel()
and CheckDataBufHit()
for details).
However, if we simply traverse the LRU list every time we want to check the data buffer, it may be too slow. Therefore, in current implementation, the fw maintains a hash table to reduce the overhead for searching the target data buffer entry that owns the data of target LBA. And the nodes of the hash table are linked together by using the two members hashPrevEntry
and hashNextEntry
of this structure.
Also, since a data buffer may be shared by several requests, every data buffer entry maintains a blocking request queue (by using SSD_REQ_FORMAT::(prev|next)BlockingReq
, and DATA_BUF_ENTRY::blockingReqTail
) to make sure the requests will be executed in correct order (check UpdateDataBufEntryInfoBlockingReq()
for details).
UpdateDataBufEntryInfoBlockingReq()
. Definition at line 102 of file data_buffer.h.
unsigned int _DATA_BUF_ENTRY::blockingReqTail |
Definition at line 107 of file data_buffer.h.
unsigned int _DATA_BUF_ENTRY::dirty |
Definition at line 110 of file data_buffer.h.
unsigned int _DATA_BUF_ENTRY::hashNextEntry |
Definition at line 109 of file data_buffer.h.
unsigned int _DATA_BUF_ENTRY::hashPrevEntry |
Definition at line 108 of file data_buffer.h.
unsigned int _DATA_BUF_ENTRY::logicalSliceAddr |
Definition at line 104 of file data_buffer.h.
unsigned int _DATA_BUF_ENTRY::nextEntry |
Definition at line 106 of file data_buffer.h.
unsigned int _DATA_BUF_ENTRY::prevEntry |
Definition at line 105 of file data_buffer.h.
unsigned int _DATA_BUF_ENTRY::reserved0 |
Definition at line 111 of file data_buffer.h.