Command processing method and storage device

The command processing method and storage device enable parallel execution of LBA ranges without controller redesign, enhancing SSD performance by preventing passive locking and reducing processor overhead.

JP7609729B2Active Publication Date: 2025-01-07SAMSUNG ELECTRONICS CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
JP2021119943
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-09-17
Filing Date
2021-07-20
Publication Date
2025-01-07
Estimated Expiration
2041-07-20

AI Technical Summary

Technical Problem

Existing SSDs cannot handle added functionality without redesigning the SSD controller as protocol features evolve.

Method used

A command processing method and storage device that processes host commands without redesigning the controller by receiving commands via queues, generating and processing internal commands, and updating registers to notify controllers, allowing parallel execution of LBA ranges.

Benefits of technology

Improves storage device performance by preventing passive locking and unlocking of LBA ranges, reducing processor overhead, and enabling parallel processing of LBA ranges.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007609729000001
    Figure 0007609729000001
  • Figure 0007609729000002
    Figure 0007609729000002
  • Figure 0007609729000003
    Figure 0007609729000003
Patent Text Reader

Abstract

To provide a command processing method and storage device capable of processing a command of a host without the need for redesigning a controller when adding the command to a protocol.SOLUTION: A method for processing a command from a host to a storage device includes the steps of: receiving a first command from the host through a first queue exposed to the host by a first controller of the storage device; generating a second command on the basis of the first command by the storage device; providing the second command to a second controller of the storage device through a second queue by the storage device; acquiring and processing the second command from the second queue by the second controller; and transferring a signal for informing the host of completion of the first command on the basis of a state of the second command by the first controller. The step of acquiring and processing the second command is for accessing a nonvolatile storage medium of the storage device, and the second command and the second queue are not exposed to the host.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a storage device, and more particularly to a command processing method and a storage device that can process host commands without the need to redesign the controller, even if the command is added to the protocol. [Background technology]

[0002] A host computing device uses a storage interface protocol to access a non-volatile storage device such as a solid state drive (SSD). The non-volatile storage device includes a controller that processes commands generated using the protocol. As the technology of a protocol develops, more functions (or features) (eg, commands) can be added to the protocol.

[0003] The problem is that existing SSDs cannot handle the added functionality (or features) without redesigning the SSD controller. Therefore, the challenge is to develop an SSD controller that can process the host's commands as commands are added to the protocol without having to redesign the SSD controller. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2004-118413 A Summary of the Invention [Problem to be solved by the invention]

[0005] The present invention has been made in consideration of the above-mentioned problems with conventional storage devices, and an object of the present invention is to provide a command processing method for processing commands intended for a storage device, and a storage device that can process host commands using the storage device without the need to redesign the controller, even if the commands have been added to the protocol. [Means for solving the problem]

[0006] A command processing method according to the present invention, which has been made to achieve the above object, is a method for processing a command from a host to a storage device, comprising the steps of: receiving a first command from the host via a first queue exposed to the host by a first controller of the storage device; generating a second command based on the first command by the storage device; storing the second command in a second queue by the storage device; updating a register by the storage device to notify a second controller of the storage device; and, in response to the update of the register, reading the second command from the second queue by the second controller. read out and by said second controller, Process the second command that was read and, in response to determining that a logical block address range in the second command differs from a logical block address of a command being processed on behalf of the host, accessing the non-volatile storage medium, the process being for accessing a non-volatile storage medium of the storage device; and, based on a status of the second command, transmitting, by the first controller, a signal indicating completion of the first command to the host. the second command includes a portion of a first command, the first command being associated with an operation and first and second memory ranges, and the second command including the operation and the first memory range. It is characterized by:

[0007] beforeThe method further includes the steps of generating a third command including the operation and the second memory range by the storage device, providing the third command to the second controller via the second queue by the storage device, and retrieving and processing the third command from the second queue by the second controller, and it is preferable that the step of transferring a signal indicating completion of the first command to the host by the first controller is based on the state of the second command and the state of the third command. Preferably, said operations include deallocating said first and second memory ranges. Preferably, the second and third commands are obtained and processed simultaneously. Preferably, the second command is different from the first command.

[0008] It is preferable that the storage device is a non-volatile storage device, the first controller and the second controller conform to a non-volatile memory express (NVMe) protocol, the first queue includes a submission queue conforming to the NVMe protocol, and the first command includes an NVMe command. Preferably, the method further comprises providing, by the second controller, a first completion status to a first completion queue. It is preferable that the step of forwarding the signal includes the step of submitting a second completion status to a second completion queue based on the step of providing the first completion status to the first completion queue, and the second completion queue is exposed to the host.

[0009] A storage device according to the present invention, which has been made to achieve the above-mentioned object, is a storage device comprising a non-volatile storage medium and one or more processors connected to the non-volatile storage medium, each of the one or more processors receiving a first command from a host via a first controller and a first queue, wherein the first queue is exposed by the host, generating a second command based on the first command, storing the second command in a second queue, updating a register to notify a second controller of the storage device, and retrieving the second command from the second queue by the second controller in response to the update of the register. , process, wherein the one or more processors are further configured to access the non-volatile storage medium of the storage device to process the second command, and in response to determining that a logical block address range in the second command differs from a logical block address of a command being processed on behalf of the host, access the non-volatile storage medium and transmit a signal to the host via the first controller indicating completion of the first command based on a status of the second command. the second command includes a portion of the first command, the first command being associated with an operation and first and second memory ranges, and the second command includes the operation and the first memory range. It is characterized by: Effect of the Invention

[0010] In accordance with the command processing method and storage device of the present invention, a DSM deallocation command is split into independent unmap commands, each having a separate LBA range, thereby processing the LBA ranges in parallel, thereby improving the performance of the storage device, and checking for overlap of each LBA range reduces processor overhead by preventing passive locking and unlocking of LBA ranges. [Brief description of the drawings]

[0011] [Figure 1]1 is a block diagram showing a schematic configuration of a data storage and retrieval system according to an embodiment of the present invention. [Diagram 2] 2 is a layout diagram illustrating various modules for submitting and processing commands associated with a storage communication protocol or vendor-defined commands according to an embodiment of the present invention. FIG. [Diagram 3] FIG. 2 illustrates an internal command stored in a submission queue entry (SQE) in an internal submission queue according to one embodiment of the present invention. [Figure 4] 1 is a flow chart illustrating processing a dataset management (DSM) command to deallocate (demap) a given logical block address in a given namespace according to one embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] Next, a specific example of an embodiment for implementing a command processing method and a storage device according to the present invention will be described with reference to the drawings.

[0013] Example embodiments will now be described in more detail with reference to the accompanying drawings, in which like reference characters refer to like elements throughout. This disclosure may, however, be embodied in various different forms and should not be construed as limited to the embodiments depicted. Rather, these embodiments are provided as examples so that this disclosure will be thorough and complete, and will fully convey the aspects and features of the present disclosure to those skilled in the art. Thus, processes, components, and techniques that are not necessary for a person of ordinary skill in the art to fully understand the aspects and features of the present disclosure may not be shown. Unless otherwise indicated, the same reference numerals refer to the same components throughout the accompanying drawings and description, and therefore, the descriptions may not be repeated. In the drawings, the relative sizes of layers, components, and regions may be exaggerated and / or simplified for clarity.

[0014] Terms such as "first," "second," and "third" may be used to describe various components, regions, layers, and sections, and it will be understood that the components, regions, layers, and sections are not limited to these terms. These terms are only used to distinguish one component, region, layer or section from another component, region, layer or section. Therefore, the above-mentioned first component, region, layer, or section may be referred to as a second component, region, layer, or section without departing from the technical spirit of the invention.

[0015] The terminology is for the purpose of describing particular embodiments and is not used to limit the inventive concepts. The terms "substantially," "about," and similar terms are used as terms of approximations, not degrees, and are intended to allow one of ordinary skill in the art to appreciate inherent variations in measurements or calculations.

[0016] Terms described in the singular are intended to include the plural as well, unless the context clearly dictates otherwise. The term "comprises" as used in the detailed description specifies the presence of stated features, integers, steps, operations, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, components, and / or groups thereof. The term "and / or" as used herein includes any and all combinations of one or more of the listed elements. The use of phrases such as "at least one or more" before an element does not limit the individual elements of the list but rather limits the entire list of elements. It should be noted that the term "may" when used to describe embodiments in accordance with an inventive concept refers to "one or more embodiments of the present disclosure." Additionally, the term "preferably" is used to refer to the exemplary or illustrative drawings. As used in the above description, the term "use" may be considered to be synonymous with the term "utilization."

[0017] When a component or layer is referred to as "connected to," "coupled," or "adjacent to" another component or layer, it will be understood that the component or layer may be directly connected, coupled, or adjacent to the other component or layer, and that one or more intervening components or layers may be present. In contrast, when a component or layer is referred to as "directly," "directly connected," "directly coupled," "immediately adjacent," or the like, there are no intervening components or layers present.

[0018] All numerical ranges within the description are intended to include all subranges of the same numerical precision contained within the recited range. For example, a range "from 1 to 10" is intended to include all subranges between the stated minimum value of 1.0 and the stated maximum value of 10.0, where the minimum value is greater than or equal to 1.0 and the maximum value is less than or equal to 10.0, such as "from 2.4 to 7.6." Every maximum numerical limitation in the description is intended to include all lower sub-numerical limitations, and every minimum numerical limitation is intended to include all higher sub-numerical limitations.

[0019] A host computing device uses a communication protocol to access a non-volatile storage device such as a solid state drive (SSD). The non-volatile storage device includes a controller that processes commands generated using the protocol. As the technology of a protocol evolves, incrementally more functions (or features) (eg, commands) may be added to the protocol. Existing SSDs cannot handle the added functionality (or features) without redesigning the SSD controller. It would therefore be desirable to have an SSD controller that can process the host's commands as commands are added to the protocol without having to redesign the SSD controller.

[0020] Generally, embodiments of the present invention relate to a storage device that is implemented to process host commands according to a communications protocol. For example, the communication protocol may be the non-volatile memory express (NVMe) protocol. However, embodiments of the present invention are not so limited and may be extended with other protocols as would be recognized by one of ordinary skill in the art. In one embodiment, a host command is resolved into one or more internal commands that are executed on the storage device. The storage device includes an internal controller that fetches or executes a number of internal commands. In one embodiment, no communication path is established between the host and the internal controller. Thus, the internal controller is not exposed to the host.

[0021] In one embodiment, the host communicates host commands to an external submission queue that is exposed to the host and connected to the storage device using an interface, such as an NVMe interface. The storage device's external controller can bring (fetch) or obtain host commands and communicate the fetched commands to the storage device's processor to generate internal commands. The internal commands are communicated to one or more internal submission queues. In one embodiment, the internal submission queue and the internal controller are not exposed to the host.

[0022] The internal controller can fetch or obtain internal commands and communicate the internal commands to be executed by the processor as standard commands following a communication protocol (e.g., the NVMe protocol) or as vendor specific commands, as commands initiated from the host. In one embodiment, internal commands are fetched or obtained and executed simultaneously with each other and with other storage devices (eg, parallel relationships). The terms simultaneously and in a parallel relationship may mean at a rate faster than sequential processing, at substantially the same time, and / or the like.

[0023] FIG. 1 is a block diagram showing a schematic configuration of a data storage and retrieval system 100 according to an embodiment of the present invention. The data storage and retrieval system 100 includes one or more host devices (102a, 102b) (hereinafter referred to as hosts) that may be implemented with the same or different operating systems. One or more of a plurality of host devices 102a, 102b are connected to a data storage device 104 via a storage interface bus (106a and 106, collectively referred to as 106). For example, the storage interface bus 106 may be a Peripheral Component Interconnect express (PCIe) bus. In one embodiment, the host devices (102a, 102b) send and receive data from the data storage device 104 via the storage interface bus 106 using a storage interface protocol.

[0024] The storage interface protocol may be the NVMe protocol as described in the NVM Express base specification revision 1.4a published on March 9, 2020 (including any earlier or future amendments), available at http: / / nvmexpress.org. The NVMe protocol is used as an example to explain this embodiment. However, those skilled in the art should understand that the various embodiments can be extended to storage interface protocols similar to current or future NVMe protocols without departing from the technical spirit of the invention.

[0025] The host devices (102a, 102b) include processors (108a, 108b) implemented to process data. The processors (108a, 108b) may be general purpose central processing units (CPUs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other forms of processing devices implemented in software, microcode, and / or firmware.

[0026] In one embodiment, the processors (108a, 108b) are coupled to a host memory space (110a, 110b). The host memory space (110a, 110b) may be static random access memory (SRAM), dynamic random access memory (DRAM), and / or the like.

[0027] Application programs are stored in the host's memory space (110a, 110b) for execution by the processors (108a, 108b). The application program requests the storage device 104 to store or search (or retrieve) data, or receives a request from the storage device 104 to store or search (or retrieve) data. Application programs generate output based on the stored or retrieved data. For example, the output may be a display device displaying the retrieved data. In one embodiment, when internal commands are used by a storage device to process requests of an application program, the requests can be processed faster and with less overhead.

[0028] The host memory space (110a, 110b) also contains (or stores) one or more external submission queues (SQ) (112a, 112b) and one or more external completion queues (CQ) (114a, 114b). The host devices (102a, 102b) submit storage interface commands via external submission queues (112a, 112b) for execution by the storage device 104, and receive completion messages from the storage device 104 after the commands have been executed via external completion queues (114a, 114b). In one embodiment, the external submission queues (112a, 112b) and external completion queues (114a, 114b) may be contained in a controller memory buffer (CMB) of the storage device 104 instead of (or in addition to) the host memory space (110a, 110b). Thus, references to host memory spaces (110a, 110b) may be understood to include references to the CMB. In either of the two cases, the external submission queues (112a, 112b) and the external completion queues (114a, 114b) are exposed to and accessible by the host.

[0029] In one embodiment, the host memory space (110a, 110b) includes (or stores) physical region page (PRP) / scatter gather list (SGL) entries (116a, 116b) and other data (117a, 117b). For example, the PRP / SGL entries (116a, 116b) describe physical memory locations in the host memory space (110a, 110b) to which data read from the storage device 104 is written for NVMe read commands and to which data written to the storage device 104 is read for NVMe write commands. For certain storage interface commands, logical block address (LBA) ranges are stored as data (117a, 117b) in the host memory space instead of including the range in the command itself. An example of such a command is the Dataset Management Deallocate command, which is used to deallocate / undemap a host-provided LBA range.

[0030] The storage device 104 may be a non-volatile storage device such as a solid state drive (SSD). The storage device 104 includes a communication interface 118, an NVMe subsystem 120, and a device controller 122. Although the NVMe subsystem 120 and device controller 122 are depicted as separate modules, the functions of the NVMe subsystem 120 and device controller 122 may be integrated into a single module. In one embodiment, the communication interface 118 includes PCIe ports and endpoints that enable communication from the host devices (102a, 102b) to the storage device 104 and from the storage device 104 to the host devices (102a, 102b).

[0031] The NVMe subsystem 120 includes, but is not limited to, one or more external controllers (124a, 124b) and one or more internal controllers 126. The external and internal controllers (124a, 124b, 126) may be implemented using one or more processors, such as application-specific integrated circuits (ASICs). In one embodiment, one or more external controllers (124a, 124b) may be exposed to the host via the PCIe interface 118 and are called upon to process queue operations for the external submission queues and external completion queues (112a, 112b and 114a, 114b). For example, a particular external controller (124a, 124b) may fetch a storage interface command from a particular external submission queue (112a, 112b) and place a completion status in the corresponding external completion queue (114a, 114b) based on the status of the requested command (e.g., an indication that the requested command has completed).

[0032] In one embodiment, a particular external controller (124a, 124b) is connected to one or more name spaces. In this case, the logical space of storage device 104 is divided into one or more logical spaces / name spaces, each of which is identified by a unique namespace identifier (NSID). For example, a 1 TB storage device using 4K logical blocks can be assumed to be allocated with three name spaces having capacities of 512 GB, 256 GB, and 256 GB, respectively. Commands provided by a host device (102a, 102b) are directed to a particular name space, which is identified via an NSID.

[0033] In one embodiment, the one or more internal controllers 126 are not exposed (eg, hidden) and are not accessible to the host devices (102a, 102b). In this case, no communication interface (eg, a PCIe interface) is provided between the host devices (102a, 102b) and the internal controller 126. According to one embodiment, the internal controller 126 can mimic the functionality of the external controllers (124a, 124b). In this case, the internal controller 126 can interact with the device controller 122 as if it were an external controller (124a, 124b).

[0034] In one embodiment, the storage device 104 includes an internal CMB 128 that stores one or more internal submission queues 130 and one or more internal completion queues 132 . The internal CMB 128 includes (or stores) other data 134 (eg, internal data buffers) and internal PRP / SGL entries 136 . In one embodiment, the internal controller 126 accesses the internal CMB 128 to fetch and process internal commands submitted by the device controller 122 . The contents of the internal CMB 128 and the processing of internal commands are not exposed (eg, hidden) and are not accessible to the host.

[0035] In one embodiment, the device controller 122 interacts with the external and internal controllers (124a, 124b, 126) to execute commands requested by the host devices (102a, 102b). The device controller 122 includes, but is not limited to, one or more processors 140 and a media interface 142 . The one or more processors 140 may be configured to process commands between the external and internal controllers (124a, 124b, 126) and execute computer-readable commands to manage the operation of the storage device 104. The computer readable commands are executed by one or more processors 140 (eg, firmware code).

[0036] In one example, one or more processors 140 may be configured to interact with the external and internal controllers (124a, 124b, 126) to receive commands to write or read to or from NVM media 144. One or more processors 140 interact with NVM media 144 via a media interface 142 to efficiently perform write or read operations. The NVM media 144 may include one or more types of non-volatile memory, such as flash memory.

[0037] In one embodiment, the storage device 104 further includes internal memory 138 for short-term storage or temporary memory while the storage device 104 is in operation. The internal memory 138 may include dynamic random access memory (DRAM), static random access memory (SRAM), and / or data tightly coupled memory (DTCM). The internal memory 138 may be used instead of, or in addition to, the internal CMB 128 to store some or all of the data stored in the internal CMB 128, such as the internal submission queue 130, the internal completion queue 132, the data 134, the internal PRP / SGL entries 136, and / or the like. Thus, a reference to the internal CMB 128 may be understood to include a reference to the internal memory 138 .

[0038] FIG. 2 is a layout diagram illustrating various modules for submitting and processing commands associated with a storage interface protocol, or vendor-defined commands, according to one embodiment of the present invention. The various modules are hosted by external and / or internal controllers (124a, 124b, 126). Also, although one or more of the modules are assumed to be separate functional parts, those skilled in the art will recognize that the functionality of the modules may be integrated or combined into one module, or further subdivided into sub-modules, without departing from the core technical idea of ​​the invention.

[0039] In one embodiment, instances of the command module 200 and the PRP / SGL fetch module 202 may be included in the internal and external controllers (124a, 124b, 126). For example, the command module 200 may include a command arbitration sub-module, a command fetch sub-module, a command parser sub-module, and a command dispatcher sub-module. The command fetch sub-module can be implemented to fetch host commands from the external submission queues (112a, 112b) or to fetch internal commands from the internal submission queue 130. The command arbitration submodule is configured to invoke an arbitration burst policy to arbitrate between the various controllers and between the submission queues of the various selected controllers to select a submission queue from which to fetch a command.

[0040] The command parser submodule may be configured to parse commands submitted to an external or internal controller to check and verify command format, NSID validity, reservation state, whether an LBA check is required, validity of protection information in the form of a name space, and / or the like. The command parser sub-module may also be configured to interface with an LBA overlap checker (not shown) to pass a command if an LBA overlap check is required for the command based on programmed configuration information. The command parser sub-module also determines whether it is necessary to bypass the host subsystem and pass commands directly to the media interface to improve system performance.

[0041] The LBA overlap checker is responsible for checking whether a host or internal command is currently executing in the same range as a newly arrived command. If the answer is yes, the LBA overlap checker holds the newly arrived command until the previously fetched command currently being processed is completed. A command dispatcher hardware sub-module is responsible for distributing commands to the various processors based on the type of command (eg, executing, not executing, or management).

[0042] The PRP / SGL fetch module 202 is implemented to bring (fetch) PRP / SGL entries (116a, 116b) from host memory (in the case of external controllers (124a, 124b)) or bring (fetch) internal PRP / SGL entries 136 from the internal CMB 128 (in the case of internal controller 126). In one embodiment, the command module 200 and the PRP / SGL fetch module 202 follow a storage interface protocol to fetch commands and PRP / SGL entries (116a, 116b).

[0043] In one embodiment, the host devices (102a, 102b) submit storage interface commands to any one of the external submission queues (112a, 112b). A command module 200 (e.g., a command fetch sub-module) of any one of the external controllers (124a, 124b) fetches or retrieves a command from the external submission queue (112a, 112b) for further processing and communicates the command to the device controller 122. Depending on the type of command provided by the host, the device controller 122 accesses the host memory (110a, 110b) to read the data (117a, 117b) needed to process the fetch command, such as an LBA range. In one embodiment, if the command provided by the host device (102a, 102b) is a data transfer command, in order to read or write data associated with the data transfer command, a PRP / SGL fetch module 202, which interfaces with an external controller (124a, 124b), fetches a PRP / SGL entry (116a, 116b) from the host memory (110a, 110b) or the CMB.

[0044] In one embodiment, the device controller 122 is configured to generate one or more internal commands based on the fetched command. The one or more internal commands may include a portion of the fetched command (eg, an operation code of the fetched command). In one embodiment, the one or more internal commands are different from the command that was brought (fetched). For example, an internal command may contain an operation code that is different from the operation code of the command that was fetched.

[0045] The device controller 122 can provide one or more internal commands to the internal submission queue 130, similar to the way that the host devices (102a, 102b) provide NVMe commands to the external submission queues (112a, 112b). For example, the device controller 122 may update a hardware doorbell register to notify the command module 200 of the internal controller 126 that one or more internal commands have been submitted. In one embodiment, a command provided by a host device (102a, 102b) is divided into multiple internal commands. In one embodiment, multiple internal commands are submitted and processed simultaneously (eg, in parallel) with one another by one or more internal controllers 126 , thereby improving performance of the storage device 104 .

[0046] In one embodiment, if the internal command requires data transfer, the PRP / SGL fetch module 202 of the internal controller 126 fetches the internal PRP / SGL entry 136 from the internal CMB 128 to read or write data associated with the internal command. The internal PRP / SGL entries 136 are generated from the device controller 122 . In one embodiment, in the case of a read operation requesting transfer from the NVM media 144 , the internal PRP / SGL entry 136 may be for a destination buffer 204 . If it is a write operation that must be communicated to the NVM media 144 , the internal PRP / SGL entry 136 may be the source buffer 206 .

[0047] In one embodiment, a transfer queue module (TQ module) 208 is configured to process internal requests and transfer data to or from an intermediate buffer (not shown) based on the command type (e.g., read or write). For example, for an internal read or write operation, the transmission queue module 208 obtains information from the device controller 122 regarding specific data structures for controlling direct memory access, including a transfer descriptor (TR descriptor) and a direct memory access descriptor (DMA descriptor).

[0048] The transfer descriptor contains the command type (eg, read or write) for the data transfer. The DMA descriptor contains information on the intermediate buffer for the type of command. For example, if the command type is an internal read command, the intermediate buffer may be an intermediate read buffer used by the media interface 142 to temporarily hold data read from the NVM media 144. If the command type is an internal read command, the intermediate buffer may be an intermediate write buffer used by the media interface 142 to temporarily hold data written from the NVM media 144.

[0049] In one embodiment, the DMA management module 210 receives the internal PRP / SGL entries 136 as well as the DMA descriptors and transfers data from the source buffer 206 to the NVM media 144 (via intermediate buffers provided in the DMA descriptor) or from the NVM media 144 to the destination buffer 204 (via intermediate buffers provided in the DMA descriptor) for internal read operations.

[0050] FIG. 3 is a diagram illustrating internal commands stored as submission queue entries (SQEs) in the internal submission queue 130, according to one embodiment of the present invention. In one embodiment, the internal command is generated based on a storage interface protocol for generating the external command. In this regard, the size of the internal command may be 64 bytes and includes a command identifier (ID) 300, an operation code (Opcode) 302, a name space ID (NSID) 304, a buffer address 306, and command parameters 308. The command identifier 300 may be the command ID of the internal submission queue 130 to which the internal command is submitted.

[0051] An operation code (Opcode) 302 identifies the particular command to be performed. In one embodiment, the operation code 302 is an NVMe operation code 302 that identifies an NVM command (e.g., read, write, manage, manage dataset, or a vendor specific command). In some embodiments, the operation code 302 identifies a new command in the internal command set that uniquely accesses the internal controller 126 .

[0052] NSID 304 identifies the name space in which the command identified by operation code 302 operates. The buffer address 306 contains an internal PRP / SGL entry 136 (or a pointer to a PRP / SGL entry) in the internal CMB 128 . Certain parameters associated with the command associated with the execution are stored as command parameters 308 .

[0053] FIG. 4 is a flow chart illustrating processing a dataset management (DSM) command to deallocate (unmap) a given logical block address in a given namespace in accordance with one embodiment of the present invention. The process begins in step S400, where one of the external controllers (124a, 124b) fetches a command from the external submission queue (112a, 112b) and transmits it to the device controller 122 for pre-processing by the processor 140.

[0054] In step S402, the processor 140 performs certain pre-processing tasks, including, for example, initiating a host direct memory access operation via the storage interface bus 106 to transfer the LBA range from the host memory (110a, 110b) to the storage device's internal memory 138. Additionally, the processor 140 parses the LBA ranges to identify the total number of non-contiguous LBA ranges.

[0055] In step S404, the processor 140 generates an internal unmap command for each of the non-contiguous LBA ranges identified by the processor. In one embodiment, the unmap command is a command that is not part of the storage interface protocol. The processor 140 provides an internal unmap command to one or more internal submission queues 130 .

[0056] The unmap commands provided for each LBA range are processed in steps S406 through S412. Although the process is simply described in terms of one unmap command for one LBA range, it should be noted that other unmap commands provided to other LBA ranges may also be processed in parallel based on steps S406 to S412.

[0057] In step S406, the internal controller 126 fetches the unmap command from the internal submission queue 130 and processes it. The command module 200 of the internal controller 126 is called to fetch the unmap command from the internal submission queue 130 . In one embodiment, when processing of an unmap command considers that no data transfer is required, the PRP / SGL fetch module 202 of the internal controller 126 is not invoked and no internal PRP / SGL list 136 is generated.

[0058] In step S408, the internal controller 126 (eg, an LBA overlap checker) determines whether the LBA range of the internal unmap command overlaps with the LBA of a command being processed on behalf of the host device (102a, 102b). For example, the LBA range of the unmap command overlaps with the LBA address that is the target of a host 126 read operation. If an overlap is detected, the internal controller 126 waits until the host command is completed before proceeding with unmapping the LBA range.

[0059] However, if no overlap is detected, then in step S410, the internal controller 126 forwards one or more commands to the media interface 142 via the device controller 122 to perform the actual unmap operation of the LBA range on the NVM media 144. It will be appreciated that the command parser sub-module may also be invoked to perform validation or verification of the unmap command before transmitting one or more commands to the media interface 142, such as validation or verification of command format, NSID validity, reservation status, whether or not LBA validation is required, validity of protection information based on namespace format, and / or the like.

[0060] Once the completion status of the unmap operation has been determined, in step S412, the internal controller 126 provides an internal completion entry to the internal completion queue 132 associated with the internal submission queue 130 to which the internal unmap command was submitted.

[0061] In step S414, the processor 140 determines whether all LBA ranges in the submitted DSM deallocate command have been deallocated (eg, based on the status of an internal unmap command). If the answer is yes, then in step S416, the external controller (124a, 124b) provides an external completion entry to the external completion queue (114a, 114b) that corresponds to the external submission queue (112a, 112b) to which the DSM deallocation command was submitted.

[0062] It should be noted that the processing of DSM deallocation commands according to embodiments of the present invention provides technical improvements to the functionality of the data storage device 104 . For example, processing LBA ranges in parallel can improve the performance of the storage device because a DSM deallocate command is split into separate unmap commands, each with a separate LBA range. Additionally, verifying overlap of each LBA range (eg, via hardware) reduces overhead for processor 140 since passive locking and unlocking of LBA ranges is prevented. Additionally, in embodiments where the storage device includes two subsystems (e.g., a host subsystem that interacts with host devices (102a, 102b) and a flash subsystem that interacts with NVM media 144), the use of a dedicated processor running firmware (e.g., processor 140) can reduce overhead on the host subsystem (e.g., firmware running on processor 140) because internal commands can be processed without significant host subsystem intervention.

[0063] It should be noted that the one or more processors mentioned above may include, for example, general purpose / special purpose central processing units (CPUs), such as application integrated circuits (ASICs), digital signal processors (DSPs), graphics processing units (GPUs), and / or programmable logic devices, such as field programmable gate arrays (FPGAs). Each function of the processor used in the present invention may be implemented by hardware, firmware, and / or software. The processors may be implemented on a single printed circuit board (PCB) or distributed across multiple interconnected PCBs. The processor may include other processing circuits. For example, the processing circuit may include two processing circuits, an FPGA and a CPU, interconnected on a PCB.

[0064] Although the preferred embodiment for the method and system for processing storage interface commands has been described in detail with reference to the detailed description and drawings, various modifications can obviously be made by one of ordinary skill in the art. It should therefore be understood that methods and systems for processing storage interface commands implemented in accordance with the principles of the present disclosure may be implemented in other ways than those specifically detailed. [Explanation of symbols]

[0065] 100 Data storage and retrieval systems 102a, 102b host device 104 Storage device 106a, 106b interface bus 108a, 108b Processors 110a, 110b host memory space 112a, 112b External submission queue 114a, 114b External Completion Queue 116a, 116b PRP / SGL entries 117a, 117b Data 118 Communication (PCIe) Interface 120 NVMe Subsystem 122 Equipment Controller 124a, 124b External controller 126 Internal Controller 128 Internal CMB 130 Internal Submission Queue 132 Internally Contained Queue 134 Data 136 Internal PRP / SGL Entries 138 Internal Memory 140 processors 142 Media Interface 144 NVM Media

Claims

1. A method for processing a command from a host to a storage device, comprising: receiving a first command from the host via a first queue exposed to the host by a first controller of the storage device; generating a second command based on the first command by the storage device; storing, by the storage device, a second command in a second queue; updating a register by the storage device to notify a second controller of the storage device; reading the second command from the second queue by the second controller in response to updating the register; processing, by the second controller, the second command read from the second queue; wherein the process is for accessing a non-volatile storage medium of the storage device, accessing the non-volatile storage medium in response to determining that a logical block address range in the second command is different from a logical block address of a command being processed on behalf of the host; transmitting, by the first controller, a signal indicating completion of the first command to a host based on a status of the second command; 11. A method for processing commands, comprising: a first command including a portion of a second command; the first command being associated with an operation and first and second memory ranges; and the second command including the operation and the first memory range.

2. The method comprises: generating, by the storage device, a third command that includes the operation and the second memory range; providing, by the storage device, the third command to the second controller via the second queue; and retrieving and processing the third command from the second queue by the second controller; 2. The command processing method of claim 1, wherein the step of transmitting a signal indicating completion of the first command by the first controller to the host is based on a status of the second command and a status of the third command.

3. 2. The method of claim 1, wherein the operation includes deallocating the first and second memory ranges.

4. 3. The command processing method according to claim 2, wherein the second and third commands are obtained and processed simultaneously.

5. 2. The method of claim 1, wherein the second command is different from the first command.

6. the storage device is a non-volatile storage device; The first controller and the second controller are configured to communicate with each other according to a non-volatile memory express (NVMe) protocol; the first queue includes a submission queue conforming to the NVMe protocol; The command processing method of claim 1 , wherein the first command includes an NVMe command.

7. 2. The method of claim 1, further comprising providing, by the second controller, a first completion status to a first completion queue.

8. the step of forwarding the signal includes the step of submitting a second completion status to a second completion queue based on the step of providing the first completion status to the first completion queue; 8. The method of claim 7, wherein the second completion queue is exposed to the host.

9. A storage device, comprising: A non-volatile storage medium; one or more processors coupled to the non-volatile storage medium; Each of the one or more processors: receiving a first command from a host via a first controller and a first queue; wherein the first queue is exposed by the host; generating a second command based on the first command; storing the second command in a second queue; updating a register to notify a second controller of the storage device; retrieving and processing the second command from the second queue by the second controller in response to updating the register; wherein the one or more processors are further configured to access the non-volatile storage medium of the storage device to process the second command; accessing the non-volatile storage medium in response to determining that a logical block address range in the second command is different from a logical block address of a command being processed on behalf of the host; transmitting, via the first controller, a signal indicating completion of the first command to a host based on a status of the second command; A storage device characterized in that the second command includes a portion of the first command, the first command being associated with an operation and first and second memory ranges, and wherein the second command includes the operation and the first memory range.

10. The one or more processors: generating a third command that includes the operation and the second memory range; providing the third command to the second controller via the second queue; and further configured to obtain the third command from the second queue via the second controller; 10. The storage device according to claim 9, wherein the transfer of a signal indicating completion of the first command by the first controller to the host is based on a state of the second command and a state of the third command.

11. 11. The storage device of claim 10, wherein the operation includes deallocating the first and second memory ranges.

12. 11. The storage device according to claim 10, wherein the second and third commands are obtained and processed simultaneously by the one or more processors.

13. 10. The storage device according to claim 9, wherein the second command is different from the first command.

14. the storage device is a non-volatile storage device; The first controller and the second controller are configured to communicate with each other according to a non-volatile memory express (NVMe) protocol; The first queue includes a submission queue according to the NVMe protocol; The storage apparatus according to claim 9 , wherein the first command includes an NVMe command.

15. 10. The storage apparatus of claim 9, wherein the one or more processors are further configured to submit a first completion status to a first completion queue via the second controller.

16. forwarding the signal includes submitting a second completion status to a second completion queue based on processing of the first completion status for the first completion queue; 16. The storage apparatus of claim 15, wherein the second completion queue is exposed to the host.

Citation Information

Patent Citations

  • Storage system, storage device, host computer, and snapshot creation method

    JP2004118413A

  • Method of storage aggregation for nvme over fabrics devices, method for aggregating nvme over fabrics SSD capacity in nvme-over-fabrics ethernet SSD group, and aggregated ethernet SSD group

    JP2018173959A

  • Storage processor managing solid state disk array

    US20150095554A1

  • Non-volatile memory system using a plurality of mapping units and operating method thereof

    US20170052901A1

  • Storage system and method for thermal throttling via command arbitration

    US20180260152A1