# US 2013/0254457 A1 · Methods and structure for rapid offloading of cached data in a volatile cache memory of a storage controller to a nonvolatile memory

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2013/0254457 A1
- Document ID: US20130254457A1
- Status: Published application
- Kind: A1
- Application number: 13/425,698
- Filed: 2012-03-21
- Published: 2013-09-26
- Earliest claimed: 2012-03-21
- Assignees: LSI Corporation
- Inventors: Atul Mukker; James A. Rizzo; Moby J. Abraham
- Web page: https://patentgrep.com/patent/US20130254457A1

## CPC

- G06F 11/1441: {Resetting or repowering}
- G06F 11/1064: {in cache or content addressable memories}
- G06F 12/0868: Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
- G06F 2212/1032: Reliability improvement, data loss prevention, degraded operation etc
- G06F 2212/312: In storage controller
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and structure for rapid offloading of cached data in a volatile cache memory of a storage controller to a nonvolatile memory. Features and aspects hereof provide an enhanced storage controller having a volatile cache memory and multiple communication channels each coupled with a corresponding nonvolatile memory device. Responsive to detecting an impending loss of power, control logic of the controller copies data from the volatile cache memory to the multiple nonvolatile memories using the multiple communication channels operating substantially in parallel. Using multiple parallel channels and nonvolatile memory substantially temporally overlapping their operations assures that the cached data can be saved to nonvolatile memory before the controller is inoperable due to power loss. A simple “file system” and error detection and correction codes on the nonvolatile memory help assure that the saved data is valid for return to the volatile memory when power is restored to the controller.

## Claims

### Claim 1

A storage controller comprising:
a cache memory;
control logic coupled with the cache memory and adapted to couple with one or more storage devices, the control logic adapted to process I/O write requests received from an attached host system by storing write data associated with the write I/O request in the cache memory;
a first flash memory device;
a first communication channel coupling the first flash device with the control logic;
a second flash memory device; and
a second communication channel coupling the second flash device with the control logic;
wherein the control logic is further adapted to detect impending loss of power to the storage controller,
wherein the control logic is further adapted, responsive to detecting the impending loss of power, to copy a first portion of data in the cache memory to the first flash memory device through the first communication channel and to copy a second portion of the write data in the cache memory to the second flash memory device through the second communication channel wherein communications through the first and second communication channels substantially overlap temporally.

### Claim 2 (depends on 1)

The controller of claim 1
wherein the first flash memory device further comprises a first block I/O controller for writing the first portion as one or more blocks of data on the first flash memory device, and
wherein the second flash memory device further comprises a second block I/O controller for writing the second portion as one or more blocks of data on the second flash memory device.

### Claim 3 (depends on 1)

The controller of claim 1 further comprising:
a first staging buffer memory coupled with the control logic; and
a second staging buffer memory coupled with the control logic,
wherein the control logic is further adapted to copy the first portion by copying the first portion to the first staging buffer memory and then copying the data in the first staging buffer memory to the first flash memory device,
wherein the control logic is further adapted to copy the second portion by copying the second portion to the second staging buffer memory and then copying the data in the second staging buffer memory to the second flash memory device.

### Claim 4 (depends on 3)

The controller of claim 3
wherein the control logic is further operable to store a first header block in the first staging buffer memory to be copied to the first flash memory device wherein the first header block comprises a number of blocks of cached data that comprise the first portion, and
wherein the control logic is further operable to store a second header block in the second staging buffer memory to be copied to the second flash memory device wherein the second header block comprises a number of blocks of cached data that comprise the second portion.

### Claim 5 (depends on 4)

The controller of claim 4
wherein the control logic is further operable to store a duplicate copy of the first header block in the first staging buffer memory to be copied to the first flash memory device, and
wherein the control logic is further operable to store a duplicate copy of the second header block in the second staging buffer memory to be copied to the second flash memory device.

### Claim 6 (depends on 5)

The controller of claim 5
wherein the control logic is adapted to add an error detection and correction code value to each block of cached data that comprises the first portion and to each block of cached data that comprises the second portion and to the first header and to the second header and to the duplicate copy of the first header and to the duplicate copy of the second header.

### Claim 7 (depends on 6)

The controller of claim 6
wherein the error detection and correction code value is a small computer systems interface (SCSI) data integrity field (DIF) value.

### Claim 8 (depends on 1)

The controller of claim 1
wherein the first and second communication channels are each universal serial bus (USB) communication channels.

### Claim 9 (depends on 1)

The controller of claim 1
wherein the control logic is further adapted to detect restoration of power to the storage controller, and
wherein the control logic is further adapted, responsive to detecting the restoration of power, to restore the first portion from the first flash memory device to the cache memory and to restore the second portion from the second flash memory device to the cache memory.

### Claim 10

A method operable in a storage controller having a cache memory used by the controller to store write data associated with write requests received by the controller from an attached host, the method comprising:
detecting an impending power loss to the controller;
responsive to detecting the impending power loss, performing the additional steps of:
copying a first portion of data in the cache memory to a first flash memory device through a first communication channel coupling the controller with the first flash memory device;
copying a second portion of data in the cache memory to a second flash memory device through a second communication channel coupling the controller with the second flash memory device wherein the copying of the first portion and the copying of the second portion substantially overlap temporally.

### Claim 11 (depends on 10)

The method of claim 10 wherein the storage controller further comprises a first staging buffer memory and a second staging buffer memory,
wherein the step of copying the first portion further comprises copying the first portion to the first staging buffer memory and then copying the first staging buffer memory to the first flash memory device, and
wherein the step of copying the second portion further comprises copying the second portion to the second staging buffer memory and then copying the second staging buffer memory to the second flash memory device.

### Claim 12 (depends on 11)

The method of claim 11
wherein the step of copying the first portion further comprises storing a first header block in the first staging buffer memory and then adding the first portion to the first staging buffer memory, wherein the first header block comprises a number of blocks of cached data that comprise the first portion, and
wherein the step of copying the second portion further comprises storing a second header block in the second staging buffer memory and then adding the second portion to the second staging buffer memory, wherein the second header block comprises a number of blocks of cached data that comprise the second portion.

### Claim 13 (depends on 12)

The method of claim 12
wherein the step of copying the first portion further comprises storing a duplicate copy of the first header block in the first staging buffer memory, and
wherein the step of copying the second portion further comprises storing a duplicate copy of the second header block in the second staging buffer memory.

### Claim 14 (depends on 12)

The method of claim 12
wherein the first header block further comprises an error detection and correction code value,
wherein the second header block further comprises an error detection and correction code value,
wherein the step of copying the first portion further comprises adding an error detection and correction code value to each block of cached data in the first staging buffer memory, and
wherein the step of copying the second portion further comprises adding an error detection and correction code value to each block of cached data in the second staging buffer memory.

### Claim 15 (depends on 14)

The method of claim 14
wherein the error detection and correction code value is a small computer systems interface (SCSI) data integrity field (DIF) value.

### Claim 16 (depends on 10)

The method of claim 10
wherein the first and second communication channels are each universal serial bus (USB) communication channels.

### Claim 17 (depends on 10)

The method of claim 10 further comprising:
detecting restoration of power to the storage controller, and
responsive to detecting the restoration of power, restoring the first portion from the first flash memory device to the cache memory and to restoring the second portion from the second flash memory device to the cache memory.

### Claim 18

A method operable in a storage controller having a cache memory used by the controller to store write data associated with write requests received by the controller from an attached host, the controller further having multiple staging buffer memories each communicatively coupled with a corresponding flash memory device through a corresponding communication channel, the method comprising:
detecting an impending power loss to the controller;
responsive to detecting the impending power loss, performing the additional steps of:
identifying all dirty data presently in the cache memory;
dividing the identified dirty data into multiple segments each segment comprising a substantially similar number of blocks of dirty data, each segment associated with a corresponding staging buffer memory of the multiple staging buffer memories;
for each segment, performing the additional steps of:
storing a header block in the corresponding staging buffer memory, the header block comprising indicia of the number of blocks of dirty data in the segment that follow the header block;
for each block of dirty data in the segment, performing the steps of:
generating an error detection and correction code value corresponding with the block of dirty data; and
appending the block of dirty data and the error detection and correction code value to the staging buffer memory; and
copying the staging buffer memory to the corresponding flash memory device through the corresponding communication channel,
wherein processing of the multiple segments substantially overlaps temporally.
