# US 12,222,859 B2 · Write data cache method and system, device, and storage medium

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

- Number: US 12,222,859 B2
- Document ID: US12222859B2
- Status: Granted
- Kind: B2
- Application number: 18/565,053
- Filed: 2022-05-26
- Published: 2024-08-08
- Granted: 2025-02-11
- Earliest claimed: 2021-12-09
- Assignees: Suzhou Metabrain Intelligent Technology Co., Ltd.
- Applicants: Suzhou Metabrain Intelligent Technology Co., Ltd.
- Inventors: Jiang Wang; Shuqing Li; Huajin Sun
- Web page: https://patentgrep.com/patent/US12222859B2

## CPC

- G06F 12/0804: with main memory updating (G06F12/0806 takes precedence)
- G06F 12/0868: Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
- G06F 3/0611: {in relation to response time}
- G06F 3/0656: {Data buffering arrangements}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 12/0871: Allocation or management of cache space
- G06F 12/023: {Free address space management}
- G06F 13/28: using burst mode transfer, e.g. direct memory access {DMA}, cycle steal (G06F13/32 takes precedence)
- G06F 2212/1008: Correctness of operation, e.g. memory ordering
- G06F 2212/1024: Latency reduction
- G06F 2212/313: In storage device
- G06F 2212/603: of operating mode, e.g. cache mode or local memory mode
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and system for high-speed caching of data writing, a device and a storage medium. The method includes: in response to receiving a data-writing operating instruction emitted by a host, creating a controlling page table and filling sequentially a plurality of control blocks into the controlling page table; submitting an entry pointer of a first instance of the control blocks to a work-queue scheduling engine, to execute tasks corresponding to the plurality of control blocks alternately in the work-queue scheduling engine; sending in advance a completion response to the host and notifying a firmware to perform subsequent processing and falling-into-disk of data; and in response to ending of execution of a task corresponding to a last one instance of the control blocks, releasing a used resource of the controlling page table.

## Claims

### Claim 1

A method for high-speed caching of data writing, wherein the method comprises:
in response to receiving a data-writing operating instruction sent by a host, creating a controlling page table and filling a plurality of control data blocks into the controlling page table sequentially;
submitting an entry pointer of a first instance of the plurality of control data blocks to a work-queue scheduling engine, to execute tasks corresponding to the plurality of control data blocks alternately in the work-queue scheduling engine;
sending a completion response to the host in advance and notifying a firmware to perform subsequent processing and falling-into-disk of data; and
in response to the completion of execution of a task corresponding to a last one instance of the plurality of control data blocks, releasing a used resource of the controlling page table.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the step of, creating the controlling page table and filling the plurality of control data blocks into the controlling page table sequentially comprises:
filling a first control data block into the controlling page table, to provide an internal-memory region in a local double-speed synchronous dynamic random access memory;
filling a second control data block into the controlling page table, to migrate to-be-written data in a host double-speed synchronous dynamic random access memory into the internal-memory region; and
filling a third control data block into the controlling page table, to respond to the host and end a current inputting-outputting.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the method further comprises:
performing powering-down protection to written data within the internal-memory region in the local double-speed synchronous dynamic random access memory.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the method further comprises:
in response to a space of the controlling page table being insufficient, applying for a new controlling-page-table space to create a new controlling page table, and initializing the new controlling page table and the original controlling page table into a chain controlling page table.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the method further comprises:
in response to receiving a read-data operating instruction sent by the host, creating a blank controlling page table and backing up the read-data operating instruction into the blank controlling page table.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the method further comprises:
setting up a continuous storage space in an on-chip storage to be used as a resource pool of controlling page tables, and initializing an address pointer of each of the controlling page tables into an idle-controlling-page-table-entry list.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the method further comprises:
determining whether counting of the controlling page tables that already applied for by the firmware is smaller than a threshold; and
in response to the counting of the controlling page tables that already applied for by the firmware being smaller than the threshold, adding one to the counting of the controlling page tables that already applied for by the firmware controlling page table, and subtracting one from counting of the controlling page tables that already applied for by an interface-managing-engine of the host.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the last one instance of the plurality of control data blocks refers to a last control data block of a step required by a subsequent operation after the firmware takes over.

### Claim 9

A computer device, wherein the computer device comprises a memory and one or more processors, the memory stores a computer-readable instruction, and the computer-readable instruction, when executed by the one or more processors, causes the one or more processors to implement operations comprising:
in response to receiving a data-writing operating instruction sent by a host, creating a controlling page table and filling a plurality of control data blocks into the controlling page table sequentially;
submitting an entry pointer of a first instance of the plurality of control data blocks to a work-queue scheduling engine, to execute tasks corresponding to the plurality of control data blocks alternately in the work-queue scheduling engine;
sending a completion response to the host in advance and notifying a firmware to perform subsequent processing and falling-into-disk of data; and
in response to the completion of execution of a task corresponding to a last one instance of the plurality of control data blocks, releasing a used resource of the controlling page table.

### Claim 10

One or more non-transitory computer-readable storage mediums storing a computer-readable instruction, wherein the computer-readable instruction, when executed by one or more processors, causes the one or more processors to implement operations comprising:
in response to receiving a data-writing operating instruction sent by a host, creating a controlling page table and filling a plurality of control data blocks into the controlling page table sequentially;
submitting an entry pointer of a first instance of the plurality of control data blocks to a work-queue scheduling engine, to execute tasks corresponding to the plurality of control data blocks alternately in the work-queue scheduling engine;
sending a completion response to the host in advance and notifying a firmware to perform subsequent processing and falling-into-disk of data; and
in response to the completion of execution of a task corresponding to a last one instance of the plurality of control data blocks, releasing a used resource of the controlling page table.

### Claim 11 (depends on 6)

The method according to claim 6, wherein granularities of the controlling page tables in a single resource pool are consistent.

### Claim 12 (depends on 6)

The method according to claim 6, wherein the resource pool is managed by using a consistent hardware logic.

### Claim 13 (depends on 6)

The method according to claim 6, wherein both a head pointer and a tail pointer of the idle-controlling-page-table-entry list are managed by hardware.

### Claim 14 (depends on 13)

The method according to claim 13, wherein when controlling page table (CP) resource is applied, from the head pointer, a CP entry address is read and already-applied-for counting values of the Acceleration Engine Manager (AEM) and the firmware are updated.

### Claim 15 (depends on 14)

The method according to claim 14, wherein in the releasing of the CP resource, from the tail pointer, a to-be-released CP entry address is stored and the already-applied-for counting values of the AEM and the firmware are updated.

### Claim 16 (depends on 15)

The method according to claim 15, wherein CP applying and CP releasing of the AEM are operated directly by using a hardware logic.

### Claim 17 (depends on 15)

The method according to claim 15, wherein CP applying and CP releasing of the firmware are completed by accessing a CP applying register and a CP releasing register.

### Claim 18 (depends on 15)

The method according to claim 15, wherein the method further comprises:
in the CP applying, by the firmware, directly reading the CP applying register, and, from a flag bit of read content, determining whether it is an effective CP entry address; and
in the CP releasing, directly writing, by the firmware, the entry address of the to-be-released CP into the CP releasing register, and writing, by the hardware logic, the to-be-released CP into the “idle-CP-entry list”.

### Claim 19 (depends on 7)

The method according to claim 7, wherein when the counting of the controlling page tables that already applied for by the firmware is equal to the threshold, the applying of the current time fails.

### Claim 20 (depends on 1)

The method according to claim 1, wherein a size of the controlling page table is 512 bytes, 1024 bytes or 2048 bytes.
