Cache operation for a persistent storage device
Abstract
A method comprising: receiving a request to write data to a persistent storage device; writing the data to a cache line of a cache; pushing the cache line onto the end of a least recently used (LRU) queue of cache lines; and reporting the data as having been written to the persistent storage device.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 18 · Forward citations: 0.
Claims (14 — 3 Independent, 11 Dependent)
- Claim 1Independent Claim
A method comprising: receiving a request to write first data to a persistent storage device, the request comprising a first logical block addressing (LBA) value; writing the first data to a first cache line of a cache; updating a mapping between the first LBA value and the first cache line; receiving a subsequent request to write second data to the persistent storage device, the subsequent request comprising the first LBA value; determining that the first LBA value exists in the mapping; determining a dirty cache line corresponding to the first LBA value; updating the corresponding dirty cache line to the second data of the subsequent request; pushing the corresponding dirty cache line onto an end of a least recently used (LRU) queue of cache lines, wherein the LRU queue maintains an order in which respective cache lines were written to the LRU queue without retaining an age of each of the cache lines; reporting the second data as having been written to the persistent storage device; determining that third data is to be evicted from the cache; evicting the third data from the cache; popping a second cache line from a head of the LRU queue; attempting to write the third data at the second cache line to the persistent storage device; and if the write of the third data at the second cache line to the persistent storage device fails, adding the second cache line back to the head of the LRU queue for a re-attempt at eviction.
- Claim 2Depends on #1
The method of claim 1, wherein pushing the corresponding dirty cache line onto the end of the LRU queue of cache lines comprises: removing the first cache line corresponding to the first LBA value from the LRU queue; and pushing the first cache line corresponding to the first LBA value onto the end of the LRU queue.
- Claim 3Depends on #1
The method of claim 1, further comprising: receiving a request to read fourth data from the persistent storage device; determining that the fourth data is in the cache; and providing the fourth data from the cache.
- Claim 4Depends on #3
The method of claim 3, wherein the request to read the fourth data comprises a second LBA value, and wherein determining that the fourth data is in the cache comprises determining that the second LBA value is in a mapping between LBA values and cache lines.
- Claim 5Depends on #4
The method of claim 4, wherein providing the fourth data from the cache comprises providing the fourth data from a third cache line corresponding to the second LBA value in the mapping between LBA values and cache lines.
- Claim 6Depends on #1
The method of claim 1, further comprising marking the second cache line as clean after the third data has been successfully written to the persistent storage device.
- Claim 7Depends on #1
The method of claim 1, wherein determining that the third data is to be evicted from the cache comprises determining that the cache is below a threshold clean capacity.
- Claim 8Depends on #1
The method of claim 1, further comprising after writing the first data to the first cache line of the cache, marking the first cache line as dirty.
- Claim 9Independent Claim
A system comprising: one or more processors; and a memory storing instructions which, when executed by the one or more processors, cause the system to: receive a request to write first data to a persistent storage device, the request comprising a first logical block addressing (LBA) value; write the first data to a first cache line of a cache; update a mapping between the first LBA value and the first cache line; receive a subsequent request to write second data to the persistent storage device, the subsequent request comprising the first LBA value; determine that the first LBA value exists in the mapping; determine a dirty cache line corresponding to the first LBA value; update the corresponding dirty cache line to the second data of the subsequent request; push the corresponding dirty cache line onto an end of a least recently used (LRU) queue of cache lines, wherein the LRU queue maintains an order in which respective cache lines were written to the LRU queue without retaining an age of each of the cache lines; report the second data as having been written to the persistent storage device; determine that third data is to be evicted from the cache; evict the third data from the cache; pop a second cache line from a head of the LRU queue; attempt to write the third data at the second cache line to the persistent storage device; and if the write of the third data at the second cache line to the persistent storage device fails, add the second cache line back to the head of the LRU queue for a re-attempt at eviction.
- Claim 10Depends on #9
The system of claim 9, wherein the instructions further cause the system to: receive a request to read fourth data from the persistent storage device; determine that the fourth data is in the cache; and provide the fourth data from the cache.
- Claim 11Depends on #10
The system of claim 10, wherein the request to read the fourth data comprises a second LBA value, and wherein the instructions further cause the system to determine that the fourth data is in the cache by causing the system to determine that the second LBA value is in a mapping between LBA values and cache lines.
- Claim 12Depends on #9
The system of claim 9, wherein the instructions further cause the system to: mark the second cache line as clean after the third data has been successfully written to the persistent storage device.
- Claim 13Depends on #12
The system of claim 12, wherein the instructions further cause the system to determine that the third data is to be evicted from the cache by causing the system to determine that the cache is below a threshold clean capacity.
- Claim 14Independent Claim
A non-transitory computer readable medium storing instructions which, when executed by one or more processors, cause the one or more processors to perform steps comprising: receiving a request to write first data to a persistent storage device, the request comprising a first logical block addressing (LBA) value; writing the first data to a first cache line of a cache; updating a mapping between the first LBA value and the first cache line; receiving a subsequent request to write second data to the persistent storage device, the subsequent request comprising the first LBA value; determining that the first LBA value exists in the mapping; determining a dirty cache line corresponding to the first LBA value; updating the corresponding dirty cache line to the second data of the subsequent request; pushing the corresponding dirty cache line onto an end of a least recently used (LRU) queue of cache lines, wherein the LRU queue maintains an order in which respective cache lines were written to the LRU queue without retaining an age of each of the cache lines; reporting the second data as having been written to the persistent storage device; determine that third data is to be evicted from the cache; evict the third data from the cache; pop a second cache line from a head of the LRU queue; attempt to write the third data at the second cache line to the persistent storage device; and if the write of the third data at the second cache line to the persistent storage device fails, add the second cache line back to the head of the LRU queue for a re-attempt at eviction.
Technical Overview & Description
CROSS-REFERENCE TO RELATED APPLICATION This application claims priority as a non-provisional of U.S. Provisional Patent Application No. 63/149,841, titled “ CACHE OPERATION FOR A PERSISTENT STORAGE DEVICE ” and filed on Feb. 16, 2021, the disclosure of which is incorporated herein by reference in its entirety. FIELD This relates to cache operation for a persistent storage device. BACKGROUND Data is stored on a persistent storage device, such as a number of drives. When data is to be written, a storage controller receives the write request and causes the data to be written onto the persistent storage device. When data is to be read, the storage controller receives the read request and returns the data. SUMMARY In a first example embodiment, there is provided a method comprising: receiving a request to write data to a persistent storage device; writing the data to a cache line of a cache; pushing the cache line onto the end of a least recently used (LRU) queue of cache lines; and reporting the data as having been written to the persistent storage device. Preferably, the request to write data comprising an LBA value, and the method further comprises: updating a mapping between LBA values and cache lines. Preferably, the method further comprises: determining that the LBA value exists in the mapping; determining a cache line corresponding to the LBA value; and updating the cache line to the data of the request. Preferably, pushing the cache line onto the end of a least recently used (LRU) queue of cache lines comprises: removing the cache line corresponding to the LBA value from the LRU queue; and pushing the cache line corresponding to the LBA value onto the end of the LRU queue. Preferably, the method further comprises: receiving a request to read data from the persistent storage device; determining that the data is in the cache; and providing the data from the cache. Preferably, the request to read data comprises an LBA value, and determining that the data is in the c
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (18)
Non-Patent Literature (5)
- Jul. 12, 2022
- —
- Extended European Search Report
- —
- EP 22156693.8.