# US 2018/0321987 A1 · System and method for speculative execution of commands using the controller memory buffer

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

- Number: US 2018/0321987 A1
- Document ID: US20180321987A1
- Status: Published application
- Kind: A1
- Application number: 15/585,827
- Filed: 2017-05-03
- Published: 2018-11-08
- Earliest claimed: 2017-05-03
- Assignees: Western Digital Technologies, Inc.
- Applicants: Western Digital Technologies, Inc.
- Inventors: Shay Benisty
- Web page: https://patentgrep.com/patent/US20180321987A1

## CPC

- G06F 9/528: {by using speculative mechanisms}
- G06F 3/061: {Improving I/O performance}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems and methods for speculative execution of commands using the controller memory buffer are disclosed. NVM Express (NVMe) implements a paired submission queue and completion queue mechanism, with host software on the host device placing commands into the submission queue and thereafter notifying the memory device of the commands on the submission queue. The submission queue may be resident in the memory device, such as in controller buffer memory. Prior to notice by the host device, the memory device may determine that the commands are placed in the submission queue and may speculatively execute the commands.

## Claims

### Claim 1

A method comprising:
prior to a host device notifying a memory device that a command is posted to a submission queue, the memory device:
reading the command from the submission queue; and
processing the command;
determining whether the host device has notified the memory device that the command is posted to the submission queue; and
in response to determining that the host device has notified the memory device that the command is posted to the submission queue, notifying the host device of completion of the command via a completion queue.

### Claim 2 (depends on 1)

The method of claim 1, further comprising determining whether the host device has overridden the command posted to the submission queue.

### Claim 3 (depends on 2)

The method of claim 2, further comprising, in response to determining that the host device has overridden the command posted to the submission queue, canceling processing of the command.

### Claim 4 (depends on 1)

The method of claim 1, wherein:
the command comprises a read command; and
processing the command prior to the host device notifying the memory device that the command is posted to the submission queue comprises reading data from non-volatile memory and storing the read data in volatile memory.

### Claim 5 (depends on 4)

The method of claim 4, wherein processing the command further comprises error correcting the read data.

### Claim 6 (depends on 1)

The method of claim 1, wherein:
the command comprises a flush command indicative to the memory device to flush internal caches to non-volatile memory; and
processing the command prior to the host device notifying the memory device that the command is posted to the submission queue comprises writing at least a part of data in the internal caches to non-volatile memory.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
determining that the host device has overridden the flush command; and
in response to determining that the host device has overridden the flush command, canceling writing of the at least a part of the data in the internal caches to the non-volatile memory.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
after reading the command from the submission queue, determining whether to begin processing the command prior to the host device notifying the memory device that the command is posted to the submission queue;
in response to determining to begin processing the command prior to the host device notifying the memory device that the command is posted to the submission queue, processing the command prior to the host device notifying the memory device that the command is posted to the submission queue; and
in response to determining not to begin processing the command prior to the host device notifying the memory device that the command is posted to the submission queue, waiting until the host device notifies the memory device that the command is posted to the submission queue to begin processing the command.

### Claim 9 (depends on 8)

The method of claim 8, wherein determining whether to begin processing the command prior to the host device notifying the memory device that the command is posted to the submission queue is based on a type of command.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
in response to determining that the type of command is a read command, determining to begin processing the command prior to the host device notifying the memory device that the command is posted to the submission queue; and
in response to determining that the type of command is a write command, determining to wait to begin processing the command until the host device notifies the memory device that the command is posted to the submission queue.

### Claim 11

A non-volatile memory device comprising:
a non-volatile memory;
a communication interface configured to communicate with a host device in order for the host device to cause one or more commands to be stored in a submission queue; and
a controller in communication with the non-volatile memory and the communication interface, the controller configured to:
prior to the host device notifying that the one or more commands are stored in the submission queue:
read the one or more commands;
determine an operation internal to the memory device to perform in order to process the one or more commands; and
at least partly perform the operation internal to the memory device; and
after the host device notifies that the one or more commands are stored in the submission queue:
determine an operation external to the memory device to perform in order to process the one or more commands; and
perform the operation external to the memory device.

### Claim 12 (depends on 11)

The non-volatile memory device of claim 11, wherein:
the one or more commands comprise read commands; and
the operation internal to the memory device comprises reading data from the non-volatile memory.

### Claim 13 (depends on 11)

The non-volatile memory device of claim 11, further comprising a controller memory buffer configured to store the submission queue;
wherein the controller is further configured to:
determine, prior to the host device notifying that the one or more commands are stored in the submission queue, that the host device has stored the one or more commands in the submission queue in the controller memory buffer; and
responsive to the controller determining that the host device has stored the one or more commands in the submission queue in the controller memory buffer, read the one or more commands from the submission queue in the controller memory buffer and at least partly perform the operation internal to the memory device.

### Claim 14 (depends on 11)

The non-volatile memory device of claim 11, wherein the operation external to the memory device comprises communicating, via the communication interface, with the host device.

### Claim 15 (depends on 14)

The non-volatile memory device of claim 14, wherein the operation external to the memory device comprises sending a transmission layer packet read request to read a section of host memory.

### Claim 16 (depends on 14)

The non-volatile memory device of claim 14, wherein the operation external to the memory device comprises sending a transmission layer packet write request to write to a section of host memory.

### Claim 17

A non-volatile memory system comprising:
a non-volatile memory:
a communication interface configured to communicate with a host device in order for the host device to cause one or more commands to be stored in a submission queue;
means for determining, prior to the host device notifying that the one or more commands are stored in the submission queue, that the one or more commands are stored in the submission queue;
means for determining whether to speculatively process the one or more commands stored in the submission queue; and
responsive to determining to speculatively process the one or more commands stored in the submission queue, means for speculatively processing the one or more commands.

### Claim 18 (depends on 17)

The memory system of claim 17, wherein the means for determining whether to speculatively process the one or more commands stored in the submission queue is based on a type of the command.

### Claim 19 (depends on 17)

The memory system of claim 17, wherein the means for determining whether to speculatively process the one or more commands stored in the submission queue is based on whether the command is a read command or a write command.

### Claim 20 (depends on 17)

The memory system of claim 17, further comprising:
means for determining that the host device has overridden a command posted to the submission queue; and
in response to determining that the host device has overridden the command posted to the submission queue, means for cancelling speculative processing of the command.
