Storage control method, electronic device, host, storage device, and computer-readable storage medium

By adding a white-box module inside the storage device, the host can monitor the processing nodes inside the storage device, solving the problem of the host having difficulty locating the processing nodes and improving system optimization efficiency and user experience.

WO2026066751A1PCT designated stage Publication Date: 2026-04-02HONOR DEVICE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

The host may have difficulty accurately locating the processing nodes inside the storage device, leading to system lag and frame drops, which degrades the user experience.

Method used

By adding a white-box module inside the storage device, the host can monitor the processing nodes inside the storage device and obtain latency information by sending write buffer and read buffer commands, thereby achieving monitoring of the processing nodes inside the storage device.

Benefits of technology

It improves the efficiency and reliability of system optimization, can accurately locate processing nodes that time out, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025113977_02042026_PF_FP_ABST
    Figure CN2025113977_02042026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of storage, and discloses a storage control method, an electronic device, a host, a storage device, and a computer-readable storage medium. The storage control method comprises: a host sends a buffer write instruction to a storage device, the buffer write instruction being used for instructing the storage device to write a white box attribute parameter to a buffer in a memory; in response to the buffer write instruction, the storage device writes the white box attribute parameter to the buffer; the host sends an I / O instruction to the storage device, the I / O instruction being used for instructing the storage device to execute an I / O operation; in response to the I / O instruction, the storage device performs the I / O operation, and writes delay information to the buffer when a delay of the I / O operation is greater than a delay threshold; the host sends a buffer read instruction to the storage device, the buffer read instruction being used for instructing the storage device to read the delay information from the buffer; and in response to the buffer read instruction, the storage device reads the delay information from the buffer and sends a buffer read response message to the host, the buffer read response message comprising the delay information.
Need to check novelty before this filing date? Find Prior Art

Description

Storage control method, electronic device, host, storage device and computer readable storage medium

[0001] Cross-reference to related applications

[0002] This application claims priority to the Chinese patent application No. 202411398150.2, filed on September 30, 2024, and entitled “Storage control method, electronic device, host, storage device and computer readable storage medium”, the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0003] The present application relates to the technical field of storage, in particular to a storage control method, an electronic device, a host, a storage device and a computer readable storage medium. BACKGROUND

[0004] A storage system is usually deployed on an electronic device, and the storage system includes a host and a storage device. The host is used to manage storage and access of data, for example, the host is a system on chip (SoC). For the host, the processing process of an input / output (I / O) request inside the storage device is equivalent to a black box. When the processing time of the I / O request by the storage device is long, problems such as system freezing and frame loss occur, thereby reducing the user experience. Since the host does not know the processing process of the I / O request inside the storage device, it is difficult for the host to accurately locate the processing node that causes the system freezing, thereby making it difficult to effectively implement system optimization. SUMMARY

[0005] In view of this, the embodiments of the present application provide a storage control method, an electronic device, a host, a storage device and a computer readable storage medium, aiming to solve the problem of how to monitor the processing node inside the storage device.

[0006] The first aspect of the embodiment of the present application provides a storage control method applied to an electronic device, the electronic device comprising a host and a storage device in communication with the host, the method comprising: the host sending a write buffer instruction to the storage device, the write buffer instruction being used to instruct the storage device to write a white box attribute parameter into a buffer in the memory; the storage device writing the white box attribute parameter into the buffer in response to the write buffer instruction; the host sending an I / O instruction to the storage device, the I / O instruction being used to instruct the storage device to perform an I / O operation; the storage device performing the I / O operation in response to the I / O instruction, and writing delay information into the buffer when the delay of the I / O operation is greater than a delay threshold; the host sending a read buffer instruction to the storage device, the read buffer instruction being used to instruct the storage device to read the delay information from the buffer; and the storage device reading the delay information from the buffer in response to the read buffer instruction, and sending a read buffer response message to the host, the read buffer response message comprising the delay information.

[0007] In the embodiment, the host instructs the storage device to write the white box attribute parameter into the buffer in the memory by sending the write buffer instruction. The host instructs the storage device to perform the I / O operation by sending the I / O instruction. The storage device performs the I / O operation, and writes the delay information into the buffer in the memory when the delay of the I / O operation is greater than the delay threshold. The host instructs the storage device to read the delay information from the buffer in the memory by sending the read buffer instruction. The storage device feeds back the delay information to the host through the read buffer response message, so that the host can monitor the processing nodes inside the storage device, thereby accurately locating the processing node where the timeout occurs, and improving the efficiency and reliability of system optimization.

[0008] In an embodiment, the write buffer instruction comprises a command description block and a payload. The command description block comprises a mode field, and the value of the mode field is a white box mode flag. The payload comprises white box attribute parameters of a quality of service node and / or a checkpoint to be written.

[0009] In another embodiment, the read buffer instruction comprises a command description block and a payload. The command description block comprises a mode field, and the value of the mode field is a white box mode flag. The payload comprises a header area field, a statistics area field, and a checkpoint or quality of service delay information recording area field, the header area field being used to store key information, the statistics area field being used to store timeout statistical information, and the checkpoint or quality of service delay information recording area field being used to store detailed records of overall quality of service node timeouts and / or detailed records of local checkpoint timeouts.

[0010] In another embodiment, before the host sends the write buffer instruction to the storage device, the method further comprises: the host sends a whitebox query request to the storage device, the whitebox query request is used to request to query whitebox related parameters. The storage device queries the whitebox related parameters in response to the whitebox query request, and sends a whitebox query response message to the host, the whitebox query response message comprises the whitebox related parameters. The host determines whether the storage device supports the whitebox feature according to the whitebox query response message.

[0011] In another embodiment, the method further comprises: the host obtains the whitebox version and / or the size of the maximum whitebox buffer supported by the storage device according to the whitebox query response message.

[0012] In another embodiment, the storage device querying the whitebox related parameters comprises: the storage device queries storage protocol parameters stored in the memory, the storage protocol parameters comprise description parameters, and the description parameters comprise a device descriptor. The device descriptor comprises a feature support field, and the feature support field is used to store features supported by the storage device. The feature support field comprises a whitebox feature bit, and the whitebox feature bit is used to represent that the storage device supports the whitebox feature.

[0013] In another embodiment, the storage device querying the whitebox related parameters comprises: the storage device queries storage protocol parameters stored in the memory, the storage protocol parameters comprise description parameters, and the description parameters comprise a device descriptor. The device descriptor comprises a whitebox version field, and the whitebox version field is used to store a whitebox version supported by the storage device.

[0014] In another embodiment, the storage device querying the whitebox related parameters comprises: the storage device queries storage protocol parameters stored in the memory, the storage protocol parameters comprise description parameters, and the description parameters comprise a geometry descriptor. The geometry descriptor comprises a maximum whitebox buffer size field, and the maximum whitebox buffer size field is used to store the size of the maximum whitebox buffer.

[0015] In another embodiment, before the host sends the write buffer instruction to the storage device, the method further comprises: the host sends a whitebox enable request to the storage device, the whitebox enable request is used to request to enable the whitebox feature. The storage device enables the whitebox feature in response to the whitebox enable request.

[0016] In another embodiment, the storage device enabling the whitebox feature comprises: the storage device sets or modifies storage protocol parameters stored in the memory, the storage protocol parameters comprise a flag parameter, and the flag parameter comprises a whitebox enable field, the whitebox enable field is used to represent whether the whitebox feature is enabled. The storage device setting or modifying the storage protocol parameters comprises: setting a whitebox state flag of the whitebox enable field to an enable flag, and the enable flag is used to represent that the whitebox feature is enabled.

[0017] In another embodiment, the method further comprises: sending, by the host, a whitebox disable request to the storage device, the whitebox disable request being used to request disabling the whitebox feature. In response to the whitebox disable request, disabling, by the storage device, the whitebox feature.

[0018] In another embodiment, the disabling, by the storage device, the whitebox feature comprises: setting or modifying, by the storage device, a storage protocol parameter stored in the memory, the storage protocol parameter comprising a flag parameter, the flag parameter comprising a whitebox enable field, the whitebox enable field being used to represent whether the whitebox feature is enabled. The setting or modifying, by the storage device, the storage protocol parameter comprises: setting a whitebox status flag of the whitebox enable field to a disable flag, the disable flag being used to represent disabling the whitebox feature.

[0019] In another embodiment, before sending, by the host, the write buffer instruction to the storage device, the method further comprises: sending, by the host, a whitebox configuration request to the storage device, the whitebox configuration request being used to request configuring the whitebox operation type. In response to the whitebox configuration request, configuring, by the storage device, the whitebox operation type.

[0020] In another embodiment, the configuring, by the storage device, the whitebox operation type comprises: setting or modifying, by the storage device, a storage protocol parameter stored in the memory, the storage protocol parameter comprising an attribute parameter. The attribute parameter comprises an operation type field, the operation type field being used to store the whitebox operation type. The setting or modifying, by the storage device, the storage protocol parameter comprises: setting an operation type flag of the operation type field to a configure whitebox attribute parameter flag.

[0021] The second aspect of the embodiments of the present application provides a storage control method, applied to a host, the host being in communication with a storage device, and the method comprising: sending a write buffer instruction to the storage device, the write buffer instruction being used to instruct the storage device to write a whitebox attribute parameter to a buffer in a memory; sending an I / O instruction to the storage device, the I / O instruction being used to instruct the storage device to perform an I / O operation; sending a read buffer instruction to the storage device, the read buffer instruction being used to instruct the storage device to read delay information from the buffer; and receiving a read buffer response message from the storage device, the read buffer response message comprising the delay information, the delay information being information written to the buffer when a delay of the I / O operation performed by the storage device is greater than a delay threshold.

[0022] The third aspect of the embodiments of the present application provides a storage control method, applied to a storage device, the storage device being in communication with a host, and the method comprising: in response to a write buffer instruction from the host, writing a whitebox attribute parameter to a buffer in a memory; in response to an I / O instruction from the host, performing an I / O operation, and when a delay of the I / O operation is greater than a delay threshold, writing delay information to the buffer; and in response to a read buffer instruction from the host, reading the delay information from the buffer, and sending a read buffer response message to the host, the read buffer response message comprising the delay information.

[0023] The fourth aspect of the embodiments of the present application provides an electronic device, which comprises a host and a storage device in communication with the host. The host comprises a host controller and a host memory. The storage device comprises a storage controller, a memory and a flash memory array. The storage control method provided in the first aspect is implemented when the host controller executes computer instructions stored in the host memory and the storage controller executes computer instructions stored in the memory.

[0024] The fifth aspect of the embodiments of the present application provides a host in communication with a storage device. The host comprises a host controller and a host memory. The storage control method provided in the second aspect is implemented when the host controller executes computer instructions stored in the host memory.

[0025] The sixth aspect of the embodiments of the present application provides a storage device in communication with a host. The storage device comprises a storage controller, a memory and a flash memory array. The storage control method provided in the third aspect is implemented when the storage controller executes computer instructions stored in the memory.

[0026] The seventh aspect of the embodiments of the present application provides a computer readable storage medium, which stores computer instructions. The storage control method provided in the first aspect to the third aspect is implemented when a processor executes the computer instructions.

[0027] The eighth aspect of the embodiments of the present application provides a computer program product, which comprises computer instructions. The storage control method provided in the first aspect to the third aspect is implemented when a processor executes the computer instructions. BRIEF DESCRIPTION OF DRAWINGS

[0028] FIG. 1 is a schematic diagram of a hardware structure of an example provided host and storage device interaction.

[0029] FIG. 2 is a schematic diagram of a software structure of an example provided storage device.

[0030] FIG. 3 is a timing diagram of an example provided host and storage device interaction.

[0031] FIG. 4 is a schematic diagram of an example provided white box feature bit and white box version field.

[0032] FIG. 5 is a schematic diagram of an example provided maximum white box buffer size field.

[0033] FIG. 6 is a schematic diagram of an example provided white box enable field.

[0034] FIG. 7 is a schematic diagram of an example provided operation type field.

[0035] FIG. 8 is a schematic diagram of an example provided write buffer instruction command description block.

[0036] Figure 9 is a diagram of an example write buffer instruction mode field.

[0037] Figure 10 is a diagram of an example write buffer instruction payload.

[0038] Figure 11 is a diagram of an example read buffer instruction command description block.

[0039] Figure 12 is a diagram of an example read buffer instruction mode field.

[0040] Figure 13 is a diagram of an example read buffer instruction payload.

[0041] Figure 14 is a diagram of an example header region field.

[0042] Figure 15 is a diagram of an example statistics region field.

[0043] Figure 16 is a diagram of an example checkpoint or quality of service delay information log region field.

[0044] Figure 17 is a timing diagram of another example host and storage device interaction.

[0045] Figure 18 is a diagram of an example write buffer instruction command description block.

[0046] Figure 19 is a diagram of an example write buffer instruction mode field.

[0047] Figure 20 is a diagram of an example checkpoint data output UPIU.

[0048] Figure 21 is a diagram of an example quality of service node data output UPIU.

[0049] Figure 22 is a diagram of an example system log data output UPIU.

[0050] Figure 23 is a diagram of an example synchronization time data output UPIU. DETAILED DESCRIPTION

[0051] It should be noted that “at least one” in the embodiments of the present application means one or more, and “multiple” means two or more than two. The terms “first”, “second”, “third”, “fourth” and the like in the specification and claims of the present application and the drawings are used to distinguish similar objects, and are not used to describe a specific order or sequence. The method disclosed in the embodiments of the present application or the method shown in the flowchart includes one or more steps for implementing the method, and the execution order of the multiple steps can be interchanged with each other without departing from the scope of the claims, and certain steps can also be deleted.

[0052] In the embodiments of the present application, the electronic device includes, but is not limited to, a smart phone, a tablet computer, a palm computer, a notebook computer, a mobile Internet device (MID), a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a 5G network or a terminal device in a public land mobile network (PLMN).

[0053] A storage system is deployed on an electronic device, which includes a host and a storage device. The host is configured to manage storage and access of data, such as a system on chip (SoC). The storage device includes, but is not limited to, a universal flash storage (UFS), an embedded multi-media card (eMMC), a solid state disk (SSD), and a hard disk driver (HDD).

[0054] Exemplarily, as shown in FIG. 1, the host 100 includes a host controller 110 and a host interface 120. The storage device 200 includes a storage controller 210, a memory 220, a flash array 230, and a storage device interface 240. The host controller 110 is electrically connected to the host interface 120, the host interface 120 is coupled to the storage device interface 240, and the storage controller 210 is connected to the memory 220, the flash array 230, and the storage device interface 240 through a bus to realize communication between the host controller 110 and the storage controller 210. The bus includes a universal serial bus (USB).

[0055] The host controller 110 is configured to issue an input / output (I / O) instruction (also referred to as an I / O request), which is used to instruct the storage controller 210 to perform an I / O operation. The I / O instruction includes, but is not limited to, a read instruction, a write instruction, an unmap instruction, and a sync cache instruction. Accordingly, the I / O operation includes, but is not limited to, reading, writing, unmap, and sync cache.

[0056] The storage controller 210 performs the I / O operation by converting the I / O instruction into a data format supported by a storage protocol according to a storage protocol parameter in the memory 220, and then performing the I / O operation on the flash array 230. The memory 220 includes, but is not limited to, a read-only memory (ROM), a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), and a synchronous dynamic random access memory (SDRAM). The flash array 230 includes a NAND flash array.

[0057] The storage protocol includes, but is not limited to, a UFS protocol, an eMMC protocol, a Non-Volatile Memory express (NVMe) protocol, a Serial Advanced Technology Attachment (SATA) protocol, and a Peripheral Component Interconnect express (PCIe) protocol.

[0058] It can be understood that the structure illustrated in the embodiment does not constitute a specific limitation on the host and the storage device. In other embodiments, the host and the storage device can include more or fewer components than illustrated, or combine certain components, or split certain components, or different component arrangements.

[0059] In the embodiment, the host and the storage device are jointly arranged in an electronic device. In other embodiments, the host and the storage device are independent devices. In this case, the host can be any electronic device such as a smart phone, a tablet computer, a palm computer, a notebook computer, etc., and the host communicates with an external storage device.

[0060] For the host, the processing procedure of the I / O request inside the storage device is equivalent to a black box. When the processing time of the I / O request by the storage device is long, system freezing, frame loss, etc. will occur, thereby reducing the user experience. Since the host does not know the processing procedure of the I / O request inside the storage device, it is difficult for the host to accurately locate the processing node causing the system freezing, thereby making it difficult to effectively implement system optimization.

[0061] Based on this, the embodiment of the present application provides a storage control method, which adds a Whitebox module inside the storage device, the Whitebox module allows sending information about the firmware (FW) inside the storage device to the host, thereby realizing the monitoring of the processing node inside the storage device.

[0062] Exemplarily, as shown in FIG. 2, the software system of the storage device includes a host interface layer (HIL), a flash translation layer (FTL), and a flash interface layer (FIL).

[0063] The host interface layer is used to control the communication between the host and the storage device, and provides a standardized interface for the communication between the host and the storage device, such as a UFS interface. Specifically, for an instruction or data from the host, the host interface layer can encapsulate the instruction or data into a data packet supporting a certain protocol, such as a UFS protocol. For data to be received by the host, the host interface layer performs a decapsulation operation.

[0064] In other embodiments, the functions of the host interface layer can also be integrated in the host, i.e., the host completes the above-mentioned functions of the host interface layer.

[0065] The flash translation layer is used to control the logical to physical (L2P) mapping. The L2P mapping is to map the logical block address (LBA) of the host to the physical block address (PBA) of the flash array. Specifically, for an instruction or data from the host interface layer, the flash translation layer can map the logical block address of the instruction or data to the physical block address of the flash array. For data to be received by the host interface layer, the flash translation layer performs a reverse operation.

[0066] In the present embodiment, the flash translation layer includes firmware and a white box module. The firmware includes foreground processing nodes and background processing nodes. The foreground processing nodes feed back processing results to the host. The background processing nodes do not feed back processing results to the host. The foreground processing nodes include, but are not limited to, host read (HostRead), host write (HostWrite), unmapping, and synchronization cache. The background processing nodes include, but are not limited to, back write (BackWrite), garbage collection (GC), and error handling (ErrHandle).

[0067] The white box module is used to add a monitoring field in the foreground processing nodes and the background processing nodes of the firmware, to count the latency of I / O requests of each processing node, to determine that processing is timeout when the latency is greater than a latency threshold, and to store latency information. The host can query the latency information stored by the white box module through a specific instruction. The latency threshold can be set as required.

[0068] The flash interface layer is used to control the I / O operation of the flash array. Specifically, the flash interface layer performs the I / O operation of each processing node on the flash array according to the I / O request from the flash translation layer.

[0069] The implementation of the white box module will be described in detail below in combination with the interaction process between the host and the storage device.

[0070] Exemplarily, as shown in FIG. 3, the interaction process between the host and the storage device includes the following steps:

[0071] S101. The host sends a Sync RTC instruction to the storage device.

[0072] The Sync RTC instruction is used to instruct the storage device to perform a Sync RTC operation. The Sync RTC operation is to synchronize the system time with the Real-Time Clock (RTC) time, so as to ensure the consistency of the system time and the hardware time.

[0073] S102. The storage device performs the Sync RTC operation in response to the Sync RTC instruction, and generates a Sync RTC response message.

[0074] The Sync RTC response message is used to represent that the RTC has been synchronized.

[0075] S103. The storage device sends the Sync RTC response message to the host.

[0076] In other embodiments, when the RTC fails to be synchronized, the storage device generates a Sync RTC response message, which includes error information. The error information includes the reason why the RTC fails to be synchronized. When the RTC is successfully synchronized, the storage device will not generate the Sync RTC response message. In this case, when the host does not receive the Sync RTC response message, and the synchronization duration is greater than a synchronization duration threshold, the host determines that the RTC has been synchronized. The synchronization duration threshold can be set as required.

[0077] S104. The host sends a Whitebox Query Request to the storage device.

[0078] The Whitebox Query Request is used to request to query whitebox-related parameters.

[0079] S105. The storage device queries the whitebox-related parameters in response to the Whitebox Query Request, and generates a Whitebox Query Response message.

[0080] The Whitebox Query Response message includes whitebox-related parameters, which are used to represent the whitebox query result. The whitebox query result includes whether the storage device supports the Whitebox Feature, the Whitebox Version supported by the storage device, and the size of the Max White Box Buffer.

[0081] Taking the storage device being a UFS as an example, the UFS protocol parameters are stored in the memory of the UFS, and the UFS protocol parameters include white-box related parameters. Specifically, the UFS protocol parameters include a description (Description) parameter, an attribute (Attributes) parameter and a flag (Flags) parameter. The description parameter includes a device descriptor (Device Descriptor) and a geometry descriptor (Geometry Descriptor).

[0082] Exemplarily, as shown in FIG. 4, in the device descriptor, the offset of the byte length (bLength) field is “00h”, which is used to store the size of the descriptor. The offset of the extended UFS feature support (dExtendedUFSFeaturesSupport) field is “4Fh”, which is used to store the features supported by the storage device. The extended UFS feature support field includes 32 bit positions (Bit[0-31]), and the embodiment adds white-box feature bit positions by using the reserved bit positions of the extended UFS feature support field, for example, adds white-box feature bit positions by using the reserved bit position Bit

[0018] .

[0083] Further, the embodiment adds a white-box version (wWhiteBoxVersion) field by using the reserved field in the device descriptor, which is used to store the white-box version supported by the storage device. For example, the offset of the white-box version field is “56h”, the white-box version field includes 16 bit positions (Bit[0-15]), the bit positions Bit[15:8] are used to store the major version (Major Version), the bit positions Bit[7:4] are used to store the minor version (Minor Version), and the bit positions Bit[3:0] are used to store the version suffix (Version Suffix). The values of the major version, the minor version and the version suffix adopt a binary-coded decimal (BCD) format, for example, the value of the version “version 1.00” is “0100h”.

[0084] As shown in FIG. 5, in the geometry descriptor, the offset of the byte length field is “00h”. The embodiment adds a maximum white-box buffer size (wMaxWhiteBoxBufferSize) field by using the reserved field in the geometry descriptor, which is used to store the size of the maximum white-box buffer. For example, the offset of the maximum white-box buffer size field is “4Dh”.

[0085] In the embodiment, the white-box related parameters include the information stored by the white-box feature bit positions, the white-box version field and the maximum white-box buffer size field.

[0086] S106, the storage device sends a whitebox query response message to the host.

[0087] S107, the host determines whether the storage device supports the whitebox feature according to the whitebox query response message.

[0088] If yes, step S108 is performed; if no, the process ends. The end means that the subsequent steps are not continued to be performed.

[0089] In this embodiment, the host determines whether the storage device supports the whitebox feature by reading the whitebox related parameters in the whitebox query response message. For example, the host determines whether the storage device supports the whitebox feature by reading the whitebox feature bit (e.g. Bit

[0018] ) of the extended UFS feature support field in the device descriptor. When the whitebox feature bit is not null, the host determines that the storage device supports the whitebox feature. When the whitebox feature bit is null, the host determines that the storage device does not support the whitebox feature. In addition, the host obtains the whitebox version supported by the storage device by reading the whitebox version field in the device descriptor, and obtains the size of the maximum whitebox buffer by reading the maximum whitebox buffer size field in the geometry descriptor.

[0090] S108, the host sends a whitebox enable request to the storage device.

[0091] The whitebox enable request is used to request to enable the whitebox feature.

[0092] S109, the storage device enables the whitebox feature in response to the whitebox enable request, and generates a whitebox enable response message.

[0093] The whitebox enable response message is used to indicate that the whitebox feature has been enabled.

[0094] In this embodiment, enabling the whitebox feature includes setting or modifying the storage protocol parameters, and the setting or modifying the storage protocol parameters includes setting the whitebox state flag of the whitebox enable field to an enable flag.

[0095] Still taking the example that the storage device is a UFS, the flag parameter in the UFS protocol parameter includes a white box enable field. As shown in FIG. 6, the embodiment adds a white box enable (fWhiteboxEn) field in the reserved field of the flag parameter, which is used to represent whether the white box feature is enabled. For example, the identifier (Identifier, IDN) of the white box enable field is "13h", which represents the logical unit number (Logical Unit Number, LUN). The white box enable field includes a white box state flag, and the white box state flag includes an enable flag "1b" and a disable flag "0b". The enable flag "1b" represents that the white box feature is enabled. The disable flag "0b" represents that the white box feature is disabled. The default white box state flag of the white box enable field is the disable flag "0b".

[0096] S110, the storage device sends a white box enable response message to the host.

[0097] In other embodiments, when the white box feature fails to be enabled, the storage device generates a white box enable response message, and the white box enable response message includes error information, and the error information includes the reason why the white box feature fails to be enabled. When the white box feature is successfully enabled, the storage device does not generate the white box enable response message. In this case, when the host does not receive the white box enable response message, and the enable time length is greater than the enable time length threshold, the host determines that the white box feature has been enabled. The enable time length threshold can be set as required.

[0098] S111, the host sends a white box configuration request (Whitebox Config Request) to the storage device.

[0099] The white box configuration request is used to request to configure the white box operation type.

[0100] S112, the storage device configures the white box operation type in response to the white box configuration request, and generates a white box configuration response (Whitebox Config Response) message.

[0101] The white box configuration response message is used to represent that the white box operation type has been configured.

[0102] In the embodiment, configuring the white box operation type includes setting or modifying the storage protocol parameter, and the setting or modifying the storage protocol parameter includes setting the operation type flag of the operation type field to the configuration white box attribute parameter flag.

[0103] Still taking the example that the storage device is UFS, the attribute parameter in the UFS protocol parameter includes an operation type field. As shown in FIG. 7, the embodiment adds an operation type (bOperationType) field in the reserved field of the attribute parameter, which is used to store the white box operation type. For example, the identifier (IDN) of the operation type field is "20h". The operation type field includes an operation type flag, and the operation type flag includes a configure threshold value (Configure threshold values) flag "00h" and a clear all white box recorded information (Clear all White Box recorded information) flag "01h". The configure threshold value flag "00h" indicates that the white box operation type is setting a delay threshold value. The clear all white box recorded information flag "01h" indicates that the white box operation type is clearing all white box recorded information.

[0104] S113, the storage device sends a white box configuration response message to the host.

[0105] In other embodiments, when the white box configuration fails, the storage device generates a white box configuration response message, and the white box configuration response message includes error information, and the error information includes the reason for the white box configuration failure. When the white box configuration succeeds, the storage device does not generate a white box configuration response message. In this case, when the host does not receive the white box configuration response message, and the configuration duration is greater than the configuration duration threshold, the host determines that the white box operation type has been configured. The configuration duration threshold can be set as needed.

[0106] S114, the host sends a write buffer (Write buffer) instruction to the storage device.

[0107] The write buffer instruction is used to instruct the storage device to write the white box attribute parameter to the buffer in the memory. The write buffer instruction includes a command description block (Command Descriptor Block, CDB) and a payload (Payload). The payload is also called a data segment.

[0108] Exemplarily, as shown in FIG. 8, the command description block (CDB) format of the write buffer instruction includes 10 bytes (Byte[0-9]). Among them, Byte[0] is an operation code field, and the value thereof is "3Bh". Byte[1] includes a reserved field and a mode field, and the value of the mode field is "1Dh", and the reserved field occupies Bit[7:5], and the mode field occupies Bit[4:0]. Byte[2] is a buffer identification (Buffer ID) field. Bytes[5:3] are a buffer offset field, which is used to store the logical address of the data in the buffer. Bytes[8:6] are a reserved field. Byte[9] is a control field, and the value thereof is "00h".

[0109] As shown in FIG. 9, the value of the mode field includes "01h", "02h", "1Ch", and "1Dh". The value "01h" represents a vendor specific mode. The value "02h" represents a data mode. The value "1Ch" represents an error history mode. The value "1Dh" represents a white box mode.

[0110] As shown in FIG. 10, the payload format of the write buffer instruction includes 2n+6 bytes (Byte[0-(2n+5)], and n is the number of white box attribute parameters to be written, and n is a positive integer. Among them, Byte[0] is a magic number field, which is used to store a white box feature specific signature. Byte[1] is a record type field, which is used to represent whether the threshold type is a checkpoint (CKP) or a quality of service (QoS) node. Byte[2] is an offset field, which is used to store the logical address of the first threshold. Byte[3] is a length field, which is used to store the number of white box attribute parameters to be written. Bytes[(2n+5):4] are used to store the delay threshold of the quality of service node and / or n checkpoint identification IDs[0-(n-1)], and the delay threshold of the quality of service node and each checkpoint occupies 2 bytes.

[0111] In the embodiment, the white box attribute parameters include delay thresholds. The host sets or modifies at least one delay threshold according to the data format of the write buffer instruction.

[0112] The quality of service nodes include foreground processing nodes and background processing nodes. The foreground processing nodes include, but are not limited to, host read, host write, unmap, and sync cache. The background processing nodes include, but are not limited to, write back, garbage collection, and error handling. Each quality of service node includes at least one checkpoint. Illustratively, the host read checkpoint includes protocol conversion, query L2P mapping table, and flash array read. The host write checkpoint includes write cache. The unmap checkpoint includes call L2P mapping table, modify L2P mapping table, and return L2P mapping table. The sync cache checkpoint includes flash array sync. The write back checkpoint includes flash array write. The garbage collection checkpoint includes query source block, query target block, target block read, and target block merge. The error handling checkpoint includes error read, query bad block, query good block, and bad block remap.

[0113] S115, the storage device writes the white-box attribute parameter into the buffer in the memory in response to the write buffer instruction, and generates a write buffer response message.

[0114] The write buffer response message is used to indicate that the white-box attribute parameter has been written.

[0115] S116, the storage device sends the write buffer response message to the host.

[0116] In other embodiments, when the white-box attribute parameter fails to be written, the storage device generates a write buffer response message, which includes error information, the error information including the reason for the failure of the white-box attribute parameter to be written. When the white-box attribute parameter is successfully written, the storage device does not generate the write buffer response message. In this case, when the host does not receive the write buffer response message and the write duration is greater than a write duration threshold, the host determines that the white-box attribute parameter has been written. The write duration threshold can be set as needed.

[0117] S117, the host sends an I / O instruction to the storage device.

[0118] The I / O instruction is used to instruct the storage device to perform an I / O operation. The I / O instruction includes, but is not limited to, a read instruction, a write instruction, an unmap instruction, and a sync cache instruction.

[0119] S118, the storage device performs the I / O operation in response to the I / O instruction, writes delay information into the buffer in the memory when the delay of the I / O operation is greater than a delay threshold, and generates an I / O response message.

[0120] The I / O response message is used to indicate that the I / O operation is completed.

[0121] S119, the storage device sends the I / O response message to the host.

[0122] In other embodiments, when the I / O operation fails, the storage device generates an I / O response message, the I / O response message including error information, the error information including a reason for the I / O operation failure. When the I / O operation succeeds, the storage device does not generate the I / O response message. In this case, when the host does not receive the I / O response message and the I / O operation duration is greater than an I / O operation duration threshold, the host determines that the I / O operation is completed. The I / O operation duration threshold can be set as needed.

[0123] S120, the host sends a read buffer instruction to the storage device.

[0124] The read buffer instruction is used to instruct the storage device to read the delay information from the buffer in the memory. The read buffer instruction includes a command description block and a payload.

[0125] Exemplarily, as shown in FIG. 11, the command description block (CDB) format of the read buffer instruction includes 10 bytes (Byte[0-9]). Byte Byte[0] is an operation code field, and the value thereof is “3Ch”. Byte Byte[1] includes a reserved field and a mode field, and the value of the mode field is “1Dh”. The reserved field occupies Bit[7:5], and the mode field occupies Bit[4:0]. Byte Byte[2] is a buffer identification field. Bytes Byte[5:3] are a buffer offset field. Bytes Byte[8:6] are an allocation length field. Byte Byte[9] is a control field, and the value thereof is “00h”.

[0126] As shown in FIG. 12, the value of the mode field includes “01h”, “02h”, “1Ch”, and “1Dh”. The value “01h” represents a vendor-specific mode. The value “02h” represents a data mode. The value “1Ch” represents an error history mode. The value “1Dh” represents a white-box mode.

[0127] As shown in FIG. 13, the payload format of the read buffer instruction includes M+N+K bytes (Byte[0-(M+N+K-1)]), where M, N, K are positive integers. Byte[Byte[(M-1):0]] is a header area field, which is used to store key information such as log version, specific identification, and data length. Byte[Byte[(M+N-1):M]] is a statistic area field, which is used to store timeout statistics, including the number and maximum value of timeout types. Byte[Byte[(M+N+K-1):(M+N)]] is a checkpoint or quality of service latency information entry area field, which is used to store detailed records of overall quality of service node timeouts and / or detailed records of local checkpoint timeouts.

[0128] Specifically, as shown in FIG. 14, the header area field includes M bytes (Byte[(M-1):0]). Byte[Byte[3:0]] is a signature field. Byte[Byte[5:4]] is a version field. Byte[Byte[6]] is a header size field. Byte[Byte[7]] is a statistic size field. Byte[Byte[8]] is a quality of service size field. Byte[Byte[9]] is a quality of service count field. Byte[Byte

[0010] ] is a checkpoint size field. Byte[Byte

[0011] ] is a checkpoint count field. Byte[Byte[(M-1):12]] is a reserved field.

[0129] As shown in FIG. 15, the statistics area field includes N bytes (Byte[(M+N-1):M]). Among them, byte Byte[(M+1):M] is the checkpoint identification ID[0] exceed count field, byte Byte[(M+3):(M+2)] is the checkpoint identification ID[1] exceed count field, and each checkpoint identification ID exceed count field occupies 2 bytes. The statistics area field also includes a read quality of service (Read Qos) exceed count field, a write quality of service (Write Qos) exceed count field, an unmap quality of service (Unmap Qos) exceed count field, and a synchronous cache quality of service (Sync Cache Qos) exceed count field. Byte Byte[(M+N / 2+1):(M+N / 2)] is the checkpoint identification ID[0] maximum latency (Max Latency) field, byte Byte[(M+N / 2+3):(M+N / 2+2)] is the checkpoint identification ID[1] maximum latency field, and each checkpoint identification ID maximum latency field occupies 2 bytes. The statistics area field also includes a read quality of service maximum latency field, a write quality of service maximum latency field, an unmap quality of service maximum latency field, and a synchronous cache quality of service maximum latency field.

[0130] As shown in FIG. 16, the checkpoint or quality of service latency information record area field includes K bytes (Byte[(M+N+K-1):(M+N)]). Among them, byte Byte[M+N] is the month (Month) field. Byte Byte[M+N+1] is the day (Day) field. Byte Byte[M+N+2] is the hour (Hour) field. Byte Byte[M+N+3] is the minute (Min) field. Byte Byte[(M+N+5):(M+N+4)] is the second (Sec) field. Byte Byte[(M+N+9):(M+N+6)] is the I / O type (I / O Type) field. Byte Byte[(M+N+13):(M+N+10)] is the start logical block address (Start LBA) field. Byte Byte[(M+N+15):(M+N+14)] is the I / O size (I / O Size) field. Byte Byte[(M+N+17):(M+N+16)] is the time spent (Time Spent) field. Byte Byte[(M+N+K-1):(M+N+18)] is the reserved field.

[0131] In the embodiment, the delay information includes local checkpoint delay information and / or overall quality of service node delay information. The local checkpoint delay information includes checkpoint count, checkpoint size, checkpoint identification ID exceeding count, and checkpoint identification ID maximum delay. The overall quality of service node delay information includes quality of service count, quality of service size, quality of service exceeding count, and quality of service maximum delay.

[0132] S121, the storage device reads the delay information from the buffer in the memory in response to the read buffer instruction, and generates a read buffer response message.

[0133] The read buffer response message includes the delay information.

[0134] S122, the storage device sends the read buffer response message to the host.

[0135] S123, the host sends a whitebox disable request to the storage device.

[0136] The whitebox disable request is used to request disabling the whitebox feature.

[0137] S124, the storage device disables the whitebox feature in response to the whitebox disable request, and generates a whitebox disable response message.

[0138] The whitebox disable response message is used to indicate that the whitebox feature has been disabled.

[0139] In the embodiment, disabling the whitebox feature includes setting or modifying a storage protocol parameter, and the setting or modifying the storage protocol parameter includes setting a whitebox state flag of a whitebox enable field to a disable flag.

[0140] Exemplarily, referring to FIG. 6 again, the whitebox enable field includes the whitebox state flag, and the whitebox state flag includes an enable flag “1b” and a disable flag “0b”. The disable flag “0b” indicates that the whitebox feature is disabled.

[0141] S125, the storage device sends the whitebox disable response message to the host.

[0142] In other embodiments, when the whitebox feature fails to be disabled, the storage device generates a whitebox disable response message, and the whitebox disable response message includes error information, and the error information includes a reason why the whitebox feature fails to be disabled. When the whitebox feature is successfully disabled, the storage device does not generate the whitebox disable response message. In this case, when the host does not receive the whitebox disable response message, and the disable duration is greater than a disable duration threshold, the host determines that the whitebox feature has been disabled. The disable duration threshold can be set as required.

[0143] In the embodiment, the host queries whether the storage device supports the whitebox feature, the whitebox version supported by the storage device and the size of the maximum whitebox buffer by sending a whitebox query request. The host requests to enable the whitebox feature by sending a whitebox enable request. The host instructs the storage device to write the whitebox attribute parameters to the buffer in the memory by sending a write buffer instruction. The host instructs the storage device to perform an I / O operation by sending an I / O instruction. The storage device performs the I / O operation, and when the delay of the I / O operation is greater than the delay threshold, the storage device writes the delay information to the buffer in the memory. The host instructs the storage device to read the delay information from the buffer in the memory by sending a read buffer instruction. The storage device feeds back the delay information to the host through a read buffer response message. The delay information includes local checkpoint delay information and overall quality of service node delay information, enabling the host to monitor the processing nodes inside the storage device, thereby accurately locating the processing node where the timeout occurs, and improving the efficiency and reliability of system optimization.

[0144] The interaction process between the host and the storage device described above involves a relatively complex interaction flow. To simplify the interaction flow and improve data processing efficiency, another example of the interaction process between the host and the storage device is provided below.

[0145] Exemplarily, as shown in FIG. 17, the interaction process between the host and the storage device includes the following steps:

[0146] S201. The host sends a Sync RTC instruction to the storage device.

[0147] The Sync RTC instruction is used to instruct the storage device to perform a Sync RTC operation.

[0148] S202. The storage device performs a Sync RTC operation in response to the Sync RTC instruction, and generates a Sync RTC response message.

[0149] The Sync RTC response message is used to indicate that the real-time clock has been synchronized.

[0150] S203. The storage device sends the Sync RTC response message to the host.

[0151] S204. The host sends a Write buffer instruction to the storage device.

[0152] The Write buffer instruction is used to instruct the storage device to write whitebox attribute parameters to the buffer in the memory. The Write buffer instruction includes a command description block and a payload. The payload includes a Data Out UFS Protocol Information Unit (UPIU).

[0153] Exemplarily, as shown in FIG. 18, the command description block (CDB) format of the write buffer instruction includes 10 bytes (Byte[0-9]). Among them, Byte[0] is an operation code field, and the value thereof is "3Bh". Byte[1] includes a reserved field and a mode field, and the value of the mode field is "1Dh", and the reserved field occupies Bit[7:5], and the mode field occupies Bit[4:0]. Byte[2] is a buffer identification field. Bytes[5:3] are buffer offset fields. Bytes[8:6] are reserved fields. Byte[9] is a control field, and the value thereof is "00h".

[0154] As shown in FIG. 19, the value of the mode field includes "01h", "02h", "1Ch", and "1Dh". The value "01h" represents a vendor-specific mode. The value "02h" represents a data mode. The value "1Ch" represents an error history mode. The value "1Dh" represents a white-box mode.

[0155] As shown in FIGS. 20-23, the data output UPIU format includes 2n+6 bytes (Byte[0-(2n+5)]), and n is the number of white-box attribute parameters to be written, and n is a positive integer. Among them, Bytes[3:0] are white-box feature header fields. Byte[0] is a white-box operation code field, and the value of the white-box operation code field includes "01h", "02h", "03h", and "04h".

[0156] The value "01h" represents a checkpoint (CKP), and the data output UPIU format thereof is shown in FIG. 20. Among them, Bytes[3:1] are reserved fields. Bytes[(2n+5):4] are used to store n delay thresholds of the checkpoint, and each delay threshold occupies 2 bytes.

[0157] The value "02h" represents a quality of service (QoS) node, and the data output UPIU format thereof is shown in FIG. 21. Among them, Byte[1] is a quality of service log mode (QoS Log Mode) field, and the value of the quality of service log mode field includes "00h" and "01h". The value "00h" represents a timeout record cycle coverage of n quality of service nodes. The value "01h" represents a timeout detailed record of the last quality of service node. Bytes[3:2] are reserved fields. Bytes[5:4] are used to store a delay threshold of the quality of service node, and each delay threshold occupies 2 bytes. Bytes[(2n+5):6] are reserved fields.

[0158] The value "03h" represents a system log (System Log), and the data output UPIU format is shown in FIG. 22. Byte[3:1] is a reserved field. Byte[(2n+5):4] is a reserved field.

[0159] The value "04h" represents a sync time (Sync Time), and the data output UPIU format is shown in FIG. 23. Byte[3:1] is a reserved field. Byte[7:4] is used to store a data time set (Data Time Set). Byte[(2n+5):8] is a reserved field.

[0160] In this embodiment, the white-box attribute parameter includes a delay threshold. The host sets or modifies at least one delay threshold according to the data format of the write buffer instruction.

[0161] S205, the storage device writes the white-box attribute parameter to the buffer in the memory in response to the write buffer instruction, and generates a write buffer response (Write Buffer Response) message.

[0162] The write buffer response message is used to indicate that the white-box attribute parameter has been written.

[0163] In this embodiment, writing the white-box attribute parameter to the buffer in the memory includes setting the operation type flag of the operation type field to a configuration threshold flag.

[0164] S206, the storage device sends the write buffer response message to the host.

[0165] S207, the host sends an I / O instruction to the storage device.

[0166] The I / O instruction is used to instruct the storage device to perform an I / O operation.

[0167] S208, the storage device performs an I / O operation in response to the I / O instruction, and writes delay information to the buffer in the memory when the delay of the I / O operation is greater than the delay threshold, and generates an I / O response message.

[0168] The I / O response message is used to indicate that the I / O operation is completed.

[0169] S209, the storage device sends the I / O response message to the host.

[0170] S210, the host sends a read buffer (Read Buffer) instruction to the storage device.

[0171] The read buffer instruction is used to instruct the storage device to read the delay information from the buffer in the memory. The read buffer instruction includes a command description block and a payload.

[0172] S211, in response to the read buffer instruction, the storage device reads the delay information from the buffer in the memory and generates a read buffer response message.

[0173] The read buffer response message includes the delay information.

[0174] S212, the storage device sends the read buffer response message to the host.

[0175] In the embodiment, the payload of the write buffer instruction includes a data output UPIU, and the data output UPIU includes a white box feature header field used to store white box key information, so that the process of setting the UFS protocol parameter can be omitted, thereby simplifying the interaction process and improving the data processing efficiency.

[0176] The various functions or steps performed by the host and the storage device in the above embodiments can also be applied to a chip, a computer readable storage medium or a computer program product.

[0177] The chip includes a processor and an interface circuit, and the processor is electrically connected to the interface circuit. The interface circuit can read the computer instructions stored in the memory and send the computer instructions to the processor. When the processor executes the computer instructions, the various functions or steps performed by the host and the storage device in the above embodiments are realized.

[0178] The computer readable storage medium stores computer instructions, and when the processor executes the computer instructions, the various functions or steps performed by the host and the storage device in the above embodiments are realized.

[0179] The computer readable storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. The computer readable storage medium includes RAM, ROM, Electrically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other memory, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical disc storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device, or any other medium that can be used to store desired information and can be accessed by a computer.

[0180] The computer program product includes computer instructions that, when executed by a processor, implement the various functions or steps performed by the host and storage device in the above-described embodiments.

[0181] The embodiments of the present application are described in detail above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the purpose of the present application.

Claims

1. A storage control method applied to an electronic device, the electronic device comprising a host and a storage device in communication with the host, characterized by, The method comprises: The host sends a write buffer instruction to the storage device, the write buffer instruction being used to instruct the storage device to write a white box attribute parameter to a buffer in the memory; The storage device writes the white box attribute parameter to the buffer in response to the write buffer instruction; The host sends an I / O instruction to the storage device, the I / O instruction being used to instruct the storage device to perform an I / O operation; The storage device performs the I / O operation in response to the I / O instruction, and writes delay information to the buffer when a delay of the I / O operation is greater than a delay threshold; The host sends a read buffer instruction to the storage device, the read buffer instruction being used to instruct the storage device to read the delay information from the buffer; The storage device reads the delay information from the buffer in response to the read buffer instruction, and sends a read buffer response message to the host, the read buffer response message comprising the delay information.

2. The storage control method according to Claim 1, wherein The write buffer instruction comprises a command description block and a payload; the command description block comprises a mode field, a value of the mode field being a white box mode flag; the payload comprises a white box attribute parameter of a quality of service node and / or a checkpoint to be written.

3. The storage control method according to Claim 1, wherein The read buffer instruction comprises a command description block and a payload; the command description block comprises a mode field, a value of the mode field being a white box mode flag; the payload comprises a header area field, a statistics area field, and a checkpoint or quality of service delay information recording area field, the header area field being used to store key information, the statistics area field being used to store timeout statistics information, and the checkpoint or quality of service delay information recording area field being used to store detailed records of overall quality of service node timeouts and / or detailed records of local checkpoint timeouts.

4. The storage control method according to any one of claims 1 to 3, wherein Before the host sends the write buffer instruction to the storage device, the method further comprises: The host sends a white box query request to the storage device, the white box query request being used to request to query white box related parameters; The storage device queries the white box related parameters in response to the white box query request, and sends a white box query response message to the host, the white box query response message comprising the white box related parameters; The host determines whether the storage device supports a white box feature according to the white box query response message.

5. The storage control method according to Claim 4, wherein The method further comprises: The host acquires a white box version and / or a size of a maximum white box buffer supported by the storage device according to the white box query response message.

6. The storage control method according to claim 4 or 5, wherein The storage device querying the white box related parameters comprises: The storage device queries storage protocol parameters stored in the memory, the storage protocol parameters comprising a description parameter, the description parameter comprising a device descriptor; the device descriptor comprises a feature support field, the feature support field being used to store features supported by the storage device; the feature support field comprises a white box feature bit, the white box feature bit being used to represent that the storage device supports the white box feature.

7. The storage control method according to Claim 5, wherein The storage device querying the white box related parameters comprises: The storage device queries a storage protocol parameter stored in the memory, the storage protocol parameter comprising a description parameter, the description parameter comprising a device descriptor; the device descriptor comprising a whitebox version field, the whitebox version field being used to store a whitebox version supported by the storage device.

8. The storage control method according to claim 5 or 7, wherein The storage device querying the whitebox-related parameter comprises: The storage device queries a storage protocol parameter stored in the memory, the storage protocol parameter comprising a description parameter, the description parameter comprising a geometry descriptor; the geometry descriptor comprising a maximum whitebox buffer size field, the maximum whitebox buffer size field being used to store a size of a maximum whitebox buffer.

9. The storage control method according to any one of claims 1 to 8, wherein, Before the host sends a write buffer instruction to the storage device, the method further comprises: The host sends a whitebox enable request to the storage device, the whitebox enable request being used to request to enable a whitebox feature; The storage device enables the whitebox feature in response to the whitebox enable request.

10. The storage control method according to Claim 9, wherein The storage device enabling the whitebox feature comprises: The storage device sets or modifies a storage protocol parameter stored in the memory, the storage protocol parameter comprising a flag parameter, the flag parameter comprising a whitebox enable field, the whitebox enable field being used to represent whether the whitebox feature is enabled; The storage device setting or modifying the storage protocol parameter comprises: setting a whitebox state flag of the whitebox enable field to an enable flag, the enable flag being used to represent that the whitebox feature is enabled.

11. The storage control method according to claim 9 or 10, wherein The method further comprises: The host sends a whitebox disable request to the storage device, the whitebox disable request being used to request to disable the whitebox feature; The storage device disables the whitebox feature in response to the whitebox disable request.

12. The storage control method according to Claim 11, wherein The storage device disabling the whitebox feature comprises: The storage device sets or modifies a storage protocol parameter stored in the memory, the storage protocol parameter comprising a flag parameter, the flag parameter comprising a whitebox enable field, the whitebox enable field being used to represent whether the whitebox feature is enabled; The storage device setting or modifying the storage protocol parameter comprises: setting a whitebox state flag of the whitebox enable field to a disable flag, the disable flag being used to represent that the whitebox feature is disabled.

13. The storage control method according to any one of claims 1 to 12, wherein Before the host sends a write buffer instruction to the storage device, the method further comprises: The host sends a whitebox configuration request to the storage device, the whitebox configuration request being used to request to configure a whitebox operation type; The storage device configures the whitebox operation type in response to the whitebox configuration request.

14. The storage control method according to Claim 13, wherein The storage device configuring the whitebox operation type comprises: The storage device sets or modifies a storage protocol parameter stored in the memory, the storage protocol parameter comprising an attribute parameter; the attribute parameter comprising an operation type field, the operation type field being used to store a whitebox operation type; The storage device setting or modifying the storage protocol parameter comprises: setting an operation type flag of the operation type field to a configuration whitebox attribute parameter flag.

15. A storage control method applied to a host, the host being in communication with a storage device, the method comprising: The method comprises: sending a write buffer instruction to the storage device, the write buffer instruction being used to instruct the storage device to write whitebox attribute parameters to a buffer in memory; sending an I / O instruction to the storage device, the I / O instruction being used to instruct the storage device to perform an I / O operation; sending a read buffer instruction to the storage device, the read buffer instruction being used to instruct the storage device to read latency information from the buffer; receiving a read buffer response message from the storage device, the read buffer response message including the latency information, the latency information being information written to the buffer when a latency of the I / O operation performed by the storage device is greater than a latency threshold.

16. The storage control method according to Claim 15, wherein The write buffer instruction includes a command description block and a payload; the command description block includes a mode field, a value of the mode field being a whitebox mode flag; the payload includes quality of service nodes and / or checkpoint whitebox attribute parameters to be written.

17. The storage control method according to Claim 15, wherein The read buffer instruction includes a command description block and a payload; the command description block includes a mode field, a value of the mode field being a whitebox mode flag; the payload includes a header area field, a statistics area field, and a checkpoint or quality of service latency information recording area field, the header area field being used to store key information, the statistics area field being used to store timeout statistics information, and the checkpoint or quality of service latency information recording area field being used to store detailed records of overall quality of service node timeouts and / or detailed records of local checkpoint timeouts.

18. The storage control method according to any one of claims 15 to 17, wherein, Before sending the write buffer instruction to the storage device, the method further includes: sending a whitebox query request to the storage device, the whitebox query request being used to request querying whitebox related parameters; receiving a whitebox query response message from the storage device, the whitebox query response message including the whitebox related parameters; determining whether the storage device supports whitebox features according to the whitebox query response message.

19. The storage control method according to Claim 18, wherein The method further includes: acquiring a whitebox version supported by the storage device and / or a size of a maximum whitebox buffer according to the whitebox query response message.

20. The storage control method according to any one of claims 15 to 19, wherein, Before sending the write buffer instruction to the storage device, the method further includes: sending a whitebox enable request to the storage device, the whitebox enable request being used to request enabling whitebox features.

21. The storage control method according to Claim 20, wherein The method further includes: sending a whitebox disable request to the storage device, the whitebox disable request being used to request disabling the whitebox features.

22. The storage control method according to any one of claims 15 to 21, wherein Before sending the write buffer instruction to the storage device, the method further includes: sending a whitebox configuration request to the storage device, the whitebox configuration request being used to request configuring whitebox operation types.

23. A storage control method applied to a storage device, the storage device being in communication with a host, the method comprising: The method includes: writing whitebox attribute parameters to a buffer in memory in response to a write buffer instruction from the host; performing an I / O operation in response to an I / O instruction from the host, and writing latency information to the buffer when a latency of the I / O operation is greater than a latency threshold. In response to a read buffer command from the host, reading the latency information from the buffer and sending a read buffer response message to the host, the read buffer response message including the latency information.

24. The storage control method according to Claim 23, wherein The write buffer command includes a command description block and a payload; the command description block includes a mode field, the value of the mode field being a white-box mode flag; the payload includes the white-box attribute parameters of a quality of service node and / or a checkpoint to be written.

25. The storage control method of claim 23, wherein, The read buffer command includes a command description block and a payload; the command description block includes a mode field, the value of the mode field being a white-box mode flag; the payload includes a header area field, a statistics area field, and a checkpoint or quality of service latency information record area field, the header area field being used to store key information, the statistics area field being used to store timeout statistics information, and the checkpoint or quality of service latency information record area field being used to store detailed records of overall quality of service node timeouts and / or detailed records of local checkpoint timeouts.

26. The storage control method according to any one of claims 23 to 25, wherein, Before responding to the write buffer command from the host, the method further includes: In response to a white-box query request from the host, querying white-box related parameters and sending a white-box query response message to the host, the white-box query response message including the white-box related parameters, the white-box related parameters being used to represent whether the storage device supports the white-box feature.

27. The storage control method of claim 26, wherein, The white-box related parameters include a white-box version supported by the storage device and / or a size of a maximum white-box buffer.

28. The storage control method according to claim 26 or 27, wherein The querying of the white-box related parameters includes: Querying storage protocol parameters stored in the memory, the storage protocol parameters including description parameters, the description parameters including a device descriptor; the device descriptor including a feature support field, the feature support field being used to store features supported by the storage device; the feature support field including a white-box feature bit, the white-box feature bit being used to represent that the storage device supports the white-box feature.

29. The storage control method of claim 27, wherein, The querying of the white-box related parameters includes: Querying storage protocol parameters stored in the memory, the storage protocol parameters including description parameters, the description parameters including a device descriptor; the device descriptor including a white-box version field, the white-box version field being used to store a white-box version supported by the storage device.

30. The storage control method according to claim 27 or 29, wherein The querying of the white-box related parameters includes: Querying storage protocol parameters stored in the memory, the storage protocol parameters including description parameters, the description parameters including a geometry descriptor; the geometry descriptor including a maximum white-box buffer size field, the maximum white-box buffer size field being used to store a size of a maximum white-box buffer.

31. The storage control method according to any one of claims 23 to 30, wherein Before responding to the write buffer command from the host, the method further includes: In response to a white-box enable request from the host, enabling the white-box feature.

32. The storage control method of claim 31, wherein, The enabling of the white-box feature includes: Setting or modifying storage protocol parameters stored in the memory, the storage protocol parameters including flag parameters, the flag parameters including a white-box enable field, the white-box enable field being used to represent whether the white-box feature is enabled; The storage device sets or modifies the storage protocol parameters include: setting a whitebox status flag of the whitebox enable field as an enable flag, the enable flag is used to represent that the whitebox feature is enabled.

33. The storage control method according to claim 31 or 32, wherein The method further includes: disabling the whitebox feature in response to a whitebox disable request from the host.

34. The storage control method of claim 33, wherein, The disabling the whitebox feature includes: setting or modifying storage protocol parameters stored in the memory, the storage protocol parameters include flag parameters, the flag parameters include a whitebox enable field, the whitebox enable field is used to represent whether the whitebox feature is enabled; The storage device sets or modifies the storage protocol parameters include: setting a whitebox status flag of the whitebox enable field as a disable flag, the disable flag is used to represent that the whitebox feature is disabled.

35. The storage control method according to any one of claims 23 to 34, wherein, Before responding to the write buffer instruction from the host, the method further includes: configuring the whitebox operation type in response to a whitebox configuration request from the host.

36. The storage control method of claim 35, wherein, The configuring the whitebox operation type includes: setting or modifying storage protocol parameters stored in the memory, the storage protocol parameters include attribute parameters; the attribute parameters include an operation type field, the operation type field is used to store a whitebox operation type; The setting or modifying the storage protocol parameters includes: setting an operation type flag of the operation type field as a configuration whitebox attribute parameter flag.

37. An electronic device, comprising: The host includes a host controller and a host memory, and the storage device includes a storage controller, a memory and a flash array; when the host controller executes computer instructions stored in the host memory, and the storage controller executes computer instructions stored in the memory, the storage control method as claimed in any one of claims 1-14 is implemented.

38. A host, comprising: The host includes a host controller and a host memory, when the host controller executes computer instructions stored in the host memory, the storage control method as claimed in any one of claims 15-22 is implemented.

39. A storage device, comprising: The storage device includes a storage controller, a memory and a flash array, when the storage controller executes computer instructions stored in the memory, the storage control method as claimed in any one of claims 23-36 is implemented.

40. A computer-readable storage medium, comprising: The computer instructions are stored thereon, when a processor executes the computer instructions, the storage control method as claimed in any one of claims 1-36 is implemented.

Citation Information

Patent Citations

  • Hard disk information monitoring method and device, electronic equipment and storage medium

    CN116775403A

  • Memory controller and method of operating the same

    CN117149051A

  • File input / output regulation control system, method, and program

    JP2008217364A

  • Systems and methods for scheduling write requests for a solid state storage device

    US9032165B1