An operating method of a storage controller, a storage system, and an electronic device
By sending target indication information and reconfiguring the IO queue in the storage controller, the performance degradation problem of the storage controller when the transmitted value is out of range is solved, and the error information handling capability and the stability of IO services are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YANGTZE MEMORY TECH CO LTD
- Filing Date
- 2023-07-21
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, when the transmission value in the IO queue exceeds the preset value range, the storage controller cannot effectively process error information, resulting in performance degradation, and it cannot clearly inform the host of configuration errors after IO service failure.
When the transmission value in the IO queue exceeds the preset value range, the storage controller sends a target indication message to indicate that the transmission value is invalid, and creates the IO queue according to the recommended value or reconfigured transmission value to ensure the normal execution of subsequent IO services.
It improves the storage controller's ability to handle error information, enhances firmware performance, and improves the host's error judgment mechanism, ensuring the normal execution of IO services.
Smart Images

Figure CN119336241B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, and in particular to a method for operating a storage controller, a storage system, and an electronic device. Background Technology
[0002] The Nonvolatile Memory Host Controller Interface Specification (NVMHCIS) (NVMe) is a logical device interface specification that defines the command and data formats for communication between solid-state drives (SSDs) and the host. As a command and application layer protocol, NVMe is theoretically compatible with any interface protocol and is typically used in conjunction with the peripheral component interconnect express (PCIe) interface. Summary of the Invention
[0003] The embodiments of this disclosure provide a method for operating a storage controller, a storage system, and an electronic device relating to the field of communication technology, and aim to improve the performance of the storage controller.
[0004] To achieve the above objectives, the embodiments of this disclosure adopt the following technical solutions:
[0005] On the one hand, a method for operating a storage controller is provided, the method comprising: receiving a command to create an input / output IO queue; and when a first transmission value of the IO queue exceeds a preset value range, sending target indication information, the target indication information being used to indicate that the first transmission value is invalid, the first transmission value representing the size of the information received by the IO queue.
[0006] The storage controller operation method provided in the embodiments of this disclosure can send an indication that the size of the information received by the IO queue is invalid when the first transmission value of the IO queue exceeds a preset value range. When the host receives the indication, it can determine whether to reconfigure the transmission value for the storage controller and whether to perform subsequent IO services, thereby improving the storage controller's ability to handle error information, that is, improving the performance of the storage controller.
[0007] In some embodiments, the IO queue includes an input / output completion queue, the first transmission value includes a first numerical value, and the preset numerical range includes a first preset numerical range. The first numerical value represents the size of the execution result received by the input / output completion queue, and the first numerical value exceeds the first preset numerical range. In the above possible embodiments, when the first transmission value exceeds the first preset range, an indication message indicating that the size of the information received by the input / output completion queue is invalid is sent, which improves the firmware's ability to handle error information in the storage controller, i.e., improves the firmware performance.
[0008] In some embodiments, the IO queue includes an input / output submission queue, the first transmission value includes a second value, and a preset value range includes a second preset value range. The second value represents the size of the command received by the input / output submission queue, and the second value exceeds the second preset value range. In the above possible embodiments, when the second transmission value exceeds the second preset range, an indication message indicating that the size of the information received by the input / output submission queue is invalid is sent, improving the firmware's ability to handle error information in the storage controller, i.e., improving firmware performance.
[0009] In some embodiments, the method further includes: creating an IO queue according to a second transmission value, wherein the second transmission value is within a preset value range; and sending an indication message indicating successful creation of the IO queue. In the above possible embodiments, creating the IO queue based on the second transmission value ensures the normal execution of subsequent IO services.
[0010] In some embodiments, the second transfer value includes a recommended value from the Non-Volatile Memory Host Controller Interface Specification (NVMe). In the possible embodiments described above, creating the IO queue based on the recommended value in NVMe increases the selectivity of the second transfer value.
[0011] In some embodiments, the method further includes: receiving a first configuration command, the first configuration command indicating that a second transfer value is configured for the storage controller; and in response to the first configuration command, sending an indication message indicating successful configuration of the second transfer value. In the above possible embodiments, the second transfer value is configured by the storage controller, increasing the selectivity of the second transfer value.
[0012] In some embodiments, after successfully creating the IO queue, the method further includes: receiving a second configuration command, the second configuration command being used to instruct the storage controller to configure a third transmission value; if the third transmission value exceeds a preset value range, the second configuration command is ignored. In the above possible embodiments, the normal execution of subsequent IO services is guaranteed, improving the performance of the storage controller.
[0013] In some embodiments, the second configuration command is received by the storage controller during the execution of IO commands based on the IO queue, and the method further includes: executing the remaining IO commands in the IO command queue. In the above possible embodiments, the normal execution of subsequent IO services is guaranteed, improving the performance of the storage controller.
[0014] On the other hand, an operating method for an electronic device is provided. The electronic device includes a coupled host and a storage system, the storage system including a storage controller. The method includes: the host sending a command to the storage controller to create an input / output (I / O) queue; the storage controller receiving the command to create the I / O queue; the storage controller sending target indication information to the host when a first transmission value of the I / O queue exceeds a preset value range, the target indication information indicating that the first transmission value is invalid, the first transmission value representing the size of the information received by the I / O queue; and the host receiving the target indication information.
[0015] The system operation method provided by the embodiments of this disclosure allows the storage controller to send an indication message indicating that the size of the information received by the IO queue is invalid when the first transmission value of the IO queue exceeds a preset value range. Upon receiving the indication message, the host can determine whether to reconfigure the transmission value of the information and whether to perform subsequent IO services. This improves the storage controller's ability to handle error information, thereby improving the performance of the storage controller and perfecting the host's error judgment mechanism.
[0016] In some embodiments, the IO queue includes an input / output completion queue, the first transmission value includes a first numerical value, the preset numerical range includes a first preset numerical range, the first numerical value represents the size of the execution result received by the input / output completion queue, and the first numerical value exceeds the first preset numerical range.
[0017] In some embodiments, the IO queue includes an input / output submission queue, the first transmission value includes a second value, the preset value range includes a second preset value range, the second value represents the size of the command received by the input / output submission queue, and the second value exceeds the second preset value range.
[0018] In some embodiments, the method further includes: the storage controller creating an I / O queue according to a second transmission value, the second transmission value being within a preset value range; the storage controller sending an indication message indicating successful creation of the I / O queue to the host; and the host receiving the indication message indicating successful creation of the I / O queue.
[0019] In some embodiments, the second transfer value includes a recommended value from the Non-volatile Memory Host Controller Interface Specification (NVME).
[0020] In some embodiments, before the host receives an indication message indicating successful creation of the IO queue, the method further includes: the host sending a first configuration command to the storage controller, the first configuration command being used to indicate configuring a second transfer value for the storage controller; the storage controller receiving the first configuration command and, in response to the first configuration command, sending an indication message indicating successful configuration of the second transfer value to the host; and the host receiving the indication message indicating successful configuration of the second transfer value.
[0021] In some embodiments, after successfully creating the IO queue, the method further includes: the host sending a second configuration command to the storage controller, the second configuration command being used to instruct the storage controller to configure a third transmission value; the storage controller receiving the second configuration command, and ignoring the second configuration command if the third transmission value exceeds a preset value range.
[0022] In some embodiments, the method further includes: the host sending a second configuration command to the storage controller while the storage controller is executing IO commands based on the IO queue; the storage controller receiving the second configuration command and executing the remaining IO commands in the IO commands based on the IO queue.
[0023] On another front, a storage controller is provided, configured to: receive a command to create an input / output IO queue; and when the first transmission value of the IO queue exceeds a preset value range, send target indication information, the target indication information being used to indicate that the first transmission value is invalid, the first transmission value representing the size of the information received by the IO queue.
[0024] In some embodiments, the IO queue includes an input / output completion queue, the first transmission value includes a first numerical value, the preset numerical range includes a first preset numerical range, the first numerical value represents the size of the execution result received by the input / output completion queue, and the first numerical value exceeds the first preset numerical range.
[0025] In some embodiments, the IO queue includes an input / output submission queue, the first transmission value includes a second value, the preset value range includes a second preset value range, the second value represents the size of the command received by the input / output submission queue, and the second value exceeds the second preset value range.
[0026] In some embodiments, the storage controller is further configured to: create an IO queue according to a second transfer value, the second transfer value being within a preset value range; and send an indication message indicating successful creation of the IO queue.
[0027] In some embodiments, the second transfer value includes a recommended value from the Non-volatile Memory Host Controller Interface Specification (NVME).
[0028] In some embodiments, the storage controller is further configured to: receive a first configuration command, the first configuration command being used to indicate configuring a second transmission value for the storage controller; and in response to the first configuration command, send an indication message indicating successful configuration of the second transmission value.
[0029] In some embodiments, the storage controller is further configured to: after successfully creating an IO queue, receive a second configuration command, the second configuration command being used to instruct the storage controller to configure a third transfer value; if the third transfer value exceeds a preset value range, ignore the second configuration command.
[0030] In some embodiments, the second configuration command is received by the storage controller during the execution of IO commands based on the IO queue, and the storage controller is further configured to execute the remaining IO commands in the IO command queue based on the IO queue.
[0031] In another aspect, an electronic device is provided, comprising a coupled host and a storage system, the storage system including a storage controller, the host being configured to: send a command to the storage controller to create an input / output I / O queue; the storage controller being configured to: receive the command to create the I / O queue; the storage controller being further configured to: send target indication information to the host when a first transmission value of the I / O queue exceeds a preset value range, the target indication information being used to indicate that the first transmission value is invalid, the first transmission value representing the size of the information received by the I / O queue; the host being further configured to: receive the target indication information.
[0032] In some embodiments, the IO queue includes an input / output completion queue, the first transmission value includes a first numerical value, the preset numerical range includes a first preset numerical range, the first numerical value represents the size of the execution result received by the input / output completion queue, and the first numerical value exceeds the first preset numerical range.
[0033] In some embodiments, the IO queue includes an input / output submission queue, the first transmission value includes a second value, the preset value range includes a second preset value range, the second value represents the size of the command received by the input / output submission queue, and the second value exceeds the second preset value range.
[0034] In some embodiments, the storage controller is further configured to: create an IO queue according to a second transmission value, the second transmission value being within a preset value range; the storage controller is further configured to: send an indication message indicating successful creation of the IO queue to the host; and the host is further configured to: receive the indication message indicating successful creation of the IO queue.
[0035] In some embodiments, the second transfer value includes a recommended value from the Non-volatile Memory Host Controller Interface Specification (NVME).
[0036] In some embodiments, the host is further configured to: send a first configuration command to the storage controller before receiving an indication message indicating successful creation of the IO queue, the first configuration command being used to indicate configuring a second transfer value for the storage controller; the storage controller is further configured to: receive the first configuration command and, in response to the first configuration command, send an indication message indicating successful configuration of the second transfer value to the host; the host is further configured to: receive the indication message indicating successful configuration of the second transfer value.
[0037] In some embodiments, the host is further configured to: after successfully creating the IO queue, send a second configuration command to the storage controller, the second configuration command being used to instruct the storage controller to configure a third transfer value; the storage controller is further configured to: receive the second configuration command, and if the third transfer value exceeds a preset value range, ignore the second configuration command.
[0038] In some embodiments, the host is further configured to send a second configuration command to the storage controller while the storage controller is executing IO commands based on the IO queue; the storage controller is further configured to receive the second configuration command and execute the remaining IO commands in the IO commands based on the IO queue.
[0039] In another aspect, a storage system is provided, including a memory and a storage controller as provided in the foregoing aspects, the storage controller being coupled to the memory for performing the operation methods of the storage controller as provided in the foregoing aspects.
[0040] In another aspect, a computer-readable storage medium is provided, which includes computer instructions that, when executed on a storage controller provided in the foregoing aspects, cause the storage controller provided in the foregoing aspects to perform the operation method of the storage controller provided in the foregoing aspects.
[0041] On another front, a computer program product containing instructions is provided, which, when executed on a memory controller provided in the aforementioned aspects, causes the memory controller provided in the aforementioned aspects to execute the operation methods of the memory controller provided in the aforementioned aspects.
[0042] It is understood that the beneficial effects of the storage controller, storage system and electronic device provided in the above embodiments of this disclosure can be referred to the beneficial effects of the storage controller operation method described above, and will not be repeated here. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in this disclosure, the accompanying drawings used in some embodiments of this disclosure will be briefly described below. Obviously, the drawings described below are only drawings of some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings. In addition, the drawings described below can be regarded as schematic diagrams and are not intended to limit the actual size of the product, the actual flow of the method, the actual timing of the signals, etc. involved in the embodiments of this disclosure.
[0044] Figure 1 This is a schematic diagram of the structure of an electronic device according to some embodiments;
[0045] Figure 2 This is a schematic diagram of the structure of a storage system according to some embodiments;
[0046] Figure 3 This is a schematic diagram of the structure of another storage system according to some embodiments;
[0047] Figure 4 This is a schematic diagram of the structure of a storage controller according to some embodiments;
[0048] Figure 5 This is a schematic diagram of the structure of another electronic device according to some embodiments;
[0049] Figure 6 This is a flowchart illustrating an operation method of a storage controller according to some embodiments;
[0050] Figure 7 This is a flowchart illustrating another method of operating a storage controller according to some embodiments;
[0051] Figure 8 This is a flowchart illustrating another method of operating a storage controller according to some embodiments. Detailed Implementation
[0052] The technical solutions in some embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments provided in this disclosure are within the scope of protection of this disclosure.
[0053] Unless the context otherwise requires, throughout the specification and claims, the term "comprising" is interpreted as open-ended and encompassing, meaning "including, but not limited to." In the description of the specification, terms such as "one embodiment," "some embodiments," "exemplary embodiment," "exemplary," or "some examples," etc., are intended to indicate that a particular feature, structure, material, or characteristic associated with that embodiment or example is included in at least one embodiment or example of this disclosure. The illustrative representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics mentioned may be included in any suitable manner in any one or more embodiments or examples.
[0054] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more.
[0055] The use of “applies to” or “configured to” in this article implies an open and inclusive language that does not preclude applicability to or configuration to devices that perform additional tasks or steps.
[0056] In addition, the use of “based on” implies openness and inclusivity, because processes, steps, calculations or other actions “based on” one or more of the stated conditions or values may in practice be based on additional conditions or values beyond those stated.
[0057] Before introducing the embodiments of this disclosure, we will first introduce and explain the relevant knowledge of the nonvolatile memory host controller interface specification (NVMHCIS) (NVMe).
[0058] As a command and application layer protocol, NVMe is theoretically compatible with any interface protocol, and is typically matched with the high-speed serial computer expansion bus standard (peripheral component interconnect express, PCIe) interface.
[0059] NVMe is a logical device interface specification that defines the command and data formats for communication between a solid-state drive (SSD) and a host. For example, NVMe can define the input / output completion queue entry size (IOCQES) and input / output submission queue entry size (IOSQES) of the controller within the SSD. IOCQES represents the size of the execution results from the SSD that the input / output completion queue (IOCQ) can receive; it can include a maximum and a minimum value. IOSQES represents the size of the commands sent by the host that the input / output submission queue (IOSQ) can receive; it can also include a maximum and a minimum value. It should be noted that the maximum value in the above queues (including IOCQ and IOSQ) is the maximum value that the controller can support, and the minimum value is the minimum value that the controller can support.
[0060] Typically, SSDs and hosts can perform I / O operations, such as exchanging data or commands, through queues (including IOCQ and IOSQ). According to the NVMe protocol, the SSD maintains head and tail pointers for multiple queues, and both the SSD and the host update these pointers. For example, the host inserts a command into the tail of an IOSQ and updates its tail pointer. The SSD compares the head and tail pointers of the IOSQ; if they differ, it determines that there is a command to be processed in the IOSQ. The SSD then retrieves the command from the head of the IOSQ and updates its head pointer. Based on the head and tail pointers, the host can determine if there is space in the IOSQ to accommodate the new command. The SSD executes the command and inserts the execution result into the tail of the IOCQ, and updates the tail pointer of the IOCQ. When the host receives an interrupt notification from the SSD, it means that there is a new execution result in the IOCQ. The host retrieves the execution result from the head of the IOCQ and updates the head pointer of the IOCQ. Based on the head pointer and tail pointer of the IOCQ, the SSD can determine whether there is space in the IOCQ to accommodate the new execution result.
[0061] Currently, when creating an IO queue, if the IOCQES and / or IOSQES fields of the SSD controller are configured by the host to a value that exceeds the maximum value that the controller can support or is lower than the minimum value that the controller can support, the NVMe protocol does not explicitly specify whether subsequent IO services will be affected. Furthermore, after an IO service fails, the SSD cannot clearly inform the host that the IOCQES and IOSQES fields of the controller are configured incorrectly.
[0062] Based on this, embodiments of this disclosure provide an operation method for a storage system, a storage system, and an electronic device to improve the storage controller's ability to handle error information, i.e., to improve the performance of the storage controller. The system can be an electronic device, and the structure of the electronic device will be described below.
[0063] Embodiments of this disclosure provide an electronic device, such as any of the following: mobile phone, desktop computer, tablet computer, laptop computer, server, in-vehicle equipment, wearable device (e.g., smartwatch, smart bracelet, smart glasses, etc.), power bank, game console, digital multimedia player, etc. See also Figure 1 , Figure 1 The diagram illustrates an electronic device 10 provided in an embodiment of this disclosure, including a host 100 and a storage system 110. The host 100 is coupled to the storage system 110 to write data to or read data stored in the storage system 110. The host 100 is also referred to as a master device, and the storage system 110 is also referred to as a slave device. In an electronic device, a slave device can be accessed by different master devices. For example, taking a mobile phone as an example, the central processing unit (CPU) and digital signal processor (DSP) of the mobile phone can all act as the host 100 to access the storage system 110.
[0064] For example, see Figure 2 , Figure 2 A schematic diagram of a storage system 110 provided in an embodiment of the present disclosure is shown. The storage system 110 includes a storage controller 111 and a memory 112. The storage controller 111 is coupled to the memory 112 to control the memory 112 to store data.
[0065] The memory 112 can be a two-dimensional (2D) memory or a three-dimensional (3D) memory. The memory 112 can be the NAND flash memory provided above. For example, the memory 112 can be a single-level cell (SLC) flash memory, a multi-level cell (MLC) flash memory, a triple-level cell (TLC) flash memory, or a quad-level cell (QLC) flash memory, etc., in NAND flash memory.
[0066] Storage system 110 can be integrated into various types of storage devices, for example, included in the same package (e.g., a universal flash storage (UFS) package or an embedded multimedia card (eMMC) package). That is, storage system 110 can be applied to and packaged into different types of electronic products, such as mobile phones (e.g., cell phones), desktop computers, tablets, laptops, servers, in-vehicle devices, game consoles, printers, positioning devices, wearable devices, smart sensors, power banks, virtual reality (VR) devices, augmented reality (AR) devices, or any other suitable electronic device that incorporates storage.
[0067] In some embodiments, the storage system 110 includes a storage controller 111 and a memory 112, such as Figure 2 As shown. Storage system 110 can be integrated into a memory card. The memory card includes any of the following: Personal Computer Memory Card International Association (PCMCIA) card (abbreviated as PC card), compact flash (CF) card, smart media (SM) card, memory stick, multimedia card (MMC), secure digital memory card (SD card), or UFS.
[0068] In other embodiments, see Figure 3 The storage system 110 includes a storage controller 111 and multiple memories 112, such as... Figure 3 As shown. The storage system 110 is integrated into a solid-state drive (SSD).
[0069] In some embodiments of the storage system 110, the storage controller 111 is configured to operate in a low duty cycle environment, such as an SD card, CF card, Universal Serial Bus (USB) flash drive, or other media used in electronic devices such as personal calculators, digital cameras, and mobile phones.
[0070] In other embodiments, the storage controller 111 is configured to operate in a high duty cycle environment in an SSD or eMMC, which is used as data storage for mobile devices such as smartphones, tablets, and laptops, as well as enterprise storage arrays.
[0071] In some embodiments, the storage controller 111 may be configured to manage data stored in the memory 112 and to communicate with an external device (e.g., host 100). In some embodiments, the storage controller 111 may also be configured to control operations of the memory 112, such as read, erase, and program operations. In some embodiments, the storage controller 111 may also be configured to manage various functions relating to data stored or to be stored in the memory 112, including at least one of bad block management, garbage collection (GC), logical-to-physical address translation, and wear leveling. In some embodiments, the storage controller 111 is also configured to process error correction codes relating to data read from or written to the memory 112.
[0072] Of course, the storage controller 111 can also be configured to perform any other suitable function. For example, in this embodiment of the disclosure, the storage controller 111 can also be configured to receive commands to create input / output (IO) queues and to send indications that the size of the information received by the IO queue is invalid.
[0073] Furthermore, the storage controller 111 can communicate with external devices (e.g., host 100) via at least one of various interface protocols. For example, the storage controller 111 can communicate with host 100 via NVMe.
[0074] It should be noted that the interface protocols also include at least one of the following: Universal Serial Bus (USB) protocol, Microsoft Management Console (MMC) protocol, Peripheral Component Interconnect (PCI) protocol, Peripheral Component Interconnect Express (PCI-E) protocol, Advanced Technology Attachment (ATA) protocol, Serial ATA protocol, Parallel ATA protocol, Small Computer System Interface (SCSI) protocol, Enhanced Small Disk Interface (ESDI) protocol, Integrated Drive Electronics (IDE) protocol, and FireWire protocol.
[0075] For example, see Figure 4 , Figure 4 A schematic diagram of the structure of a storage controller 111 provided in an embodiment of the present disclosure is shown. The storage controller 111 includes a front-end module, a main body and a back-end module, and the hardware modules are interconnected through a bus.
[0076] The front-end module communicates with the host, for example, as follows: Figure 5 As shown, the front-end module's front-end interface (I / F) communicates with the host via an interface protocol (e.g., NVMe) to receive commands or data sent by the host. The front-end module may also include a buffer and an accelerator. The buffer can be used to store commands or data sent by the host. The accelerator can be used to accelerate the hardware and improve the performance of the storage controller.
[0077] The backend module communicates with the memory, for example, such as... Figure 5 As shown, the back-end module's back-end interface (I / F) communicates with the NAND flash memory via an interface protocol to read or store data in the NAND. The back-end module may also include an error correction engine and a flash memory controller. The error correction engine is used to implement error correction functionality. The flash memory controller is used to read and write data in the NAND according to the back-end module's interface protocol.
[0078] like Figure 4As shown, the main body includes a processor and memory that works in conjunction with the processor to perform related calculations. The processor may include a central processing unit (CPU). The CPU is responsible for calculations and system scheduling. For example, the CPU runs firmware to implement the functions of various hardware modules in the storage controller 111, such as writing and reading data from the host to the NAND flash memory, and other background operations.
[0079] like Figure 4 As shown, the memory may include read-only memory (ROM) and tightly coupled memory (TCM). TCM can be used to store related programs in the firmware.
[0080] Firmware is essentially embedded software, that is, a program running in the storage controller 111. For example, firmware includes the operation methods of the storage controller and the system provided in the embodiments of this disclosure.
[0081] The flash translation layer (FTL) is a core component of the firmware. Its main task is to map the host (or user) logical address space to the NAND physical address space. For example, the FTL allocates a flash memory space for each received data and writes the data into the corresponding flash memory space through the interface of the backend module based on the address of the allocated flash memory space. It also handles tasks such as garbage collection, wear leveling, bad block management, read interference management, data retention management, and error handling.
[0082] The following is based on Figure 4 The storage controller shown illustrates an embodiment of this disclosure that provides a method for operating a storage controller. (See also...) Figure 6 , Figure 6 The diagram illustrates a flowchart of an operation method for a storage controller provided in an embodiment of this disclosure. The operation method for a storage controller provided in an embodiment of this disclosure may include the following steps:
[0083] S601, The host sends a command to the storage controller to create an input / output IO queue.
[0084] The IO queue can include IOCQ and IOSQ.
[0085] It should be noted that the order of creating IO queues is the reverse of the order of deleting IO queues. For example, when creating a queue, create IOCQ first, then create IOSQ; when deleting an IO queue, delete IOSQ first, then delete IOCQ.
[0086] Since IO queues can include two different scenarios, and the commands sent differ depending on the queue, the two scenarios will be described below.
[0087] In the first possible embodiment, the IO queue is IOCQ, for example, such as Figure 7 As shown in step S601a, in S601a, the host sends a command to the storage controller to create an IOCQ.
[0088] In the second possible embodiment, the IO queue is IOSQ, for example, such as Figure 8 As shown in step S601b, in S601b, the host sends a command to the storage controller to create an IOSQ.
[0089] S602, The storage controller receives a command to create an IO queue.
[0090] Since IO queues can include two different scenarios, and the commands received differ depending on the queue, the two scenarios will be described below.
[0091] In the first possible embodiment, the IO queue is an IOCQ, and the storage controller receives a command from the host to create an IOCQ queue. For example, such as... Figure 7 As shown in step S602a, in S602a, the storage controller receives the command to create an IOCQ.
[0092] In the second possible embodiment, the IO queue is an IOSQ, and the storage controller receives a command from the host to create an IOSQ queue. For example, such as... Figure 8 As shown in step S602b, in S602b, the storage controller receives the command to create an IOSQ.
[0093] In a second possible embodiment, before step S602b, the host sends a command to the storage controller to create an IOCQ. The storage controller receives the command and responds by sending an indication message to the host indicating successful IOCQ creation. For example, as shown... Figure 8 In step S801, the host sends a command to the storage controller to create an IOCQ; S802, the storage controller receives the command to create an IOCQ; S803, the storage controller sends an indication message to the host that the IOCQ has been successfully created.
[0094] like Figure 6 As shown, the operation method of the storage controller provided in the embodiments of this disclosure further includes:
[0095] S603. When the first transmission value of the IO queue exceeds the preset value range, the storage controller sends a target indication message to the host. The target indication message is used to indicate that the first transmission value is invalid. The first transmission value represents the size of the information received by the IO queue.
[0096] The first transmitted value includes a first numerical value and a second numerical value. The first numerical value represents the size of the execution result sent by the SSD and received by IOCQ, which is the result of the storage controller executing the IO command sent by the host; the second numerical value represents the size of the command sent by the host and received by IOSQ, which includes IO commands.
[0097] Additionally, the first transmission value is configured by the host. For example, before step S601, the host sends a zeroth configuration command to the storage controller. This zeroth configuration command instructs the storage controller to configure the first transmission value. The storage controller receives the zeroth configuration command and, in response, sends an indication message to the host indicating successful configuration of the first transmission value. For example, as shown... Figure 7 and Figure 8 As shown, the operation method of the storage controller provided in the embodiments of this disclosure further includes:
[0098] S604. The host sends a zeroth configuration command to the storage controller. The zeroth configuration command is used to instruct the storage controller to configure a first transfer value.
[0099] S605, The storage controller receives the zeroth configuration command and responds to the zeroth configuration command.
[0100] S606, The storage controller sends an indication message to the host indicating that the first transmission value has been successfully configured.
[0101] In addition, the preset value range includes a first preset value range and a second preset value range. The first preset value range is the range encompassed by the maximum and minimum values of IOCQES defined in NVMe; the second preset value range is the range encompassed by the maximum and minimum values of IOSQES defined in NVMe.
[0102] Since the IO queue can include two different situations, the target indication information is different depending on the queue. The target indication information in the two different situations will be explained below.
[0103] In a first possible embodiment, the IO queue is an IOCQ, the first transmitted value includes a first numerical value, a preset numerical range includes a first preset numerical range, the first numerical value represents the size of the execution result received by the IOCQ, and target indication information is used to indicate that the first numerical value exceeds the first preset numerical range. For example, the first preset range is 16 bytes to 64 bytes, and the first numerical value is 128 bytes. For example, such as... Figure 7As shown in S603a, when the first value exceeds the first preset value range, the storage controller sends target indication information to the host. The target indication information is used to indicate that the first value is invalid.
[0104] In a second possible embodiment, the IO queue is IOSQ, the first transmission value includes a second value, a preset value range includes a second preset value range, the second value represents the size of the command received by the IOSQ, and target indication information is used to indicate that the second value exceeds the second preset value range. For example, the first preset range is 64 bytes to 128 bytes, and the first value is 16 bytes. For example, as shown... Figure 8 As shown in S603b, when the second value exceeds the range of the second preset value, the storage controller sends target indication information to the host. The target indication information is used to indicate that the second value is invalid.
[0105] like Figure 6 As shown, the operation method of the storage controller provided in the embodiments of this disclosure may further include:
[0106] S607, The host receives the target indication information.
[0107] In one possible embodiment, such as Figure 7 As shown, the operation method of the storage controller provided in the embodiments of this disclosure may further include:
[0108] S608, The storage controller creates an IO queue according to the second transfer value, which is within a preset value range.
[0109] S609. The storage controller sends an indication message to the host that the IO queue has been successfully created.
[0110] In some possible embodiments, the second parameter value may include a recommended value in the NVMe, which is within a preset numerical range. This recommended value may be pre-set and stored in the corresponding memory, such as NAND. Specifically, the recommended value may be stored in the `submissionsqueueentrysize` (SQES) field and the `completionqueueentrysize` (CQES) field of the `identifycontrollerdatastructure`.
[0111] In other possible embodiments, the second transmission value may be reconfigured by the host to the storage controller. For example, before step S608, the host sends a first configuration command to the storage controller, which instructs the host to configure the second transmission value for the storage controller. The storage configures the second transmission value according to the first configuration command and sends an indication message to the host indicating that the second transmission value has been successfully configured. For example, as shown... Figure 7 As shown, and prior to step S608, the operation method of the storage controller provided in the embodiments of this disclosure further includes:
[0112] S610, The host sends a first configuration command to the storage controller, the first configuration command being used to instruct the storage controller to configure a second transmission value.
[0113] Specifically, the first configuration command is used to instruct the storage controller to configure a second transfer value for IOCQES and IOSQES.
[0114] S611. The storage controller receives the first configuration command and, in response to the first configuration command, sends an indication message to the host indicating that the second transmission value has been successfully configured.
[0115] S612, The host receives an indication message indicating that the second transmission value has been successfully configured.
[0116] Since IO queues can include two different scenarios, the process of creating queues using the second transmission value will be explained below when IO queues include different queues.
[0117] In the first possible embodiment, such as Figure 7 As shown, the IO queue is IOCQ. Creating an IO queue according to the second transmission value includes creating an IOCQ according to the second transmission value and creating an IOSQ according to the second transmission value. An indication message indicating successful creation of the IO queue is sent. The indication message is used to indicate successful creation of both the IOCQ and IOSQ.
[0118] In the second possible embodiment, the IO queue is an IOSQ, and creating the IO queue according to the second transmission value only includes creating the IOSQ according to the second transmission value and sending an indication message indicating successful IOSQ creation. For example, as... Figure 8 As shown, the operation method of the storage controller provided in the embodiments of this disclosure further includes:
[0119] S608b, the storage controller creates an IOSQ according to the second transfer value.
[0120] S609b: The storage controller sends an indication message to the host indicating that IOSQ has been successfully created.
[0121] In one possible implementation, after successfully creating the IO queue, but before the Host sends an IO command to the storage controller (i.e., before IO service has started between the Host and the storage controller), if the Host sends a second configuration command to the storage controller, the second configuration command instructs the storage controller to configure a third transmission value exceeding a preset range. The storage controller ignores the second configuration command and executes subsequent IO services using the IO queue created in step S608. For example, as shown... Figure 7 As shown, the operation method of the storage controller provided in the embodiments of this disclosure further includes:
[0122] S613. The host sends a second configuration command to the storage controller, which is used to instruct the storage controller to configure a third transfer value.
[0123] S614. The storage controller receives the second configuration command. If the third transmitted value exceeds the preset value range, the second configuration command is ignored.
[0124] In one possible implementation, after successfully creating the IO queue and the host sends an IO command to the storage controller (i.e., the storage controller executes the IO command based on the IO queue created in step S608), if the host sends a second configuration command to the storage controller during this process, the storage controller ignores the second configuration command and continues to execute the remaining IO commands in the IO command list using the IO queue created in step S608. For example, as shown... Figure 7 As shown, after step S614, the operation method of the storage controller provided in the embodiments of this disclosure further includes:
[0125] S615. The host sends a second configuration command to the storage controller during the process of the storage controller executing IO commands based on the IO queue.
[0126] S616, The storage controller receives the second configuration command and executes the remaining IO commands in the IO command queue.
[0127] Embodiments of this disclosure also provide a storage controller, such as those described in the foregoing examples. Figure 4 The storage controller 111 is shown in the figure.
[0128] In one possible implementation of this application, the storage controller is configured to: receive a command to create an IO queue; and when the first transmission value of the IO queue exceeds a preset value range, send target indication information, the target indication information being used to indicate that the first transmission value is invalid, the first transmission value representing the size of the information received by the IO queue.
[0129] In one possible implementation of this application, the IO queue includes an input / output completion queue (IOCQ), the first transmission value includes a first numerical value, the preset numerical range includes a first preset numerical range, the first numerical value represents the size of the execution result received by the IOCQ, and the first numerical value exceeds the first preset numerical range.
[0130] In one possible implementation of this application, the IO queue includes an input / output submission queue IOSQ, the first transmission value includes a second value, the preset value range includes a second preset value range, the second value represents the size of the command received by the IOSQ, and the second value exceeds the second preset value range.
[0131] In one possible implementation of this application, the storage controller is further configured to: create an IO queue according to a second transmission value, wherein the second transmission value is within a preset value range; and send an indication message indicating successful creation of the IO queue.
[0132] In one possible implementation of this application, the second transmission value includes a recommended value from the Non-volatile Memory Host Controller Interface Specification (NVME).
[0133] In one possible implementation of this application, the storage controller is further configured to: receive a first configuration command, the first configuration command being used to instruct the storage controller to configure a second transmission value; and in response to the first configuration command, send an indication message indicating successful configuration of the second transmission value.
[0134] In one possible implementation of this application, the storage controller is further configured to: after successfully creating an IO queue, receive a second configuration command, the second configuration command being used to instruct the storage controller to configure a third transmission value; if the third transmission value exceeds a preset value range, ignore the second configuration command.
[0135] In one possible implementation of this application, the second configuration command is received by the storage controller during the execution of IO commands based on the IO queue, and the storage controller is further configured to execute the remaining IO commands in the IO commands based on the IO queue.
[0136] Embodiments of this disclosure also provide an electronic device, the system including a coupled host and a storage system, such as those described in the foregoing examples. Figure 2 , Figure 3 and Figure 5 The storage system 110 shown includes a memory 112 and a storage controller 111 provided in the above example. The storage controller 111 is coupled to the memory 112 to write data to or read data stored in the memory 112.
[0137] In one possible implementation of this application, the host is configured to: send a command to the storage controller to create an input / output IO queue; the storage controller is configured to: receive the command to create the IO queue; the storage controller is further configured to: send target indication information to the host when the first transmission value of the IO queue exceeds a preset value range, the target indication information being used to indicate that the first transmission value is invalid, the first transmission value representing the size of the information received by the IO queue; the host is further configured to: receive the target indication information.
[0138] In one possible implementation of this application, the IO queue includes an input / output completion queue (IOCQ), the first transmission value includes a first numerical value, the preset numerical range includes a first preset numerical range, the first numerical value represents the size of the execution result received by the IOCQ, and the first numerical value exceeds the first preset numerical range.
[0139] In one possible implementation of this application, the IO queue includes an input / output submission queue IOSQ, the first transmission value includes a second value, the preset value range includes a second preset value range, the second value represents the size of the command received by the IOSQ, and the second value exceeds the second preset value range.
[0140] In one possible implementation of this application, the storage controller is further configured to: create an IO queue according to a second transmission value, the second transmission value being within a preset value range; the storage controller is further configured to: send an indication message indicating successful creation of the IO queue to the host; and the host is further configured to: receive the indication message indicating successful creation of the IO queue.
[0141] In one possible implementation of this application, the second transmission value includes a recommended value from the Non-volatile Memory Host Controller Interface Specification (NVME).
[0142] In one possible implementation of this application, the host is further configured to: send a first configuration command to the storage controller before receiving an indication message indicating successful creation of the IO queue, the first configuration command being used to indicate configuring a second transmission value for the storage controller; the storage controller is further configured to: receive the first configuration command and, in response to the first configuration command, send an indication message indicating successful configuration of the second transmission value to the host; the host is further configured to: receive the indication message indicating successful configuration of the second transmission value.
[0143] In one possible implementation of this application, the host is further configured to: after successfully creating the IO queue, send a second configuration command to the storage controller, the second configuration command being used to instruct the storage controller to configure a third transmission value; the storage controller is further configured to: receive the second configuration command, and if the third transmission value exceeds a preset value range, ignore the second configuration command.
[0144] In one possible implementation of this application, the host is further configured to: send a second configuration command to the storage controller during the execution of IO commands based on the IO queue; the storage controller is further configured to: receive the second configuration command and execute the remaining IO commands in the IO commands based on the IO queue.
[0145] Embodiments of this disclosure also provide a storage system, such as the one described in the foregoing examples. Figure 2 , Figure 3 and Figure 4 The storage system 110 shown includes a memory 112 and a storage controller 111 provided in the above example. The storage controller 111 is coupled to the memory 112 to write data to or read data stored in the memory.
[0146] Embodiments of this disclosure also provide an electronic device, such as those described in the foregoing examples. Figure 1 The electronic device 10 shown includes a host 100 and a storage system 110 provided in the aforementioned embodiments. The host 100 is connected to the storage system 110 to write data to or read data stored in the storage system.
[0147] Embodiments of this disclosure also provide a computer-readable storage medium including computer instructions that, when executed on a storage controller provided in the foregoing embodiments, cause the storage controller to perform the operation method of the storage system provided in the embodiments of this disclosure.
[0148] Embodiments of this disclosure also provide a computer program product containing instructions that, when run on a storage controller provided in the foregoing embodiments, cause the storage controller to perform the storage system operation method provided in the embodiments of this disclosure.
[0149] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for operating a storage controller, characterized in that, The method includes: Receive commands to create input / output I / O queues; When the first transmission value of the IO queue exceeds a preset value range, a target indication message is sent. The target indication message is used to indicate that the first transmission value is invalid. The first transmission value represents the size of the information received by the IO queue. The method further includes: creating the IO queue according to a second transmission value, wherein the second transmission value is within the preset value range; and sending an indication message indicating successful creation of the IO queue. After successfully creating the IO queue, the method further includes: receiving a second configuration command, the second configuration command being used to instruct the storage controller to configure a third transmission value; if the third transmission value exceeds the preset value range, the second configuration command is ignored.
2. The method according to claim 1, characterized in that, The IO queue includes an input / output completion queue, the first transmission value includes a first numerical value, the preset numerical range includes a first preset numerical range, the first numerical value represents the size of the execution result received by the input / output completion queue, and the first numerical value exceeds the first preset numerical range.
3. The method according to claim 1, characterized in that, The IO queue includes an input / output submission queue, the first transmission value includes a second value, the preset value range includes a second preset value range, the second value represents the size of the command received by the input / output submission queue, and the second value exceeds the second preset value range.
4. The method according to any one of claims 1-3, characterized in that, The second transmission value includes the recommended value in the Non-Volatile Memory Host Controller Interface Specification (NVMe).
5. The method according to any one of claims 1-3, characterized in that, The method further includes: Receive a first configuration command, the first configuration command being used to instruct the storage controller to configure the second transmission value; In response to the first configuration command, an indication message indicating successful configuration of the second transmission value is sent.
6. The method according to any one of claims 1-3, characterized in that, The second configuration command is received by the storage controller during the execution of I / O commands based on the I / O queue, and the method further includes: The remaining IO commands in the IO command list are executed based on the IO queue.
7. A method for operating an electronic device, characterized in that, The electronic device includes a coupled host and a storage system, the storage system including a storage controller, and the method includes: The host sends a command to the storage controller to create an input / output I / O queue; The storage controller receives a command to create the IO queue; When the first transmission value of the IO queue exceeds a preset value range, the storage controller sends target indication information to the host. The target indication information is used to indicate that the first transmission value is invalid. The first transmission value represents the size of the information received by the IO queue. The host receives the target indication information; The method further includes: the storage controller creating the IO queue according to a second transmission value, wherein the second transmission value is within the preset value range; the storage controller sending an indication message indicating successful creation of the IO queue to the host; and the host receiving the indication message indicating successful creation of the IO queue. After successfully creating the IO queue, the method further includes: the host sending a second configuration command to the storage controller, the second configuration command being used to instruct the storage controller to configure a third transmission value; the storage controller receiving the second configuration command, and ignoring the second configuration command if the third transmission value exceeds the preset value range.
8. The method according to claim 7, characterized in that, The IO queue includes an input / output completion queue, the first transmission value includes a first numerical value, the preset numerical range includes a first preset numerical range, the first numerical value represents the size of the execution result received by the input / output completion queue, and the first numerical value exceeds the first preset numerical range.
9. The method according to claim 7, characterized in that, The IO queue includes an input / output submission queue, the first transmission value includes a second value, the preset value range includes a second preset value range, the second value represents the size of the command received by the input / output submission queue, and the second value exceeds the second preset value range.
10. The method according to any one of claims 7-9, characterized in that, The second transmission value includes the recommended value in the Non-volatile Memory Host Controller Interface Specification (NVME).
11. The method according to any one of claims 7-9, characterized in that, Before the host receives the indication that the IO queue has been successfully created, the method further includes: The host sends a first configuration command to the storage controller, the first configuration command being used to instruct the storage controller to configure the second transmission value; The storage controller receives the first configuration command and, in response to the first configuration command, sends an indication message to the host indicating that the second transmission value has been successfully configured. The host receives an indication message indicating that the second transmission value has been successfully configured.
12. The method according to any one of claims 7-9, characterized in that, The method further includes: During the process of the storage controller executing IO commands based on the IO queue, the host sends the second configuration command to the storage controller; The storage controller receives the second configuration command and executes the remaining IO commands in the IO command queue.
13. A storage controller, characterized in that, The storage controller is configured as follows: Receive commands to create input / output I / O queues; When the first transmission value of the IO queue exceeds a preset value range, a target indication message is sent. The target indication message is used to indicate that the first transmission value is invalid. The first transmission value represents the size of the information received by the IO queue. The IO queue is created according to a second transmission value, wherein the second transmission value is within the preset value range; Send an indication message indicating that the IO queue has been successfully created; After successfully creating the IO queue, the storage controller is further configured to: receive a second configuration command, which instructs the storage controller to configure a third transmission value; if the third transmission value exceeds the preset value range, the second configuration command is ignored.
14. An electronic device, characterized in that, The electronic device includes a coupled host and a storage system, the storage system including a storage controller. The host is configured to send a command to the storage controller to create an input / output I / O queue; The storage controller is configured to receive a command to create the IO queue; The storage controller is further configured to: when the first transmission value of the IO queue exceeds a preset value range, send target indication information to the host, the target indication information being used to indicate that the first transmission value is invalid, the first transmission value representing the size of the information received by the IO queue; The host is also configured to receive the target indication information; The storage controller is further configured to: create the IO queue according to a second transmission value, the second transmission value being within the preset value range; and send an indication message to the host indicating that the IO queue has been successfully created. The host is also configured to: receive an indication that the IO queue has been successfully created; and, after the IO queue has been successfully created, send a second configuration command to the storage controller, the second configuration command being used to instruct the storage controller to configure a third transmission value; The storage controller is further configured to: receive the second configuration command, and if the third transmission value exceeds the preset value range, ignore the second configuration command.
15. The electronic device according to claim 14, characterized in that, The IO queue includes an input / output completion queue, the first transmission value includes a first numerical value, the preset numerical range includes a first preset numerical range, the first numerical value represents the size of the execution result received by the input / output completion queue, and the first numerical value exceeds the first preset numerical range.
16. The electronic device according to claim 14, characterized in that, The IO queue includes an input / output submission queue, the first transmission value includes a second value, the preset value range includes a second preset value range, the second value represents the size of the command received by the input / output submission queue, and the second value exceeds the second preset value range.
17. The electronic device according to any one of claims 14-16, characterized in that, The second transmission value includes the recommended value in the Non-volatile Memory Host Controller Interface Specification (NVME).
18. The electronic device according to any one of claims 14-16, characterized in that, The host is also configured to: send a first configuration command to the storage controller before receiving an indication message that the IO queue has been successfully created, the first configuration command being used to instruct the storage controller to configure the second transmission value; The storage controller is further configured to: receive the first configuration command, and in response to the first configuration command, send an indication message to the host indicating that the second transmission value has been successfully configured; The host is also configured to receive an indication message indicating that the second transmission value has been successfully configured.
19. The electronic device according to any one of claims 14-16, characterized in that, The host is also configured to send the second configuration command to the storage controller during the process of the storage controller executing an IO command based on the IO queue; The storage controller is also configured to receive the second configuration command and execute the remaining IO commands in the IO command based on the IO queue.
20. A storage system, characterized in that, It includes a memory and a memory controller as claimed in claim 13, the memory controller being coupled to the memory, the memory controller being configured to perform the operation method of the memory controller as claimed in any one of claims 1-6.
Citation Information
Patent Citations
Method of managing input / output(i / o) queues by non-volatile memory express(NVME) controller
US20170083252A1