Operation method of storage controller, storage system and electronic equipment

By detecting and processing invalid transmission values ​​in the IO queue of the storage controller, and sending corresponding instruction information, the problem of insufficient performance of the existing storage controller in processing error information is solved, and the performance of the storage controller and the response to error information are improved. processing capabilities.

CN119336241AActive Publication Date: 2025-01-21YANGTZE MEMORY TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202310907899.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-21
Publication Date
2025-01-21
Estimated Expiration
2043-07-21

AI Technical Summary

Technical Problem

The existing storage controllers have insufficient performance when processing error messages, and cannot effectively process invalid transmission values ​​in the IO queue, affecting the normal execution of subsequent IO services.

Method used

Provides an operating method for a storage controller by receiving a command to create an input/output IO queue, and when the first transmission value of the IO queue exceeds a preset value range, sending target indication information to indicate that the first transmission value is invalid, thereby Improve the storage controller's ability to handle error messages.

Benefits of technology

By sending invalid indication information, the host can determine whether to reconfigure the transmission value and whether to perform subsequent IO services, which improves the performance of the storage controller and its ability to handle error information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336241A_ABST
    Figure CN119336241A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an operation method of a storage controller, a storage system and electronic equipment, relates to the technical field of communication, and aims to improve the performance of the storage controller. The operation method of the storage controller comprises the following steps: receiving a command for creating an input / output (IO) queue; and when the first transmission value of the IO queue exceeds a preset value range, target indication information is sent, the target indication information is used for indicating that the first transmission value is invalid, and the first transmission value represents the size of information received by the IO queue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to an operating method of a storage controller, a storage system, and an electronic device. Background Art

[0002] The nonvolatile memory host controller interface specification (NVMe) is a logical device interface specification that defines the command and data format for communication between a solid state drive (SSD) and a host. As a command layer and application layer protocol, NVMe is theoretically compatible with any interface protocol and is usually used in conjunction with the high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, PCIe) interface. Summary of the invention

[0003] Embodiments of the present disclosure provide an operating method of a storage controller, a storage system, and an electronic device, which relate 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 the present 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; when a first transmission value of the IO queue exceeds a preset numerical range, sending a target indication message, the target indication message being used to indicate that the first transmission value is invalid, the first transmission value representing the size of information received by the IO queue.

[0006] The operating method of the storage controller provided by the embodiment of the present disclosure can send an indication message that the size of information received by the IO queue is invalid when the first transmission value of the IO queue exceeds a preset numerical range. The host receives the indication message and 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, 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 that the size of the information received by the input / output completion queue is invalid is sent, thereby improving the firmware in the storage controller's ability to handle error information, that is, improving the performance of the firmware.

[0008] 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. In the above possible embodiments, when the second transmission value exceeds the second preset range, an indication that the size of the information received by the input / output submission queue is invalid is sent, thereby improving the processing capability of the firmware in the storage controller for error information, that is, improving the performance of the firmware.

[0009] In some embodiments, the method further includes: creating an IO queue according to the second transmission value, the second transmission value being within a preset value range; and sending an indication message of successful creation of the IO queue. In the above possible embodiments, creating the IO queue based on the second transmission value ensures normal execution of subsequent IO services.

[0010] In some embodiments, the second transmission value includes a recommended value in the non-volatile memory host controller interface specification NVMe. In the above possible embodiments, the IO queue is created based on the recommended value in NVMe, which increases the selectivity of the second transmission value.

[0011] In some embodiments, the method further includes: receiving 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, sending indication information indicating that the second transmission value is successfully configured. In the above possible embodiments, the second transmission value is configured by the storage controller, which increases the selectivity of the second transmission value.

[0012] In some embodiments, after the IO queue is successfully created, the method further includes: receiving a second configuration command, the second configuration command being used to instruct to configure a third transmission value for the storage controller; if the third transmission value exceeds a preset value range, ignoring the second configuration command. In the above possible embodiments, the normal execution of subsequent IO services is guaranteed, and the performance of the storage controller is improved.

[0013] In some embodiments, the second configuration command is received by the storage controller during the process of executing the IO command based on the IO queue, and the method further includes: executing the remaining IO commands in the IO command based on the IO queue. In the above possible embodiments, the normal execution of subsequent IO services is guaranteed, and the performance of the storage controller is improved.

[0014] On the other hand, a method for operating an electronic device is provided, the electronic device comprising a coupled host and a storage system, the storage system comprising a storage controller, the method comprising: the host sends a command to the storage controller to create an input / output IO queue; the storage controller receives the command to create the IO queue; when a first transmission value of the IO queue exceeds a preset numerical 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, and the first transmission value represents the size of information received by the IO queue; the host receives the target indication information.

[0015] According to the operating method of the system provided by the embodiment of the present disclosure, when the first transmission value of the IO queue exceeds the preset value range, the storage controller sends an indication message to the host that the size of the information received by the IO queue is invalid. After receiving the indication message, the host can determine whether to reconfigure the transmission value of the information 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 and improving 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 creates an IO queue according to a second transmission value, and the second transmission value is within a preset numerical range; the storage controller sends an indication message of successful creation of the IO queue to the host; and the host receives the indication message of successful creation of the IO queue.

[0019] In some embodiments, the second transmission value includes a recommended value in a non-volatile memory host controller interface specification NVME.

[0020] In some embodiments, before the host receives indication information that the IO queue is successfully created, the method also includes: the host sends a first configuration command to the storage controller, the first configuration command is used to indicate that a second transmission value is configured for the storage controller; the storage controller receives the first configuration command, and in response to the first configuration command, sends indication information that the second transmission value is successfully configured to the host; the host receives the indication information that the second transmission value is successfully configured.

[0021] In some embodiments, after successfully creating the IO queue, the method also includes: the host sends a second configuration command to the storage controller, the second configuration command is used to indicate the configuration of a third transmission value for the storage controller; the storage controller receives the second configuration command, and if the third transmission value exceeds a preset numerical range, ignores the second configuration command.

[0022] In some embodiments, the method further includes: the host sends a second configuration command to the storage controller while the storage controller executes the IO command based on the IO queue; the storage controller receives the second configuration command and executes the remaining IO commands in the IO command based on the IO queue.

[0023] On the other hand, a storage controller is provided, which is configured to: receive a command to create an input / output IO queue; when a first transmission value of the IO queue exceeds a preset numerical range, send target indication information, the target indication information is used to indicate that the first transmission value is invalid, and the first transmission value represents the size of 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 transmission value, where the second transmission value is within a preset numerical range; and send indication information of successful creation of the IO queue.

[0027] In some embodiments, the second transmission value includes a recommended value in a 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 instruct configuration of a second transmission value for the storage controller; and send indication information of successful configuration of the second transmission value in response to the first configuration command.

[0029] In some embodiments, the storage controller is further configured to: after successfully creating the IO queue, receive a second configuration command, the second configuration command being used to instruct configuration of a third transmission value for the storage controller; if the third transmission value exceeds a preset numerical range, ignore the second configuration command.

[0030] In some embodiments, the second configuration command is received by the storage controller during a process of executing IO commands based on the IO queue, and the storage controller is further configured to: execute the remaining IO commands in the IO command based on the IO queue.

[0031] On the other hand, an electronic device is provided, the electronic device comprising a coupled host and a storage system, the storage system comprising a storage controller, the host being configured to: send a command to create an input / output IO queue to the storage controller; the storage controller being configured to: receive a command to create an IO queue; the storage controller being further configured to: send target indication information to the host when a first transmission value of the IO queue exceeds a preset numerical range, the target indication information being used to indicate that the first transmission value is invalid, the first transmission value representing the size of information received by the IO 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, and the second transmission value is within a preset numerical range; the storage controller is further configured to: send an indication message of successful creation of the IO queue to the host; the host is further configured to: receive an indication message of successful creation of the IO queue.

[0035] In some embodiments, the second transmission value includes a recommended value in a non-volatile memory host controller interface specification NVME.

[0036] In some embodiments, the host is further configured to: before receiving indication information of successful creation of the IO queue, send a first configuration command to the storage controller, the first configuration command being used to indicate configuration of 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 indication information of successful configuration of the second transmission value to the host; the host is further configured to: receive indication information of successful configuration of the second transmission 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 transmission value; the storage controller is further configured to: receive the second configuration command, and ignore the second configuration command if the third transmission value exceeds a preset numerical range.

[0038] In some embodiments, the host is further configured to: send a second configuration command to the storage controller while the storage controller executes 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 command based on the IO queue.

[0039] On the other hand, a storage system is provided, including a memory and a storage controller as provided in the aforementioned aspects, wherein the storage controller is coupled to the memory and is used to execute the operation method of the storage controller as provided in the aforementioned aspects.

[0040] On the other hand, a computer-readable storage medium is provided, which includes computer instructions. When the computer instructions are executed on the storage controller provided by the aforementioned aspects, the storage controller provided by the aforementioned aspects executes the operating methods of the storage controller provided by the aforementioned aspects.

[0041] In another aspect, a computer program product comprising instructions is provided. When the computer program product is run on the storage controller provided in the aforementioned aspects, the storage controller provided in the aforementioned aspects executes the operation method of the storage controller provided in the aforementioned aspects.

[0042] It can be understood that the beneficial effects that can be achieved by the storage controller, storage system and electronic device provided by the above embodiments of the present disclosure can refer to the beneficial effects of the operation method of the storage controller mentioned above, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the present disclosure, the following briefly introduces the drawings required to be used in some embodiments of the present disclosure. Obviously, the drawings described below are only drawings of some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can also be obtained based on these drawings. In addition, the drawings described below can be regarded as schematic diagrams, and are not limitations on the actual size of the product involved in the embodiments of the present disclosure, the actual process of the method, the actual timing of the signal, etc.

[0044] Figure 1 is a schematic structural diagram of an electronic device according to some embodiments;

[0045] Figure 2 is a schematic diagram of the structure of a storage system according to some embodiments;

[0046] Figure 3 is a schematic diagram of the structure of another storage system according to some embodiments;

[0047] Figure 4 is a schematic diagram of the structure of a storage controller according to some embodiments;

[0048] Figure 5 is a schematic structural diagram of another electronic device according to some embodiments;

[0049] Figure 6 is a flowchart of an operating method of a storage controller according to some embodiments;

[0050] Figure 7 is a flowchart of another method for operating a storage controller according to some embodiments;

[0051] Figure 8 The present invention is a flowchart of another method for operating a storage controller according to some embodiments. DETAILED DESCRIPTION

[0052] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in some embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments provided by the present disclosure, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present disclosure.

[0053] Unless the context requires otherwise, throughout the specification and claims, the term "including" is to be interpreted as an open, inclusive meaning, that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "exemplarily" or "some examples" and the like are intended to indicate that specific features, structures, materials or characteristics associated with the embodiment or example are included in at least one embodiment or example of the present disclosure. The schematic representation of the above terms does not necessarily refer to the same embodiment or example. In addition, the specific features, structures, materials or characteristics may be included in any one or more embodiments or examples in any appropriate manner.

[0054] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.

[0055] The use of "adapted to" or "configured to" herein is meant to be open and inclusive language that does not exclude devices adapted or configured to perform additional tasks or steps.

[0056] Additionally, the use of “based on” is meant to be open and inclusive, as a process, step, calculation, or other action “based on” one or more stated conditions or values ​​may, in practice, be based on additional conditions or values ​​beyond those stated.

[0057] Before introducing the embodiments of the present disclosure, the relevant knowledge of the non-volatile memory host controller interface specification (NVMHCIS) (NVMe for short) is first introduced and explained.

[0058] As a command layer and application layer protocol, NVMe is theoretically compatible with any interface protocol and is usually 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 format for communication between a solid state disk (SSD) and a host (Host). For example, NVMe can also define the input / output completion queue entry size (IOCQES) and the input / output submission queue entry size (IOSQES) of the controller in the SSD. Among them, IOCQES represents the size of the execution result of the SSD that the input / output completion queue (IOCQ) can receive, which may include a maximum value and a minimum value. IOSQES represents the size of the command sent by the Host that the input / output submission queue (IOSQ) can receive, which may include a maximum value 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] Usually, the SSD and the Host can perform IO services through queues (including IOCQ and IOSQ), such as exchanging data or commands. According to the NVMe protocol, the SSD maintains the head pointer and tail pointer of multiple queues, and both the SSD and the Host will update the head pointer and tail pointer. For example, the Host inserts the sent command into the tail of the IOSQ and updates the tail pointer of the IOSQ. The SSD compares the head pointer and tail pointer of the IOSQ. When the two are different, it determines that there are commands to be processed in the IOSQ. The SSD takes the command from the head of the IOSQ and updates the head pointer of the IOSQ. Based on the head pointer and tail pointer of the IOSQ, the Host can determine whether there is space in the IOSQ to accommodate new commands. The SSD execution command inserts the execution result into the tail of the IOCQ and updates the IOCQ tail pointer. When the Host receives the interrupt notification from the SSD, it indicates that there is a new execution result in the IOCQ. The Host takes 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 exceed the maximum value supported by the controller, or to be lower than the minimum value supported by the controller, the NVMe protocol does not clearly specify whether subsequent IO services will be affected. Moreover, 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, the embodiments of the present disclosure provide a storage system operation method, a storage system and an electronic device, which are used to improve the storage controller's ability to process error information, that is, to improve the performance of the storage controller. The system may be an electronic device, and the structure of the electronic device is first introduced below.

[0063] The embodiments of the present disclosure provide an electronic device, which may be any one of a mobile phone, a desktop computer, a tablet computer, a laptop computer, a server, a vehicle-mounted device, a wearable device (such as a smart watch, a smart bracelet, smart glasses, etc.), a mobile power supply, a game console, a digital multimedia player, etc. Figure 1 , Figure 1 The schematic diagram of the electronic device 10 provided by the embodiment of the present disclosure is shown, which includes a host 100 and a storage system 110. The host 100 and the storage system 110 are coupled to write data to the storage system 110 or read data stored in the storage system 110. The host 100 is also called a master device, and the storage system 110 is also called a slave device. In the electronic device, the slave device can be accessed by different master devices. For example, taking the electronic device as a mobile phone as an example, the central processing unit (CPU) and digital signal processing (DSP) of the mobile phone can all access the storage system 110 as the host 100.

[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 may be a two-dimensional (2-dimension, 2D) memory or a three-dimensional (3-dimension, 3D) memory. The memory 112 may be the NAND flash memory provided above. For example, the memory 112 may be a single-level cell (SLC) flash memory, a multi-level cell (MLC) flash memory, a triple-level cell (TLC) flash memory, and a quad-level cell (QLC) flash memory in the NAND flash memory.

[0066] The storage system 110 may 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, the storage system 110 may be applied to and packaged into different types of electronic products, for example, mobile phones (e.g., cell phones), desktop computers, tablet computers, laptop computers, servers, in-vehicle devices, game consoles, printers, positioning devices, wearable devices, smart sensors, mobile power supplies, virtual reality (VR) devices, augmented reality (AR) devices, or any other suitable electronic devices having storage therein.

[0067] In some embodiments, the storage system 110 includes a storage controller 111 and a memory 112 such as Figure 2 As shown. The storage system 110 may be integrated into a memory card. The memory card includes any one of a personal computer memory card international association (PCMCIA) card (abbreviated as PC card), a compact flash (CF) card, a smart media (SM) card, a memory stick, a multimedia card (MMC), a secure digital memory card (SD) card, or a UFS.

[0068] In other embodiments, see Figure 3 The storage system 110 includes a storage controller 111 and a plurality of memories 112. Figure 3 The storage system 110 is integrated into solid state drives (SSD).

[0069] In the storage system 110, in some embodiments, the storage controller 111 is configured to operate in a low duty cycle environment, such as an SD card, a CF card, a universal serial bus (USB) flash drive, or other media used in electronic devices such as personal computers, digital cameras, mobile phones, etc.

[0070] In other embodiments, the storage controller 111 is configured to operate in a high duty cycle environment SSD or eMMC, which is used for data storage in mobile devices such as smartphones, tablets, laptops, and enterprise storage arrays.

[0071] In some embodiments, the storage controller 111 may be configured to manage data stored in the memory 112 and communicate with an external device (e.g., the 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 regarding 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 conversion, and wear leveling. In some embodiments, the storage controller 111 is also configured to process error correction codes for 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 functions. For example, in the embodiment of the present disclosure, the storage controller 111 can also be configured to receive a command to create an input / output (IO) queue, and to send an indication that the size of information received by the IO queue is invalid.

[0073] In addition, the storage controller 111 can communicate with an external device (eg, the host 100) via at least one of various interface protocols. For example, the storage controller 111 can communicate with the host 100 via NVMe.

[0074] It should be noted that the interface protocol also includes at least one of the universal serial bus (USB) protocol, Microsoft management console (MMC) protocol, peripheral component interconnect (PCI) protocol, PCI high-speed (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 electronic (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. The hardware modules are interconnected through a bus.

[0076] The front-end module communicates with the Host, for example, Figure 5 As shown, the front-end interface (I / F) of the front-end module communicates with the host through 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 may be used to store commands or data sent by the host. The accelerator may be used to accelerate the hardware and improve the performance of the storage controller.

[0077] The backend module communicates with the memory, for example, Figure 5 As shown, the back-end interface (I / F) of the back-end module communicates with the NAND in the memory through an interface protocol to read data from the NAND 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 can be used to implement the error correction function. The flash memory controller is used to implement the reading and writing functions of data in the NAND according to the interface protocol of the back-end module.

[0078] like Figure 4As shown, the main body includes: a processor, and a memory that cooperates with the processor to perform related operations. Among them, the processor may include a central processing unit (CPU). The CPU is responsible for operations and system scheduling. For example, the CPU runs the firmware to implement the related functions of each hardware module in the storage controller 111, for example, to implement the writing, reading and other background operations of data from the Host to the NAND.

[0079] like Figure 4 As shown, the memory may include a read-only memory (ROM) and a tightly coupled memory (TCM). TCM may be used to store related programs in the firmware.

[0080] The firmware is essentially embedded software, that is, a program running in the storage controller 111. For example, the firmware includes an operating method of the storage controller and an operating method of the system provided in the embodiments of the present disclosure.

[0081] The flash translation layer (FTL) is the core component of the firmware. Its main task is to complete the mapping of the logical address space of the host (host or user) to the physical address space of the memory (NAND). For example, the FTL layer will allocate a flash space for each received data, and write the data to the corresponding flash space through the interface of the back-end module based on the address of the allocated flash space. In addition, it will also handle garbage collection, wear leveling, bad block management, read interference management, data retention management, error handling and other tasks.

[0082] The following is based on Figure 4 The storage controller shown in the figure describes an operation method of the storage controller provided by the embodiment of the present disclosure. Figure 6 , Figure 6 A schematic flow chart of an operation method of a storage controller provided by an embodiment of the present disclosure is shown. The operation method of a storage controller provided by an embodiment of the present disclosure may include the following steps:

[0083] S601: The host sends a command to create an input / output IO queue to the storage controller.

[0084] Among them, the IO queue may include IOCQ and IOSQ.

[0085] It should be noted that the order of creating IO queues is opposite to the order of deleting IO queues. For example, when creating a queue, create IOCQ first and then IOSQ; when deleting an IO queue, delete IOSQ first and then IOCQ.

[0086] Since the IO queue can include two different situations, when the queues are different, the commands sent are also different. The two different situations are introduced and explained below.

[0087] In the first possible embodiment, the IO queue is IOCQ, for example, Figure 7 As shown in step S601a in FIG. 5 , S601a, the host sends a command to create an IOCQ to the storage controller.

[0088] In a second possible embodiment, the IO queue is IOSQ, illustratively, as Figure 8 As shown in step S601b in the embodiment, S601b, the host sends a command to create an IOSQ to the storage controller.

[0089] S602: The storage controller receives a command to create an IO queue.

[0090] Since the IO queue can include two different situations, when the queues are different, the received commands are also different. The two situations are introduced and explained below.

[0091] In a 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, Figure 7 As shown in step S602a in FIG. 1 , S602a, the storage controller receives a command to create an IOCQ.

[0092] In a second possible embodiment, the IO queue is IOSQ, and the storage controller receives a command from the Host to create an IOSQ queue. Figure 8 As shown in step S602b in FIG. 1 , S602b, the storage controller receives a command to create an IOSQ.

[0093] In a second possible embodiment, before step S602b, the host sends a command to create an IOCQ to the storage controller, the storage controller receives the command to create the IOCQ, and in response to the command sends an indication message of successful creation of the IOCQ to the host. Figure 8 In step S801, the host sends a command to create an IOCQ to the storage controller; S802, the storage controller receives the command to create the IOCQ; S803, the storage controller sends an indication message of successful creation of the IOCQ to the host.

[0094] like Figure 6 As shown, the operating method of the storage controller provided by the embodiment of the present disclosure also includes:

[0095] S603: When the first transmission value of the IO queue exceeds a preset value range, the storage controller sends target indication information to the host, where the target indication information is used to indicate that the first transmission value is invalid, and the first transmission value represents the size of information received by the IO queue.

[0096] The first transmission value includes a first value and a second value. The first value represents the size of the execution result sent by the SSD received by the IOCQ, and the execution result is the execution result of the storage controller based on the IO command sent by the Host; the second value represents the size of the command sent by the Host received by the IOSQ, and the command includes the IO command.

[0097] In addition, 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, the zeroth configuration command is used to instruct the storage controller to configure the first transmission value, the storage controller receives the zeroth configuration command, responds to the zeroth configuration command, and sends an indication message of successfully configuring the first transmission value to the host. For example, Figure 7 and Figure 8 As shown, the operating method of the storage controller provided by the embodiment of the present disclosure also includes:

[0098] S604: The host sends a zeroth configuration command to the storage controller, where the zeroth configuration command is used to instruct the storage controller to configure a first transmission value.

[0099] S605: The storage controller receives the zeroth configuration command and responds to the zeroth configuration command.

[0100] S606: The storage controller sends indication information of successful configuration of the first transmission value to the host.

[0101] In addition, the preset numerical range includes a first preset numerical range and a second preset numerical range. The first preset numerical range is a range including the maximum value and the minimum value of the IOCQES defined in NVMe; the second preset numerical range is a range including the maximum value and the minimum value of the IOSQES defined in NVMe.

[0102] Since the IO queue may include two different situations, when the queues are different, the target indication information is different. The target indication information in the two different situations is respectively described below.

[0103] In a first possible embodiment, the IO queue is an IOCQ, the first transmission value includes a first value, the preset value range includes a first preset value range, the first value represents the size of the execution result received by the IOCQ, and the target indication information is used to indicate that the first value exceeds the first preset value range. For example, the first preset range is 16 bytes to 64 bytes, and the first value is 128 bytes. For example, Figure 7As shown in S603a in, S603a, when the first value exceeds the first preset value range, the storage controller sends target indication information to the host, and the target indication information is used to indicate that the first value is invalid.

[0104] In a second possible embodiment, the IO queue is an 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 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, Figure 8 As shown in S603b, S603b, when the second value exceeds the second preset value range, the storage controller sends target indication information to the host, and the target indication information is used to indicate that the second value is invalid.

[0105] like Figure 6 As shown, the operating method of the storage controller provided by the embodiment of the present disclosure may also include:

[0106] S607: The host receives target indication information.

[0107] In a possible embodiment, Figure 7 As shown, the operating method of the storage controller provided by the embodiment of the present disclosure may also include:

[0108] S608: The storage controller creates an IO queue according to the second transmission value, where the second transmission value is within a preset value range.

[0109] S609: The storage controller sends an indication message indicating that the IO queue is successfully created to the host.

[0110] In some possible embodiments, the second parameter value may include a recommended value in NVMe, the recommended value is within a preset value range, and the recommended value may be pre-set and stored in a corresponding memory, such as NAND. Specifically, the recommended value may be stored in a submissionsqueueentrysize (SQES) field and a completionqueueentrysize (CQES) field of an identifycontrollerdatastructure.

[0111] In some 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, and the first configuration command is used to instruct the storage controller to configure the second transmission value. The memory configures the second transmission value according to the first configuration command, and sends an indication message of successfully configuring the second transmission value to the host. For example, Figure 7 As shown, and before step S608, the operating method of the storage controller provided by the embodiment of the present disclosure further includes:

[0112] S610. The host sends a first configuration command to the storage controller, where the first configuration command is used to instruct to configure a second transmission value for the storage controller.

[0113] Specifically, the first configuration command is used to instruct the storage controller to configure the second transmission value for IOCQES and IOSQES.

[0114] S611: The storage controller receives a first configuration command, and in response to the first configuration command, sends indication information indicating successful configuration of a second transmission value to the host.

[0115] S612: The host receives indication information indicating successful configuration of the second transmission value.

[0116] Since the IO queue may include two different situations, the process of creating a queue using the second transmission value when the IO queue includes different queues is described below.

[0117] In the first possible embodiment, Figure 7 As shown, the IO queue is an 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, and sending indication information of successful creation of the IO queue, the indication information is used to indicate successful creation of the IOCQ and the IOSQ.

[0118] In a 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 indication information of successfully creating the IOSQ. Figure 8 As shown, the operating method of the storage controller provided by the embodiment of the present disclosure also includes:

[0119] S608b: The storage controller creates an IOSQ according to the second transmission value.

[0120] S609b: The storage controller sends an indication message of successful creation of the IOSQ to the host.

[0121] In a possible implementation, after the IO queue is successfully created, before the host sends an IO command to the storage controller, that is, the IO service between the host and the storage controller has not started, if the host sends a second configuration command to the storage controller, the second configuration command is used to instruct the storage controller to configure a third transmission value that exceeds a preset range, the storage controller ignores the second configuration command, and executes subsequent IO services with the IO queue created in step S608. For example, Figure 7 As shown, the operating method of the storage controller provided by the embodiment of the present disclosure also includes:

[0122] S613: The host sends a second configuration command to the storage controller, where the second configuration command is used to instruct the storage controller to configure a third transmission value.

[0123] S614: The storage controller receives the second configuration command, and ignores the second configuration command if the third transmission value exceeds a preset value range.

[0124] In a possible implementation, after the IO queue is successfully created, the host sends an IO command to the storage controller, that is, the storage controller executes the IO command based on the IO queue created in step S608. During this process, if the host sends a second configuration command to the storage controller, the storage controller ignores the second configuration command and continues to execute the remaining IO commands in the IO command with the IO queue created in step S608. For example, Figure 7 As shown, after step S614, the operating method of the storage controller provided by the embodiment of the present disclosure further includes:

[0125] S615: The host sends a second configuration command to the storage controller while the storage controller is executing the IO command 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 based on the IO queue.

[0127] The embodiment of the present disclosure further provides a storage controller, which may be, for example, the storage controller in the above example. Figure 4 The storage controller 111 is shown in FIG.

[0128] In one possible implementation of the present application, the storage controller is configured to: receive a command to create an IO queue; and when a first transmission value of the IO queue exceeds a preset numerical range, send a target indication message, wherein the target indication message is used to indicate that the first transmission value is invalid, and the first transmission value represents the size of information received by the IO queue.

[0129] In a possible implementation of the present 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 a possible implementation of the present 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 a possible implementation manner of the present application, the storage controller is further configured to: create an IO queue according to a second transmission value, where the second transmission value is within a preset value range; and send indication information of successful creation of the IO queue.

[0132] In a possible implementation manner of the present application, the second transmission value includes a recommended value in a non-volatile memory host controller interface specification NVME.

[0133] In a possible implementation of the present application, the storage controller is further configured to: receive a first configuration command, the first configuration command being used to instruct configuration of a second transmission value for the storage controller; and send indication information of successful configuration of the second transmission value in response to the first configuration command.

[0134] In a possible implementation of the present application, the storage controller is further configured to: after successfully creating the IO queue, receive a second configuration command, the second configuration command being used to instruct configuration of a third transmission value for the storage controller; if the third transmission value exceeds a preset numerical range, ignore the second configuration command.

[0135] In a possible implementation manner of the present application, the second configuration command is received by the storage controller during a process of executing IO commands based on an IO queue, and the storage controller is further configured to: execute remaining IO commands in the IO commands based on the IO queue.

[0136] An embodiment of the present disclosure further provides an electronic device, the system comprising a coupled host and a storage system, for example, the system may be as described in the above example, 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 the memory 112 or read data stored in the memory 112 .

[0137] In a possible implementation of the present 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 also configured to: when the first transmission value of the IO queue exceeds a preset numerical range, send target indication information to the host, the target indication information is used to indicate that the first transmission value is invalid, and the first transmission value represents the size of information received by the IO queue; the host is also configured to: receive the target indication information.

[0138] In a possible implementation of the present 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 a possible implementation of the present 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 a possible implementation of the present application, the storage controller is further configured to: create an IO queue according to a second transmission value, and the second transmission value is within a preset numerical range; the storage controller is further configured to: send an indication message of successfully creating the IO queue to the host; the host is further configured to: receive an indication message of successfully creating the IO queue.

[0141] In a possible implementation manner of the present application, the second transmission value includes a recommended value in a non-volatile memory host controller interface specification NVME.

[0142] In a possible implementation of the present application, the host is also configured to: before receiving indication information of successful creation of the IO queue, send a first configuration command to the storage controller, the first configuration command being used to indicate configuration of a second transmission value for the storage controller; the storage controller is also configured to: receive the first configuration command, and in response to the first configuration command, send indication information of successful configuration of the second transmission value to the host; the host is also configured to: receive indication information of successful configuration of the second transmission value.

[0143] In a possible implementation of the present 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 indicate configuration of a third transmission value for the storage controller; the storage controller is further configured to: receive the second configuration command, and ignore the second configuration command if the third transmission value exceeds a preset numerical range.

[0144] In a possible implementation of the present application, the host is further configured to: send a second configuration command to the storage controller during the process of the storage controller executing the IO command 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 command based on the IO queue.

[0145] The embodiment of the present disclosure further provides a storage system, such as the one in the above example, 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 the memory or read data stored in the memory.

[0146] The embodiment of the present disclosure further provides an electronic device, which may be, for example, the electronic device in the above example. Figure 1 The electronic device 10 shown includes a host 100 and a storage system 110 provided by the aforementioned embodiments. The host 100 is connected to the storage system 110 to write data to the storage system 110 or read data stored in the storage system.

[0147] An embodiment of the present disclosure further provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the storage controller provided by the aforementioned embodiments, the storage controller executes the storage system operation method provided by the embodiments of the present disclosure.

[0148] The embodiments of the present disclosure further provide a computer program product comprising instructions. When the computer program product is executed on the storage controller provided by the aforementioned embodiments, the storage controller executes the storage system operation method provided by the embodiments of the present disclosure.

[0149] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for operating a storage controller, characterized in that: The method comprises: Receive commands to create input / output IO queues; When the first transmission value of the IO queue exceeds a preset value range, target indication information is sent, where the target indication information is used to indicate that the first transmission value is invalid, and the first transmission value represents the size of information received by the IO queue.

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 to 3, characterized in that: The method further comprises: Creating the IO queue according to a second transmission value, wherein the second transmission value is within the preset value range; Send an indication that the IO queue is successfully created.

5. The method according to claim 4, characterized in that The second transmission value includes a recommended value in the non-volatile memory host controller interface specification NVMe.

6. The method according to claim 4, characterized in that The method further comprises: receiving a first configuration command, wherein the first configuration command is used to instruct configuration of the second transmission value for the storage controller; In response to the first configuration command, indication information of successfully configuring the second transmission value is sent.

7. The method according to any one of claims 4 to 6, characterized in that: After successfully creating the IO queue, the method further includes: receiving a second configuration command, wherein the second configuration command is used to instruct configuration of a third transmission value for the storage controller; If the third transmission value exceeds the preset value range, the second configuration command is ignored.

8. The method according to claim 7, characterized in that The second configuration command is received by the storage controller in a process of executing an IO command based on the IO queue, and the method further includes: The remaining IO commands in the IO commands are executed based on the IO queue.

9. A method for operating an electronic device, characterized in that: The electronic device comprises a coupled host and a storage system, the storage system comprises a storage controller, and the method comprises: The host sends a command to the storage controller to create an input / output IO 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, wherein the target indication information is used to indicate that the first transmission value is invalid, and the first transmission value represents the size of information received by the IO queue; The host receives the target indication information.

10. The method according to claim 9, 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.

11. The method according to claim 9, 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.

12. The method according to any one of claims 9 to 11, characterized in that: The method further comprises: The storage controller creates the IO queue according to a second transmission value, where the second transmission value is within the preset value range; The storage controller sends indication information of successfully creating the IO queue to the host; The host receives indication information that the IO queue is successfully created.

13. The method according to claim 12, characterized in that The second transmission value includes a recommended value in a non-volatile memory host controller interface specification NVME.

14. The method according to claim 12, characterized in that Before the host receives the indication information of successfully creating the IO queue, the method further includes: The host sends a first configuration command to the storage controller, where the first configuration command is 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 indication information of successfully configuring the second transmission value to the host; The host receives indication information of successful configuration of the second transmission value.

15. The method according to any one of claims 12 to 14, characterized in that: After successfully creating the IO queue, the method further includes: The host sends a second configuration command to the storage controller, where the second configuration command is used to instruct to configure a third transmission value for the storage controller; The storage controller receives the second configuration command, and ignores the second configuration command if the third transmission value exceeds the preset value range.

16. The method according to claim 15, characterized in that The method further comprises: The host sends the second configuration command to the storage controller during the process in which the storage controller executes the IO command based on the IO queue; The storage controller receives the second configuration command, and executes the remaining IO commands in the IO commands based on the IO queue.

17. A storage controller, characterized in that: The storage controller is configured to: Receive commands to create input / output IO queues; When the first transmission value of the IO queue exceeds a preset value range, target indication information is sent, where the target indication information is used to indicate that the first transmission value is invalid, and the first transmission value represents the size of information received by the IO queue.

18. An electronic device, characterized in that: The electronic device includes a coupled host and a storage system, wherein the storage system includes a storage controller. The host is configured to: send a command to create an input / output IO queue to the storage controller; 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 is used to indicate that the first transmission value is invalid, and the first transmission value represents the size of information received by the IO queue; The host is further configured to: receive the target indication information.

19. The electronic device according to claim 18, 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.

20. The electronic device according to claim 18, 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.

21. The electronic device according to any one of claims 18 to 20, characterized in that: The storage controller is further configured to: create the IO queue according to a second transmission value, wherein the second transmission value is within the preset value range; The storage controller is further configured to: send indication information of successfully creating the IO queue to the host; The host is further configured to receive indication information indicating that the IO queue is successfully created.

22. The electronic device according to claim 21, characterized in that: The second transmission value includes a recommended value in a non-volatile memory host controller interface specification NVME.

23. The electronic device according to claim 21, characterized in that: The host is further configured to: before receiving the indication information of successfully creating the IO queue, send a first configuration command to the storage controller, where the first configuration command is used to instruct to configure the 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 indication information of successful configuration of the second transmission value to the host; The host is further configured to: receive indication information of successful configuration of the second transmission value.

24. The electronic device according to any one of claims 21 to 23, characterized in that: The host is further configured to: after successfully creating the IO queue, send a second configuration command to the storage controller, where the second configuration command is used to instruct to configure a third transmission value for the storage controller; The storage controller is further configured to: receive the second configuration command, and if the third transmission value exceeds the preset numerical range, ignore the second configuration command.

25. The electronic device according to claim 24, characterized in that: The host is further configured to: send the second configuration command to the storage controller during the process in which the storage controller executes the IO command 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.

26. A storage system, characterized in that: It comprises a memory and a memory controller as claimed in claim 17, wherein the memory controller is coupled to the memory, and the memory controller is used to execute the operation method of the memory controller as claimed in any one of claims 1-8.

Citation Information

Patent Citations

  • Method, apparatus, and system for energy efficiency and energy conservation including non frame aware frequency selection

    CN104024979A

  • NVME communication system and method based on PCIE interface

    CN115454902A

  • Quality of service management

    US20100106816A1

  • Method of managing input / output(i / o) queues by non-volatile memory express(NVME) controller

    US20170083252A1

  • Completion management

    US20220050629A1