Efficient enforcement of command execution order in solid state drives
AssigneeApple Inc.
InventorsEtai Zaltsman, Oren Golov, Ori Moshe Stern, Shai Ojalvo
Life of this patent
Estimating the term…
Abstract
A method in a storage device includes receiving from a host storage commands for execution in a non-volatile memory of the storage device. At least a subset of the storage commands are to be executed in accordance with an order-of-arrival in which the storage commands in the subset are received. The received storage commands are executed in the non-volatile memory in accordance with internal scheduling criteria of the storage device, which permit deviations from the order-of-arrival, but such that execution of the storage commands in the subset reflects the order-of-arrival to the host.
Claims18
A method, comprising:
- storing, in a plurality of queues, by a host, a plurality of storage commands for execution on a non-volatile memory of a storage device, wherein the plurality of storage commands include a respective barrier write command stored to each of the plurality of queues, and wherein at least a subset of the plurality of storage commands is to be executed in accordance with an order-of-arrival in which the subset of the plurality of storage commands is stored;
- reading, by the storage device, respective storage commands of the plurality of storage commands from each of the plurality of queues;
- assigning, by the storage device, a respective sequence number to each of the respective storage commands, wherein the respective sequence number marks each of the respective storage commands in accordance with a corresponding order-of-arrival;
- executing, by the storage device, the respective storage commands in accordance with internal scheduling criteria of the storage device, wherein the internal scheduling criteria permit deviations from the order-of-arrival, and wherein execution of the subset of the plurality of storage commands reflects the order-of-arrival from the host;
- wherein executing the respective storage commands comprises storing, in the non-volatile memory, respective data and the respective sequence number for each of the respective storage commands;
- ceasing reads of additional storage commands from a respective queue in response to reaching the barrier write command in the respective queue;
- and
- resuming reading of the additional storage commands in each queue of the plurality of queues in response to reaching the barrier write command in all of the queues of the plurality of queues.
An apparatus, comprising:
- an interface configured to receive, from a host, a plurality of storage commands for execution on a non-volatile memory, wherein at least a subset of the plurality of storage commands are to be executed in accordance with an order-of-arrival in which the subset of the plurality of storage commands is received;
- a plurality of queues configured to store the received plurality of storage commands, wherein the received plurality of storage commands include a respective barrier write command stored to each queue of the plurality of queues;
- and
- a processor configured to:
- read respective storage commands of the plurality of storage commands from each queue of the plurality of queues;
- assign a respective sequence number to each of the respective storage commands, wherein the respective sequence number marks each of the respective storage commands in accordance with a corresponding order-of-arrival;
- execute the respective storage commands in accordance with internal scheduling criteria, wherein the internal scheduling criteria permit deviations from the order-of-arrival, and wherein execution of the subset of the plurality of storage commands reflects the order-of-arrival from the host;
- store, in the non-volatile memory, respective data and the respective sequence number for each of the respective storage commands in response to the execution of each of the respective storage commands;
- cease reading of additional storage commands from a respective queue in response to reaching the barrier write command in the respective queue;
- and
- resume reading of the additional storage commands in each queue of the plurality of queues in response to reaching the barrier write command in all of the queues of the plurality of queues.
An apparatus, comprising:
- a non-volatile memory;
- and
- a memory controller including a plurality of queues configured to store a plurality of storage commands, wherein the memory controller is configured to:
- receive, from a host, the plurality of storage commands for execution on the non-volatile memory, wherein the plurality of storage commands include a respective barrier write command stored to each queue of the plurality of queues, and wherein at least a subset of the plurality of storage commands is to be executed in accordance with an order-of-arrival in which the subset of the plurality of storage commands is received;
- fetch respective storage commands of the plurality of storage commands from each queue of the plurality of queues;
- assign a respective sequence number to each of the fetched storage commands, wherein the respective sequence number marks each of the fetched storage commands in accordance with a corresponding order-of-arrival;
- execute the fetched storage commands in accordance with internal scheduling criteria, wherein the internal scheduling criteria permit deviations from the order-of-arrival, and wherein execution of the subset of the plurality of storage commands reflects the order-of-arrival from the host;
- store, in the non-volatile memory, respective data and the respective sequence number for each of the fetched storage commands in response to the execution of each of the fetched storage commands;
- halt fetching of the respective storage commands from a respective queue in response to reaching the respective barrier write command in the respective queue;
- and
- resume fetching of the respective storage commands in the respective queue of the plurality of queues in response to reaching the barrier command in all the queues of the plurality of queues.
A system, comprising:
- a host, which is configured to issue a plurality of storage commands;
- a plurality of queues configured to store the plurality of storage commands issued by the host, wherein the plurality of storage commands include a respective barrier write command stored to each queue of the plurality of queues, and wherein at least a subset of the plurality of storage commands are to be executed in accordance with an order-of-arrival in which the subset of the plurality of storage commands are received;
- and
- a storage device including a non-volatile memory, wherein the storage device is configured to:
- read respective storage commands of the plurality of storage commands from each queue of the plurality of queues;
- assign a respective sequence number to each of the respective storage commands, wherein the respective sequence number marks each of the respective storage commands in accordance with a corresponding order-of-arrival;
- execute the respective storage commands in accordance with internal scheduling criteria of the storage device, wherein the internal scheduling criteria permit deviations from the order-of-arrival, and wherein execution of the subset of the plurality of storage commands reflects the order-of-arrival from the host;
- store, in the non-volatile memory, respective data and the respective sequence number for each of the respective storage commands in response to the execution of each of the respective storage commands;
- halt reading of additional storage commands from a respective queue in response to reaching the barrier write command in the respective queue;
- and
- resume reading of the additional storage commands in each queue of the plurality of queues in response to reaching the barrier write command in all the queues of the plurality of queues.
Dependencies are inferred from the claim text.