# US 2021/0173776 A1 · System and method for facilitating data storage with low-latency input/output and persistent data

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

- Number: US 2021/0173776 A1
- Document ID: US20210173776A1
- Status: Published application
- Kind: A1
- Application number: 16/704,923
- Filed: 2019-12-05
- Published: 2021-06-10
- Earliest claimed: 2019-12-05
- Assignees: Alibaba Group Holding Limited
- Applicants: Alibaba Group Holding Limited
- Inventors: Shu Li
- Web page: https://patentgrep.com/patent/US20210173776A1

## CPC

- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 12/0804: with main memory updating (G06F12/0806 takes precedence)
- G06F 3/061: {Improving I/O performance}
- G06F 3/064: {Management of blocks}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 12/0868: Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
- G06F 12/0897: with two or more cache hierarchy levels (with multilevel cache hierarchies G06F12/0811)
- G06F 12/1009: using page tables, e.g. page table structures
- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F 2212/1032: Reliability improvement, data loss prevention, degraded operation etc
- G06F 2212/1044: Space efficiency improvement
- G06F 2212/214: Solid state disk
- G06F 2212/284: being distributed
- G06F 2212/657: Virtual address space management
- G06F 2212/7201: Logical to physical mapping or translation of blocks or pages
- G06F 2212/7203: Temporary buffering, e.g. using volatile buffer or dedicated buffer blocks
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- G06F 2212/7208: Multiple device management, e.g. distributing data over multiple flash devices
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

One embodiment provides a system for facilitating data placement. The system receives a sector of data to be written to a first non-volatile memory and a second non-volatile memory, wherein the first non-volatile memory resides on a first storage device which supports sequential writes, and wherein the second non-volatile memory resides on a second storage device. The system writes the sector and its corresponding logical block address to the first non-volatile memory in a sequential manner. The system writes, at approximately a same time, the sector and its corresponding logical block address to the second non-volatile memory. In response to completing the write to the first non-volatile memory or the second non-volatile memory, the system generates an acknowledgment that the sector is successfully committed for a host from which the sector is received.

## Claims

### Claim 1

A computer-implemented method, comprising:
receiving a sector of data to be written to a first non-volatile memory and a second non-volatile memory,
wherein the first non-volatile memory resides on a first storage device which supports sequential writes, and wherein the second non-volatile memory resides on a second storage device;
writing the sector and its corresponding logical block address to the first non-volatile memory in a sequential manner;
writing, at approximately a same time, the sector and its corresponding logical block address to the second non-volatile memory; and
in response to completing the write to the first non-volatile memory or the second non-volatile memory, generating an acknowledgment that the sector is successfully committed for a host from which the sector is received.

### Claim 2 (depends on 1)

The method of claim 1, wherein subsequent to completing the write to the first non-volatile memory, the method further comprises:
in response to determining that the sector and its corresponding logical block address have been written to the second non-volatile memory, generating a notification that the sector and its corresponding logical block address may be overwritten in the first non-volatile memory.

### Claim 3 (depends on 1)

The method of claim 1, wherein writing the sector and its corresponding logical block address to the first non-volatile memory comprises:
writing the sector and its corresponding logical block address to a first block of a plurality of blocks of the first non-volatile memory, via a first channel of a plurality of channels through which to access the blocks, at a next available physical location of the first block.

### Claim 4 (depends on 1)

The method of claim 1, wherein prior to writing the sector and its corresponding logical block address to the first or the second non-volatile memory, the method further comprises:
in response to determining an insufficient number of free blocks in the first or the second storage device, releasing redundant blocks to make the redundant blocks available for storing data;
in response to determining that a total capacity of a respective storage device is not less than a predetermined watermark, setting the first or the second non-volatile memory to a read-only mode; and
in response to determining that the total capacity of the respective storage device is less than the predetermined watermark, writing the sector and its corresponding logical block address to the first or the second non-volatile memory.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
determining, by the second storage device, a physical block address of the second non-volatile memory at which to write the sector and its corresponding logical block address; and
storing, by the second storage device in a mapping table, a mapping of the logical block address to the physical block address;
wherein writing the sector and its corresponding logical block address to the second non-volatile memory comprises:
writing the sector and its corresponding logical block address to a volatile cache of the second storage device; and
copying the sector and its corresponding logical block address from the volatile cache to the second non-volatile memory at the physical block address.

### Claim 6 (depends on 1)

The method of claim 1, wherein the second storage device does not include a power loss protection module, and wherein the method further comprises:
receiving, by a volatile cache of the second storage device, the sector and its corresponding logical block address;
writing the sector and its corresponding logical block address to the volatile cache; and
in response to determining that the sector is an update to data currently stored in the volatile cache, replacing the currently stored data in the volatile cache with the updated sector.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
accumulating, in a volatile cache of the second storage device, the sector and additional sectors of data to obtain a plurality of sectors;
classifying each of the plurality of sectors based on a frequency of access of a respective sector; and
in response to forming a first page of data with sectors of a same classification, writing the first page to a first block of the second non-volatile memory.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
in response to detecting a condition which triggers a garbage collection, performing the garbage collection on the first page; and
marking the first page as available for storing data.

### Claim 9 (depends on 7)

The method of claim 7, wherein a classification for a respective sector, in an ascending order of frequency of access, comprises one or more of hot, warm, and cold.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
in response to detecting an error with a second sector stored in the second non-volatile memory, wherein the second sector is stored with its corresponding second logical block address, performing an error recovery by:
reading out all data stored in the first non-volatile memory to obtain a plurality of bundles of data, wherein a respective bundle comprises a logical block address and its corresponding sector of data;
scanning the read-out data based on the second logical block address to obtain a bundle which comprises the second sector and its corresponding second logical block address; and
using the second sector from the obtained bundle to perform the error recovery of the second sector stored in the second non-volatile memory.

### Claim 11

A computer system, comprising:
a processor; and
a memory coupled to the processor and storing instructions, which when executed by the processor cause the processor to perform a method, the method comprising:
receiving a sector of data to be written to a first non-volatile memory and a second non-volatile memory,
wherein the first non-volatile memory resides on a first storage device which supports sequential writes, and wherein the second non-volatile memory resides on a second storage device;
writing the sector and its corresponding logical block address to the first non-volatile memory in a sequential manner;
writing, at approximately a same time, the sector and its corresponding logical block address to the second non-volatile memory; and
in response to completing the write to the first non-volatile memory or the second non-volatile memory, generating an acknowledgment that the sector is successfully committed for a host from which the sector is received.

### Claim 12 (depends on 11)

The computer system of claim 11, wherein subsequent to completing the write to the first non-volatile memory, the method further comprises:
in response to determining that the sector and its corresponding logical block address have been written to the second non-volatile memory, generating a notification that the sector and its corresponding logical block address may be overwritten in the first non-volatile memory.

### Claim 13 (depends on 11)

The computer system of claim 11, wherein writing the sector and its corresponding logical block address to the first non-volatile memory comprises:
writing the sector and its corresponding logical block address to a first block of a plurality of blocks of the first non-volatile memory, via a first channel of a plurality of channels through which to access the blocks, at a next available physical location of the first block.

### Claim 14 (depends on 11)

The computer system of claim 11, wherein prior to writing the sector and its corresponding logical block address to the first or the second non-volatile memory, the method further comprises:
in response to determining an insufficient number of free blocks in the first or the second storage device, releasing redundant blocks to make the redundant blocks available for storing data;
in response to determining that a total capacity of a respective storage device is not less than a predetermined watermark, setting the first or the second non-volatile memory to a read-only mode; and
in response to determining that the total capacity of the respective storage device is less than the predetermined watermark, writing the sector and its corresponding logical block address to the first or the second non-volatile memory.

### Claim 15 (depends on 14)

The computer system of claim 14, wherein the method further comprises:
determining, by the second storage device, a physical block address of the second non-volatile memory at which to write the sector and its corresponding logical block address; and
storing, by the second storage device in the mapping table, a mapping of the logical block address to the physical block address;
wherein writing the sector and its corresponding logical block address to the second non-volatile memory comprises:
writing the sector and its corresponding logical block address to a volatile cache of the second storage device; and
copying the sector and its corresponding logical block address from the volatile cache to the second non-volatile memory at the physical block address.

### Claim 16 (depends on 11)

The computer system of claim 11, wherein the second storage device does not include a power loss protection module, and wherein the method further comprises:
receiving, by a volatile cache of the second storage device, the sector and its corresponding logical block address;
writing the sector and its corresponding logical block address to the volatile cache; and
in response to determining that the sector is an update to data currently stored in the volatile cache, replacing the currently stored data in the volatile cache with the updated sector.

### Claim 17 (depends on 11)

The computer system of claim 11, wherein the method further comprises:
accumulating, in a volatile cache of the second storage device, the sector and additional sectors of data to obtain a plurality of sectors;
classifying each of the plurality of sectors based on a frequency of access of a respective sector; and
in response to forming a first page of data with sectors of a same classification, writing the first page to a first block of the second non-volatile memory.

### Claim 18 (depends on 17)

The computer system of claim 17, wherein the method further comprises:
in response to detecting a condition which triggers a garbage collection, performing the garbage collection on the first page; and
marking the first page as available for storing data,
wherein a classification for a respective sector, in an ascending order of frequency of access, comprises one or more of hot, warm, and cold.

### Claim 19 (depends on 11)

The computer system of claim 11, wherein the method further comprises:
in response to detecting an error with a second sector stored in the second non-volatile memory, wherein the second sector is stored with its corresponding second logical block address, performing an error recovery by:
reading out all data stored in the first non-volatile memory to obtain a plurality of bundles of data, wherein a respective bundle comprises a logical block address and its corresponding sector of data;
scanning the read-out data based on the second logical block address to obtain a bundle which comprises the second sector and its corresponding second logical block address; and
using the second sector from the obtained bundle to perform the error recovery of the second sector stored in the second non-volatile memory.

### Claim 20

An apparatus, comprising:
a first storage device with a first non-volatile memory, wherein the first storage device supports sequential writes; and
a second storage device with a second non-volatile memory;
wherein the apparatus is configured to receive a sector of data to be written to the first non-volatile memory and the second non-volatile memory;
wherein the first storage device is configured to write the sector and its corresponding logical block address to the first non-volatile memory in a sequential manner;
wherein the second storage device is configured to write, at approximately a same time, the sector and its corresponding logical block address to the second non-volatile memory; and
wherein in response to completing the write to the first non-volatile memory or the second non-volatile memory, the apparatus is configured to generate an acknowledgment that the sector is successfully committed for a host from which the sector is received.
