# US 2008/0307160 A1 · Methods and structure for improved storage system performance with write-back caching for disk drives

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

- Number: US 2008/0307160 A1
- Document ID: US20080307160A1
- Status: Published application
- Kind: A1
- Application number: 12/191,445
- Filed: 2008-08-14
- Published: 2008-12-11
- Earliest claimed: 2004-12-29
- Assignees: LSI Corporation
- Inventors: Donald R. Humlicek
- Web page: https://patentgrep.com/patent/US20080307160A1

## CPC

- G06F 12/0804: with main memory updating (G06F12/0806 takes precedence)
- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0866: for peripheral storage systems, e.g. disk cache
- G06F 2212/1032: Reliability improvement, data loss prevention, degraded operation etc
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and associated structures for utilizing write-back cache management modes for local cache memory of disk drives coupled to a storage controller while maintaining data integrity of the data transferred to the local cache memories of affected disk drives. In one aspect hereof, a state machine model of managing cache blocks in a storage controller cache memory maintains blocks in the storage controller's cache memory in a new state until verification is sensed that the blocks have been successfully stored on the persistent storage media of the affected disk drives. Responsive to failure or other reset of the disk drive, the written cache blocks may be re-written from the copy maintained in the cache memory of the storage controller. In another aspect, an alternate controller's cache memory may also be used to mirror the cache blocks from the primary storage controller's cache memory as additional data integrity assurance.

## Claims

### Claim 1

(canceled)

### Claim 2

(canceled)

### Claim 3

(Canceled)

### Claim 4

(Canceled)

### Claim 5

(canceled)

### Claim 6

In a storage system having a storage controller coupled to a plurality of disk drives wherein the storage controller has a cache memory and wherein each disk drive of the plurality of disk drives has a local cache memory controlled by a local disk controller of each disk drive, a method operable in the storage controller comprising:
receiving a write request having associated write data from an attached host device;
in response to receiving the write request, performing the steps of;
allocating one or more empty blocks of memory in the cache memory of the storage controller to store the write data;
storing the write data in the allocated blocks and;
marking each of the allocated blocks as a dirty block;
determining, subsequent to receipt of the write request, that one or more dirty blocks should be flushed from the cache memory to one or more disk drives of the plurality of disk drives;
in response to the determination to flush the one or more dirty blocks, performing the steps of:
transferring the one or more dirty blocks to the one or more disk drives using a write-back mode of operation with the local cache memory of each of the one or more disk drives; and
marking each of the transferred dirty blocks as a written block;
determining, subsequent to the determination to flush the dirty blocks, that the written blocks should be flushed from the local cache memory of the one or more disk drives;
in response to the determination to flush the written blocks, performing the step of:
forcing the flushing of local cache memory of each of the one or more disk drives;
determining subsequent to the forcing of flushing whether the flushing has succeeded or failed;
in response to the determination that the flushing succeeded, performing the step of:
marking each of the flushed written blocks as a clean block; and
in response to the determination that the flushing failed, performing the step of:
marking each of the flushed written blocks as a dirty block.

### Claim 7 (depends on 6)

The method of claim 6 wherein the storage system includes an alternate controller and wherein in response to receiving the write request, the method further comprises:
mirroring the written blocks in the cache memory of the storage controller to the cache memory of the alternate controller; and
marking the mirrored dirty blocks as mirrored blocks.

### Claim 8 (depends on 7)

The method of claim 7 further comprising:
detecting a reset of the storage controller; and
in response to detecting the reset, performing the steps of:
restoring the contents of the cache memory of the storage controller from the alternate controller; and
marking all blocks marked as mirrored blocks in the restored cache memory as dirty blocks.

### Claim 9

A method of managing cache blocks in the cache memory of a storage controller, the method comprising:
initializing all cache blocks in an EMPTY state;
allocating a cache block in the EMPTY state in response to receipt of a write request from an attached host;
copying write data associated with the write request into the allocated cache block;
transitioning the cache block to a DIRTY state in response to the steps of allocating and copying;
sending the data in the cache block to a disk drive having a local cache memory operating under control of a local disk controller of the disk drive in a write-back cache management mode;
transitioning the cache block to a WRITTEN state in response to the step of sending;
detecting successful synchronization of the content of the local cache memory of the disk drive to persistently store the cache block; and
transitioning the cache block to a CLEAN state in response to the step of detecting successful synchronization.

### Claim 10 (depends on 9)

The method of claim 9 further comprising:
transitioning a cache block presently in the CLEAN state to the EMPTY state.

### Claim 11 (depends on 10)

The method of claim 10 wherein the transition from CLEAN state to EMPTY state is performed periodically.

### Claim 12 (depends on 9)

The method of claim 9 further comprising:
detecting that additional cache blocks in the EMPTY state are required to process a received write request,
wherein the transition from CLEAN state to EMPTY state is performed in response to the detecting of the need for additional cache blocks in the EMPTY state.

### Claim 13 (depends on 9)

The method of claim 9 further comprising:
detecting reset or failure of the disk drive; and
transitioning cache blocks in the WRITTEN state to the DIRTY state in response to detecting reset or failure of the disk drive.
