An abort function for storage devices sets a “poison bit” flag in the command to be deleted while the command resides on a submission queue prior to being fetched by the SSD controller. In response to the set “poison bit” flag, a storage device controller aborts execution of the i/O command and returns an abort successful status reply to the completion queue.
|
17. A storage device comprising:
memory configured to store data;
a controller configured to access the stored data based on input/output (i/O) commands, wherein the controller is further configured to detect a status of a “poison bit” flag in the i/O commands and return a result indicating the i/O command has been aborted if the “poison bit” flag is set.
14. A method of operating a device driver on a host side of an interface system, the method comprising:
receiving an input/output (i/O) command from the host computer system;
placing the i/O command on an i/O submission queue;
receiving an abort command from the host computer system;
locating the i/O command within the i/O submission queue; and
setting a “poison bit” flag within the command to be aborted.
16. A computer readable medium that stores instructions for implementing a device driver, wherein execution of the stored instructions by a processor implements a method for accessing a storage device, the method comprising:
receiving an input/output (i/O) command from the host computer system;
placing the i/O command on an i/O submission queue;
receiving an abort command from the host computer system;
locating the i/O command within the i/O submission queue; and
setting a “poison bit” flag within the command to be aborted.
1. A method of executing an abort command in a system including a host communicating with a storage device, the method comprising:
storing an input/output (i/O) command in an i/O submission queue located in system memory;
receiving an abort command with respect to the i/O command placed on the i/O submission queue;
setting a “poison bit” flag within the i/O command placed on the i/O submission queue indicating that the i/O command should be aborted;
fetching, by a storage device controller included as part of the storage device, the i/O command from the i/O submission queue;
aborting execution of the i/O command in response to the bit indicating the i/O command should be aborted; and
returning a result indicating the abort was successful to an i/O completion queue located in the system memory.
4. A host computer system that interacts with a storage device, the host computer system comprising:
an input/output (i/O) submission queue, implemented in system memory, that stores i/O commands to be fetched by a storage device controller in the storage device;
an i/O completion queue, implemented in the system memory, that stores results provided by the storage device controller indicating execution of a i/O command; and
a device driver, executed by a processor in the host computer system, that places i/O commands onto the i/O submission queue and reads results provided onto the i/O completion queue, wherein in response to an abort command issued by the host computer system, the device driver locates the command to be aborted within the i/O submission queue and sets an “poison bit” flag in the i/O command.
8. A computer system comprising:
a host computer system having a processor and system memory, the host computer system comprising:
an input/output (i/O) submission queue implemented in the system memory;
an i/O completion queue implemented in the system memory; and
a device driver, executed by a processor in the host computer system, that places i/O commands onto the i/O submission queue and reads results provided onto the i/O completion queue, wherein in response to an abort command issued by the host computer system, the device driver locates the i/O command to be aborted within the i/O submission queue and sets a “poison bit” flag in the i/O command; and
a storage device that includes a storage device controller that implements an internal queue for storing i/O commands fetched from the i/O submission queue awaiting execution, wherein the storage device controller fetches i/O commands from the i/O submission queue and places them into the internal queue if the “poison bit” flag is not set, wherein the storage device controller provides an abort successful result to the i/O completion queue if the “poison bit” flag is set.
2. The method of
providing the abort command to an administrative submission queue;
fetching, by the storage device controller, the abort command from the administrative submission queue;
checking an internal queue maintained by the storage device controller for the i/O command to be aborted and aborting execution of the i/O command if located; and
returning a result indicating the abort was successful to an administrative completion queue located in the system memory.
3. The method of
5. The host computer system of
6. The host computer system of
a controller management module having an administrative submission queue and an administrative completion queue, wherein in response to an abort command the device driver provides the controller management module with the abort command for placement onto the administrative submission queue to be fetched by the storage device controller.
9. The computer system of
10. The computer system of
11. The computer system of
a controller management module having an administrative submission queue and an administrative completion queue, wherein in response to the abort command issued by the computer system the device driver provides the abort command to the controller management module for placement onto the administrative submission queue to be fetched by the storage device controller.
12. The computer system of
15. The method of
18. The storage device of
19. The storage device of
20. The storage device of
|
This disclosure relates to computer systems and in particular to computer systems utilizing storage devices.
As central processing units (CPUs) continue to get faster, the memory units that supply the data to the CPUs must continually get faster as well. In a typical computer system, a variety of different memory devices are employed to meet the needs of a particular application, wherein each memory device provides a trade-off in storage capacity, cost and response time. System performance is maximized by utilizing the devices in a hierarchy arrangement, utilizing both extremely fast, but low-capacity memory devices in combination with slower, higher capacity memory devices. The memory hierarchy would include both on-chip memory devices (e.g., processor registers, caches, etc.) as well as off-chip memory devices (e.g., main memory devices and disk storage). For example, a computer system may employ a hard disk drive (HDD) as the disk storage device and a dynamic random access memory (DRAM) as the main memory. The hard disk drive provides cheaper storage (i.e., cost/GB), and higher capacity, but slower response time. In contrast, the DRAM device provides faster response time, but at higher cost and lower capacity.
In recent years, non-volatile memory (NVM) devices in the form of solid-state drives have been employed as a complementary type of disk storage, used either instead of or in conjunction with a HDD. The NVM devices provide faster response time than a typical HDD, but at a slightly higher cost per gigabyte (GB). Both are located “off-board”, and therefore communicate with the CPU via a data bus. As such, HDD and NVM devices are often referred to as an “Input/Output (I/O) Memory Tier”, because they require input/output operations to communicate with the CPU.
Although a variety of data buses are available to provide communication between CPUs and SSD devices, the peripheral component interconnect express (PCIe) type data bus has emerged as a good candidate because of the throughput (e.g., 16 GB/s plus) capable of being provided. A communication interface known as NVM express (NVMe) has been proposed to enable host computer systems to communicate with SSD devices via a PCIe (or equivalent) bus. The interface provides an optimized command issue and completion path. Included in the NVMe interface is an “abort” command that allows commands issued by the host system to be aborted, rather than executed. However, issuance of the abort command according to the NVMe standard only addresses a small sub-set of possible scenarios. It would therefore be beneficial to develop an abort command that operates within the framework of the NVMe standard, but is applicable to a wider range of possible scenarios.
Described herein is a method of executing an abort command in a system including a host communicating with a storage device. The method includes storing a input/output (I/O) command in an I/O submission queue located in system memory. In response to an abort command being received with respect to I/O command placed on the I/O submission queue, a “poison bit” within the I/O command is set, indicating that the I/O command should be aborted. Subsequently, the I/O command is fetched by a storage device controller included as part of the storage device. The storage device controller detects the set “poison bit” within the I/O command and in response stops execution of the I/O command. The storage device controller returns a result to an I/O completion queue located in system memory indicating the abort was successful.
Described herein is a host computer system that interacts with a storage device. The host computer system includes an an input/output (I/O) submission queue, implemented in system memory, that stores I/O commands to be fetched by a storage device controller in the storage device. The host computer system further includes an I/O completion queue, implemented in the system memory, that stores results provided by the storage device controller indicating execution of a I/O command. The host computer system also includes a device driver, executed by a processor in the host computer system, that places I/O commands onto the I/O submission queue and reads results provided onto the I/O completion queue. In response to an abort command issued by the host computer system, the device driver locates the command to be aborted within the I/O submission queue and sets an “poison bit” flag in the I/O command.
Described herein is computer system that includes an input/output (I/O) submission queue, an I/O completion queue, a device driver, and a storage device. The I/O submission queue and the I/O completion queue are implemented in system memory. The device driver, executed by a processor in the host computer system, places I/O commands onto the I/O submission queue and reads results provided onto the I/O completion queue. In response to an abort command issued by the host computer system, the device driver locates the I/O command to be aborted within the I/O submission queue and sets a “poison bit” flag in the I/O command. The storage device includes a storage device controller that implements an internal queue for storing I/O commands fetched from the I/O submission queue awaiting execution. The storage device controller fetches I/O commands from the I/O submission queue and places them into the internal queue if the “poison bit” flag is not set, wherein the storage device controller provides an abort successful result to the I/O completion queue if the “poison bit” flag is set.
Described herein is a method of operating a device driver on a host side of a non-volatile memory express (NVMe) interface system. The method includes receiving an input/output (I/O) command from the host computer system, and placing the received I/O command on an I/O submission queue. In response to an abort command received from the host computer system, the method includes locating the I/O command within the I/O submission queue and setting a “poison bit” flag within the command to be aborted.
Described herein is a computer readable medium that stores instructions for implementing a device driver, wherein execution of the stored instructions by a processor implements a method for accessing a storage device. The method implemented includes receiving an input/output (I/O) command from the host computer system, and placing the received I/O command on an I/O submission queue. In response to an abort command received from the host computer system, the method includes locating the I/O command within the I/O submission queue and setting a “poison bit” flag within the command to be aborted.
The present invention provides a method of aborting commands within the NVMe communication standard. In particular, the present invention allows a device driver associated with the host system to access a submission queue storing the command to be aborted, and write a “poison” bit that indicates to the controller that the command should be aborted rather than executed. In this way, execution of the abort function is provided within the command issue and completion path, rather than external to it.
In the embodiment shown in
SSD drive 14 includes SSD controller 40 and non-volatile memory (NVM) 42. For example, NVM 42 may be implemented with NAND-type non-volatile memory. In addition, SSD controller 40 includes a plurality of internal execution queues 40a-40n, wherein ‘n’ represents any number of queues up to an allowed maximum.
With respect to
At step 50, the I/O operation between host 12 and SSD 14 is initiated by placing an I/O command on I/O submission queue 30. For example, the command may be a read command or a write command, and may specify the memory location associated with SSD 14 to be read or written to. In addition, at this step device driver 28 provides an indication to SSD controller 40 that I/O submission queue 30 has a command ready to be fetched (referred to as a “doorbell ringer”). In one embodiment, I/O submission queue 30 is a circular buffer maintained by a head pointer and a tail pointer (neither of which is shown). Commands fetched from I/O submission queue 30 are fetched in the order they are placed in the queue. However, SSD controller 40 may change the order in which the commands are executed.
At step 52, SSD controller 40 fetches the I/O command from I/O submission queue 30. At step 54, SSD controller 40 stores the fetched command in one of the internal queues 40a-40n. At step 56, SSD controller 40 executes the I/O command from one of the stored internal queues 40a-40n. At step 57, having completed execution of the I/O command, SSD controller 40 returns a result to I/O completion queue 32. For example, the result may indicate whether the command was executed successfully or not. At step 58, first partition 24 fetches the result from I/O completion queue 32 and reads the results.
At step 60, an administrative abort command is generated by first partition 24 with respect to an I/O command placed on I/O submission queue 30 (shown at step 50). The administrative abort command is generated at some point between placement of an I/O command on submission queue 30 and fetching a result from I/O completion queue 32 at step 58.
At step 62, in response to the administrative abort command generated by first partition 24, controller management module 18 places the administrative abort command on administration submission queue 20 within controller management module 18. At step 64, SSD controller 40 fetches the administrative abort command from administration submission queue 20. At step 66, SSD controller 40 checks internal queues 40a-40n for the I/O command to be aborted. If the I/O command is located within one of the internal queues 40a-40n, SSD controller 40 determines whether it is practical to stop execution of the command. In some instances, execution of the I/O command may already have been initiated, and it may be better to allow the I/O command to complete execution. In other embodiments, SSD controller 40 may determine that the command may be safely aborted, at which point the command is removed from the respective internal queue. At step 68, SSD controller 40 returns a result to administrative completion queue 32 indicating whether the abort command was successful or not. At step 70, controller management module 18 fetches the result from administration completion queue 32 and reads the fetched result. At step 72, controller management module 18 returns the abort result to the device driver within the first partition 24 as a response to abort command 60. If the abort is unsuccessful and the command is executed, then results of the executed command would be returned to I/O submission queue 30 as discussed at step 58. If the abort is successful, SSD controller 40 places a result into the I/O completion queue that indicates the command was aborted. This insures that for every command fetched from I/O submission queue 30, a result is placed onto I/O completion queue 32 even if that result indicates the command was aborted.
As illustrated in
In a first case, the administrative abort command is placed on the administrative submission queue and fetched by SSD controller 40 prior to fetching of the I/O command from I/O submission queue 30. In this case, the administrative abort command is executed while the I/O command remains stored in I/O submission queue 30 (i.e., prior to fetching by SSD controller 40 and placement in internal queues 40a-40n). As a result, SSD controller 40 responds to the administrative abort command by indicating that the abort function has failed. Subsequently, when the I/O command is fetched, SSD controller 40 executes the command normally.
In a second case, SSD controller 40 fetches the administrative abort command from administrative submission queue 20 while the I/O command is residing within one of the internal queues 40a-40n. In this instance, SSD controller 40 checks internal queues 40a-40n for the I/O command to be aborted and finds the command. In response, the I/O command is in fact aborted and SSD controller 40 provides a status to administrative completion queue 22 indicating that the abort was successful.
In a third case, SSD controller 40 fetches the administrative abort command from administrative submission queue 20 while the I/O command is being executed from one of the internal queues 40a-40n. In this instance, SSD controller 40 allows the I/O command to continue executing, and returns a result to administrative completion queue 32 at step 68 indicating that the abort command failed at step 68.
As illustrated by these examples, in a number of cases the administrative abort command will be unsuccessful. This shortcoming is addressed through a modification of the NVMe interface to allow device drivers (e.g., device driver 28, device driver 34) to set a “poison bit” status flag on I/O commands placed on I/O submission queues awaiting fetching by SSD controller 40. When fetched by SSD controller 40, the “poison bit” status flag is read by SSD controller 40 and used to prevent storing of the I/O command to internal queues 40a-40n. Because this abort function is performed within the framework of the command path, without requiring intervention from controller management module 18, this abort function is referred to as a command path abort function.
At step 80, the I/O operation between host 12 and SSD 14 is initiated by first partition 24 placing an I/O command on I/O submission queue 30.
At step 82, first partition 24 generates a command path abort command. At step 84, in response to the command path abort command, device driver 28 sets a “poison bit” within the I/O command. Depending on the application, each I/O command is comprised of a fixed number of bits (e.g., 32, 64) which includes at least a plurality of unused, reserved bits. One of these bits is assigned the status of the “poison bit”, wherein “setting” the “poison bit” simply refers to changing the state of the bit from a zero to a one (or vice versa). Because device driver 28 is responsible for placing I/O commands within I/O submission queue 30, device driver 28 is able to locate and access I/O commands previously placed within I/O submission queue for setting of the “poison bit”.
At step 86, SSD controller 40 fetches the I/O command from I/O submission queue 30. At step 88, SSD controller 40 detects the set “poison bit”. Detection of the “poison bit” requires SSD controller 40 to check the bit status of the bit designated as the “poison bit” in each command fetched. In response to a set “poison bit”, SSD controller 40 aborts execution of the command. At step 90, SSD controller 40 returns a result to I/O completion queue 32 indicating that the abort was successful, thereby satisfying the requirement that each command fetched from an I/O submission queue results in a corresponding result being stored in an I/O completion queue. At step 92, first partition 24 fetches the result from I/O completion queue 32 and reads the returned result.
In this way, the command path abort function utilizes the command issue and completion path to execute abort commands. That is, the command path abort function does not require placing a separate abort command in the administrative submission queue, and fetching, outside of the command issue and completion path, the abort function. As a result, I/O commands yet to be fetched by SSD controller 40 may successfully be aborted. This is in contrast with the standard, administrative abort command, which fails if the abort command is fetched from administrative submission queue 20 prior to fetching the I/O command from I/O submission queue 30. As discussed above, use of the command path abort function does not preclude continued use of the administrative abort function. In fact, use of both the standard, administrative abort function and the command path abort function improves the likelihood of an abort command being successful. The administrative abort function will continue to be successful when the abort command is issued after the I/O command has been fetched from I/O submission queue 30, while the command path abort function will be successful if the abort command is issued prior to the I/O command being fetched from I/O submission queue.
While the invention has been described with reference to an exemplary embodiment(s), it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the invention without departing from the essential scope thereof. Therefore, it is intended that the invention not be limited to the particular embodiment(s) disclosed, but that the invention will include all embodiments falling within the scope of the appended claims.
Sendelbach, Lee Anton, Espeseth, Adam Michael, Dewitt, Dylan Mark, Darrington, David Lee
Patent | Priority | Assignee | Title |
10282103, | Nov 09 2015 | Seagate Technology LLC | Method and apparatus to delete a command queue |
10572180, | Nov 09 2015 | Seagate Technology LLC | Method and apparatus to perform a function level reset in a memory controller |
10713074, | Oct 21 2015 | Huawei Technologies Co., Ltd. | Method, apparatus, and system for accessing storage device |
11119691, | Nov 09 2015 | Seagate Technology LLC | Method and apparatus to perform a function level reset in a memory controller |
11899978, | Dec 06 2021 | Samsung Electronics Co., Ltd. | Method and system to abort a command for PCIe based non-volatile memory express solid-state drive |
11914900, | May 31 2022 | Western Digital Technologies, Inc. | Storage system and method for early command cancelation |
9817738, | Sep 04 2015 | Intel Corporation | Clearing poison status on read accesses to volatile memory regions allocated in non-volatile memory |
9996262, | Nov 09 2015 | Seagate Technology LLC | Method and apparatus to abort a command |
Patent | Priority | Assignee | Title |
20060149940, | |||
20090327638, | |||
20120110259, | |||
20130086311, | |||
20130135816, | |||
20130145085, | |||
20130198311, | |||
20140215191, | |||
20140281040, | |||
WO2013095562, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Dec 19 2013 | DARRINGTON, DAVID LEE | HGST NETHERLANDS B V | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 031829 | /0262 | |
Dec 19 2013 | DEWITT, DYLAN MARK | HGST NETHERLANDS B V | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 031829 | /0262 | |
Dec 19 2013 | ESPESETH, ADAM MICHAEL | HGST NETHERLANDS B V | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 031829 | /0262 | |
Dec 19 2013 | SENDELBACH, LEE ANTON | HGST NETHERLANDS B V | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 031829 | /0262 | |
Dec 20 2013 | HGST Netherlands B.V. | (assignment on the face of the patent) | / | |||
Aug 31 2016 | HGST NETHERLANDS B V | Western Digital Technologies, INC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 040829 | /0516 | |
Jan 13 2020 | Western Digital Technologies, INC | JPMORGAN CHASE BANK, N A , AS AGENT | SECURITY INTEREST SEE DOCUMENT FOR DETAILS | 052915 | /0566 | |
Feb 03 2022 | JPMORGAN CHASE BANK, N A | Western Digital Technologies, INC | RELEASE OF SECURITY INTEREST AT REEL 052915 FRAME 0566 | 059127 | /0001 |
Date | Maintenance Fee Events |
Nov 22 2018 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Jan 30 2023 | REM: Maintenance Fee Reminder Mailed. |
Jul 17 2023 | EXP: Patent Expired for Failure to Pay Maintenance Fees. |
Date | Maintenance Schedule |
Jun 09 2018 | 4 years fee payment window open |
Dec 09 2018 | 6 months grace period start (w surcharge) |
Jun 09 2019 | patent expiry (for year 4) |
Jun 09 2021 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jun 09 2022 | 8 years fee payment window open |
Dec 09 2022 | 6 months grace period start (w surcharge) |
Jun 09 2023 | patent expiry (for year 8) |
Jun 09 2025 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jun 09 2026 | 12 years fee payment window open |
Dec 09 2026 | 6 months grace period start (w surcharge) |
Jun 09 2027 | patent expiry (for year 12) |
Jun 09 2029 | 2 years to revive unintentionally abandoned end. (for year 12) |