Response control in memory system

By aggregating responses in the storage system and sending them at once, the problem of excessive interruption overhead is solved, and system efficiency and performance is improved.

CN120266091APending Publication Date: 2025-07-04YANGTZE MEMORY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380011585.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-20
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

When existing storage systems process large amounts of small blocks of data responses in a short period of time, the overhead of host interruption is too large, affecting system performance.

Method used

The storage system aggregates multiple responses within a time period and sends them to the host at one time to reduce the number of interrupts and reduce interrupt overhead.

Benefits of technology

Reduce the number of interrupts handled by the host through aggregation responses, reduce the overhead of input/output operations, and improve system efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120266091A_ABST
    Figure CN120266091A_ABST
Patent Text Reader

Abstract

Example storage systems, methods, and media are disclosed for aggregating responses from a storage system to mitigate interrupt overhead in a host coupled to the storage system. An example method includes receiving a plurality of commands from a host. A plurality of responses are sent to the host at a moment in time, where each of the responses is generated in the storage system during a certain time period and is a response to a respective one of the commands.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a storage device, a storage system, and a method for response control in a storage system. Background Art

[0002] A storage system may include one or more storage devices and a memory controller that manages data stored in the one or more storage devices and communicates with a host. The host may send commands, such as read or write commands, to the storage system to read data from or write data to the one or more storage devices. The storage system may generate corresponding responses and send the responses to the host. The host may use interrupts to process the responses received from the storage system. Summary of the Invention

[0003] The present disclosure relates to a storage system, a method, and a medium for aggregating responses from a storage system to reduce interrupt overhead in a host coupled to the storage system. An example method includes receiving a plurality of commands from a host. A plurality of responses are sent to the host at a single moment, where each of the responses is generated in the storage system during a certain period of time and is a response to a corresponding one of the commands.

[0004] Although generally described as computer-implemented software embodied on a tangible medium that processes and transforms the corresponding data, some or all aspects may be computer-implemented methods or further include corresponding systems or other devices for performing the described functions. These and other aspects and details of the embodiments of the present disclosure are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the present disclosure will be apparent from the specification, the drawings, and from the claims. Brief Description of the Drawings

[0005] Figure 1 A block diagram of an example system having a storage device is shown in accordance with some aspects of the present disclosure.

[0006] Figure 2 An example system including a Universal Flash Storage (UFS) host and a UFS device is shown in accordance with some aspects of the present disclosure.

[0007] Figure 3 An example of a transaction between a host and a device is shown in accordance with some aspects of the present disclosure.

[0008] Figure 4 An example workflow for controlling aggregated responses is shown in accordance with some aspects of the present disclosure.

[0009] Figure 5Illustrates an example workflow for controlling processing parameters of an aggregated response in accordance with some aspects of the present disclosure.

[0010] Figure 6 Illustrates an example of a flowchart of a method for aggregating responses from a storage system in accordance with some aspects of the present disclosure.

[0011] Like reference numerals and designations in the various figures indicate like elements. Detailed Description

[0012] This specification relates to storage systems, methods, and controllers for aggregating responses of a storage system to reduce interrupt overhead in a host coupled to the storage system. In some cases, a host coupled to a storage system sends read or write commands to the storage system and receives corresponding responses from the storage system. The storage system may generate a corresponding response for each command sent by the host. The host may use interrupts to process the responses sent by the storage system. If the host sends many commands to the storage system in a short period of time, such as random write commands, the storage system may send back many responses in a short period of time, and each response may cause the host to use an interrupt to process data associated with the response and having a small block size (e.g., less than 4k bits). These responses may cause a large number of interrupts in the host in a short period of time to process the responses for the associated data having a small block size. The interrupts may cause a large amount of interrupt overhead in the host.

[0013] To reduce host interrupt overhead associated with a large number of storage system responses, especially those for associated data having a small block size, the storage system may aggregate multiple responses over a period of time and then send the aggregated response to the host all at once, rather than sending one response at a time. Sending the aggregated response from the storage system to the host all at once can reduce the number of interrupts the host uses to process the responses, thereby reducing interrupt overhead in the host, regardless of whether the host has its own scheme for reducing interrupt overhead. Sending the aggregated response from the storage system to the host all at once can also reduce the number of times the storage system sends responses to the host and thus reduce the overhead associated with input / output operations between the host and the storage system.

[0014] Figure 1 Illustrates a block diagram of an example system 100 having a storage device in accordance with some aspects of the present disclosure. System 100 may be a mobile phone, a desktop computer, a laptop computer, a tablet computer, an in-vehicle computer, a game console, a printer, a positioning device, a wearable electronic device, a smart sensor, a virtual reality (VR) device, an augmented reality (AR) device, or any other suitable electronic device having a storage means. As Figure 1As shown, system 100 may include host 108 and storage system 102 having one or more storage devices 104 and memory controller 106. Host 108 may include a processor (e.g., a central processing unit (CPU)) of an electronic device or a system on a chip (SoC) (e.g., an application processor (AP)). Host 108 may be configured to: send data to storage device 104 or receive data from storage device 404.

[0015] Storage device 104 may be any storage device disclosed in the present disclosure. According to some embodiments, memory controller 106 is coupled to storage device 104 and host 108 and is configured to control storage device 104. Memory controller 106 may manage data stored in storage device 104 and communicate with host 108. In some embodiments, memory controller 106 is designed to operate in a low-duty-cycle environment, such as a Secure Digital (SD) card, a CompactFlash (CF) card, a Universal Serial Bus (USB) flash drive, or other media for electronic devices, such as a personal computer, a digital camera, a mobile phone, etc. In some embodiments, memory controller 106 is designed to operate in a high-duty-cycle environment, such as a Solid State Drive (SSD) or an embedded multimedia card (eMMC) used for data storage in mobile devices (e.g., smartphones, tablets, laptops, etc.) and enterprise storage arrays. Memory controller 106 may be configured to control the operations of storage device 104, such as read, erase, and program operations. Memory controller 106 may also be configured to manage various functions regarding data stored in or to be stored in storage device 104, including but not limited to bad block management, garbage collection, logical-to-physical address translation, wear leveling, etc. In some implementations, memory controller 106 is also configured to: process an error correction code (ECC) for data read from or written to storage device 104. Any other suitable functions may also be performed by memory controller 106, for example, formatting storage device 104.

[0016] Memory controller 106 may communicate with an external device (e.g., host 108) according to a specific communication protocol. For example, memory controller 106 may communicate with an external device through at least one of various interface protocols, such as USB protocol, MMC protocol, Peripheral Component Interconnect (PCI) protocol, PCI Express (PCI-E) protocol, Advanced Technology Attachment (ATA) protocol, Serial ATA protocol, Parallel ATA protocol, Small Computer System Interface (SCSI) protocol, Enhanced Small Disk Interface (ESDI) protocol, Integrated Drive Electronics (IDE) protocol, FireWire protocol, etc.

[0017] The memory controller 106 and one or more storage devices 104 may be integrated into various types of storage devices, e.g., included in the same package, such as a Universal Flash Storage (UFS) package or an eMMC package. That is, the storage system 102 may be implemented and packaged into different types of terminal electronic products.

[0018] Figure 2 An example system 200 including a UFS host 210 and a UFS device 230 is shown. System 200 is Figure 1 an example of the system 100 in Figure 1 and the UFS host 210 is an example of the host 108 in Figure 1 and the UFS device 230 is an example of the storage system 102 in

[0019] In some embodiments, the UFS host 210 sends a read command (e.g., req_r in the RW UPIU message 220) or a write command (e.g., req_w in the RW UPIU message 220) to the UFS device 230 to read data (e.g., data output in the RW UPIU message 220) from the UFS device 230 or write data (e.g., data input in the RW UPIU message 220) to the UFS device 230. The UFS device 230 then sends a corresponding response (e.g., rsp in the RW UPIU message 220) to the UFS host 210. In some examples, the read command may be a random read command or the write command may be a random write command.

[0020] In some embodiments, the UFS host 210 includes a UFS driver 212 that drives a UFS host controller 218. The UFS host controller 218 is an interface engine of the UFS host 210. The UFS host controller 218 may process an interruption after receiving a response from the UFS device 230 so that a routine of the interruption handling 214 in the UFS driver 212 processes the response. The interruption handling 214 is a routine within the UFS driver 212 and may handle interruptions controlled by an interruption controller 216. The interruption controller 216 may control interruptions from the UFS host controller 218. The UFS Transport Protocol (UTP) transmission register 2181 in the UFS host controller 218 may manage the command flow from the UFS host 210 to the UFS device 230 and the data flow between the UFS host 210 and the UFS device 230.

[0021] In some embodiments, the UFS host controller 218 may process a separate interruption for each response received from the UFS device 230. When the read or write command from the UFS host 210 is a random read command or a random write command, and the size of the data associated with the corresponding response from the UFS device 230 is small, such as less than or equal to 4k bits, the UFS host 210 may process many interruptions in a short period of time, where each interruption is in response to a response with associated data of small size.

[0022] In some embodiments, instead of using separate interruptions to process each response received from the UFS device 230, the UFS host controller 218 may use the UTP transmission interruption aggregation control register 2182 to aggregate multiple received responses before using a single interruption to process the aggregated responses. Therefore, the UTP transmission interruption aggregation control register 2182 may reduce the interruption overhead in the UFS host 210 by reducing the rate at which the UFS host controller 218 processes interruptions.

[0023] In some implementations, the UFS IP 232 is an interface engine of the UFS device 230. The UFS IP 232 may be part of the controller of the UFS device 230 or independent of the controller of the UFS device 230. The UFS IP 232 may support the automatic response of the UTP response UPIU message from the UFS device 230. The UFS IP 232 may also support the manual response of the UTP response UPIU message from the UFS device 230 using the firmware of the controller of the UFS device 230.

[0024] In some embodiments, the UFS device 230 may use the response aggregation control logic 234 to aggregate the responses generated by the UFS device 230 in response to commands received by the UFS device 230 from the UFS host 210, and then send the aggregated responses to the UFS host 210 at a specific time, rather than sending individual responses to the UFS host 210 one by one. Different parameters can be set. For example, the maximum number of aggregated responses that can be sent from the UFS device 230 to the UFS host 210, or the maximum time interval between consecutive moments when the aggregated responses are sent from the UFS device 230 to the UFS host 210, can be used to control when to send the aggregated responses. The interface "set_Wait_MaxCount" of the response aggregation control logic 234 can be used to set the maximum number of aggregated responses that can be sent from the UFS device 230 to the UFS host 210, and the interface "set_Wait_Timeout" of the response aggregation control logic 234 can be used to set the maximum time interval between consecutive moments when the aggregated responses are sent from the UFS device 230 to the UFS host 210. The interface "set_StartStop" of the response aggregation control logic 234 can be used to start or stop running the response aggregation control logic 234. The response aggregation control logic 234 can be a part of the firmware of the controller of the UFS device 230. The received commands and the aggregated responses can be a part of the read / write (RW) UPIU messages 220 sent between the UFS host 210 and the UFS device 230. Sending multiple aggregated responses from the UFS device 230 to the UFS host 210 at one time can reduce the interrupt overhead in the UFS host 210 by reducing the rate at which the UFS device 230 sends responses to the UFS host 210.

[0025] Figure 3Shows an example 300 of a transaction between a host and a device. In some embodiments, the host 302 may send multiple commands to the device 304 before receiving a response from the device 304, such as commands UPIU 306, 308, and 310 in the format of a UPIU data structure. Examples of the multiple commands sent from the host 302 to the device 304 may include read commands or write commands. After receiving each of the commands UPIU 306, 308, and 310, the device 304 may generate corresponding responses. However, instead of sending each response to the host 302 at different times, the device 304 may aggregate the individual responses and send them to the host 302 together at the same time (e.g., in response UPIU 312 in the format of a UPIU data structure). Sending multiple responses from the device 304 to the host 302 together at a certain moment instead of sending them individually at different times can reduce the number of interrupts that the host 302 uses to process multiple responses from the device 304, and thus reduce the interrupt overhead associated with processing multiple responses from the device 304 in the host 302. The commands UPIU 306, 308, and 310 and the response UPIU 312 may be Figure 2 part of the RW UPIU message 220 in

[0026] Figure 4 Shows an example workflow 400 for controlling the aggregated responses. The workflow 400 may be implemented by the response aggregation control logic 234 in Figure 2 and may be executed by a device controller (e.g., controller 106). At 402, the device controller of the device (e.g., storage system 102 or UFS device 230) detects that the device has generated a corresponding response in response to a command (e.g., a read command or a write command) received from the host.

[0027] At 404, the device controller checks the status of the response aggregation switch (e.g., the response count switch), which can be used to control whether to aggregate the responses in the device. An example of the response aggregation switch is the interface "set_StartStop" of the response aggregation control logic 234 in Figure 2 If the status indicates that the response aggregation switch is on, the device controller calls the response aggregation logic 416, which includes 406 to 412.

[0028] At 406, the device controller checks whether the response aggregation timeout has been reached. For example, if the period of time from the last time multiple aggregated responses were sent to the host to the current time is longer than or equal to a predetermined period, then at 408, the device controller sends to the host the responses aggregated since the last time multiple aggregated responses were sent to the host. If the period of time from the last time multiple aggregated responses were sent to the host to the current time is less than the predetermined period, then at 410, the device controller checks whether the maximum number of aggregated responses has been reached. For example, if the number of responses aggregated since the last time multiple aggregated responses were sent to the host is greater than or equal to a predetermined threshold, the device controller performs 408 by sending to the host the responses aggregated since the last time multiple aggregated responses were sent to the host. If the number of responses aggregated since the last time multiple aggregated responses were sent to the host is less than the predetermined threshold, then at 412, the device controller increments the number of aggregated responses by 1 and adds the corresponding response to the set of responses aggregated since the last time multiple aggregated responses were sent to the host.

[0029] If at 404, the status of the response aggregation switch indicates that the response aggregation switch is off, then at 414, the device controller performs a read or write response operation by sending the corresponding response to the host.

[0030] In some embodiments, the response aggregation switch may be set based on the type of command sent from the host to the device, the rate at which commands are sent from the host to the device, and / or the size of the data associated with the responses sent from the device to the host. For example, if during a specific period of time, the commands sent from the host to the device are write commands, and the rate at which the host sends commands to the device is higher than a preset threshold, and the size of the data associated with each response from the device is less than 4k bits, then the response aggregation switch may be set to on so as to invoke the response aggregation logic 416 to reduce the interrupt overhead in the host by reducing the rate at which the device sends responses to the host.

[0031] In some embodiments, the device controller may swap 406 and 410 in the response aggregation logic 416 while still reducing the interrupt overhead in the host by reducing the rate at which the device sends responses to the host.

[0032] In some embodiments, the predetermined period and the predetermined threshold may be determined based on the type of command, the size of the data associated with the response, system requirements, and / or user experience.

[0033] Figure 5Illustrates an example workflow 500 for processing parameters used in controlling aggregated responses. Example parameters can include a predetermined time period used in 406 and a predetermined threshold used in 410. Workflow 500 can be executed by a device controller and can be used for write transactions between a host and a device. The device controller can also execute workflow 500 for read transactions by replacing the write auto-response with a read auto-response.

[0034] At 502, the device controller of the device checks the status of a response aggregation switch (e.g., a response count switch), which can be used to control whether response aggregation logic is set in the device. If the status indicates that the response aggregation switch is on, the device controller invokes response aggregation setup logic 524, which includes 504 through 510.

[0035] At 504, the device controller checks whether the write auto-response is off. The device controller can use the write auto-response to automatically send a response from the device to the host in response to a command from the host. If the write auto-response is not off, then at 506, the device controller turns off the write auto-response so that response aggregation operations can be performed later. Then at 508, the device controller checks whether a response aggregation timer (e.g., a timer that counts the duration since the last time multiple aggregated responses were sent to the host) and other parameters have been set. Other parameters can include a predetermined time period used in 406 and a predetermined threshold used in 410.

[0036] If at 504, the device controller determines that the write auto-response is off, the device controller performs 508 described above.

[0037] If at 508, the device controller determines that the response aggregation timer or other parameters have not been set, then at 510, the device controller sets the response aggregation timer or other parameters. At 522, the device controller executes Figure 4 the workflow 400 in to process a read command or a write command from the host.

[0038] If at 508, the device controller determines that the response aggregation timer and other parameters have been set, then at 522, the device controller executes Figure 4 the workflow 400 in to process a read command or a write command from the host.

[0039] If at 502, the status of the response aggregation switch indicates that the response aggregation switch is off, the device controller invokes response aggregation removal logic 526, which includes 512 through 520.

[0040] At 512, the device controller checks whether a response aggregation timer (e.g., a timer that counts the duration since the last sending of multiple aggregated responses to the host) and other parameters have been set. The other parameters can include a predetermined time period used in 406 and a predetermined threshold used in 410.

[0041] If, at 512, the device controller determines that the response aggregation timer or other parameters have not been set, then at 520, the device controller checks whether write auto - response is turned off. If the write auto - response is not turned off, then at 522, the device controller executes Figure 4 the workflow 400 in to process read or write commands from the host. If the write auto - response is turned off, then at 518, the device controller turns on the write auto - response. Then at 522, the device controller executes Figure 4 the workflow 400 in to process read commands or write commands from the host.

[0042] If, at 512, the device controller determines that the response aggregation timer and other parameters have been set, then at 514, the device controller unloads the response aggregation timer and other parameters. Next, at 516, the device controller sends to the host a set of aggregated responses since the last sending of multiple aggregated responses to the host. At 518, the device controller turns on the write auto - response. Then at 522, the device controller executes Figure 4 the workflow 400 in to process read commands or write commands from the host.

[0043] Figure 6 Example 600 of a flowchart of a method for aggregating responses from a storage system according to some aspects of the present disclosure is shown. At 602, a controller of the storage system receives a command from a host.

[0044] At 604, the controller sends a response to the host at a moment, where each response is generated in the storage system during a certain time period and is a response to a corresponding one of the commands.

[0045] Certain aspects of the subject matter described herein can be implemented as a storage system. The storage system includes an interface and a controller. The interface is configured to perform operations including: receiving a command from a host, and sending a response to the host at a moment, where each of these responses is generated in the storage system during a certain time period and is a response to a corresponding one of these commands.

[0046] The storage system can include one or more of the following features.

[0047] In some embodiments, the controller is coupled to the interface and is configured to perform one or more operations including: receiving a command from a host via the interface; and generating a response in response to receiving the command.

[0048] In some embodiments, in response to determining that the time period is longer than or equal to a predetermined time period, the time for sending the response is after the time period.

[0049] In some embodiments, in response to determining that the number of generated responses is greater than or equal to a predetermined threshold, the time for sending the response is during the time period.

[0050] In some embodiments, the command includes a random read command or a random write command, wherein the size of each of the random read command or the random write command is less than or equal to 4 kb.

[0051] In some embodiments, the storage system includes a Universal Flash Storage (UFS) device, wherein the UFS device includes a controller and a storage device.

[0052] In some embodiments, the corresponding data structure of each read command in the command includes a read command UFS Protocol Information Unit (UPIU), the corresponding data structure of each write command in the command includes a write command UPIU, the corresponding data structure of each read response in the response includes a read response UPIU, and the corresponding data structure of each write response in the response includes a write response UPIU.

[0053] Certain aspects of the subject matter described herein can be implemented as a storage system. The storage system includes a storage device and a controller coupled to the storage device. The controller is configured to perform operations including: receiving a command from a host; during a certain time period, generating a response in response to receiving the command, wherein each response in the responses is a response to a corresponding one of the commands; and sending the generated response to the host at a moment.

[0054] The storage system may include one or more of the following features.

[0055] In some embodiments, in response to determining that the time period is longer than or equal to a predetermined time period, the time for sending the response is after the time period.

[0056] In some embodiments, in response to determining that the number of generated responses is greater than or equal to a predetermined threshold, the time for sending the response is during the time period.

[0057] In some embodiments, the command includes a random read command or a random write command, wherein the size of each of the random read command or the random write command is less than or equal to 4 kb.

[0058] In some embodiments, the storage system includes a Universal Flash Storage (UFS) device, where the UFS device includes a controller and a storage device.

[0059] In some embodiments, the corresponding data structure of each read command in the command includes a read command UFS Protocol Information Unit (UPIU), the corresponding data structure of each write command in the command includes a write command UPIU, the corresponding data structure of each read response in the response includes a read response UPIU, and the corresponding data structure of each write response in the response includes a write response UPIU.

[0060] In some embodiments, these operations further include: receiving the state of a response count switch; receiving a predetermined threshold, and receiving a predetermined time period value.

[0061] In some embodiments, these operations further include: determining that the received state of the response count switch is on; determining that an auto-response switch is on; and in response to determining that the state of the response count switch is on and the auto-response switch is on; turning off the auto-response switch; setting the predetermined threshold to the received predetermined threshold; and setting the predetermined time period to the received predetermined time period value.

[0062] Certain aspects of the subject matter described herein can be implemented as a method. The method includes receiving a command from a host. A response is sent to the host at a moment, where each response in the response is generated in the storage system during a certain time period and is a response to a corresponding one of the commands in the command.

[0063] The method may include one or more of the following features.

[0064] In some embodiments, in response to determining that the time period is longer than or equal to a predetermined time period, the moment for sending the response is after the time period.

[0065] In some embodiments, in response to determining that the number of responses generated is greater than or equal to a predetermined threshold, the moment for sending the response is during the time period.

[0066] In some embodiments, the command includes a random read command or a random write command, where the size of each command in each random read command or random write command is less than or equal to 4 kb.

[0067] In some embodiments, the storage system includes a Universal Flash Storage (UFS) device, where the UFS device includes a controller and a storage device.

[0068] In some embodiments, the corresponding data structure of each read command in the command includes a read command UFS protocol information unit (UPIU), the corresponding data structure of each write command in the command includes a write command UPIU, the corresponding data structure of each read response in the response includes a read response UPIU, and the corresponding data structure of each write response in the response includes a write response UPIU.

[0069] Certain aspects of the subject matter described herein may be implemented as a non-transitory computer-readable storage medium storing one or more instructions executable by a computer system to perform operations including: receiving a command from a host and through a storage system; generating, during a period of time and through the storage system, a response in response to receiving the command, wherein each response in the response is a response to a corresponding one of the commands in the command; and sending, at a moment and through the storage system, the generated response to the host.

[0070] The non-transitory computer-readable storage medium may include one or more of the following features.

[0071] In some embodiments, in response to determining that the period of time is longer than or equal to a predetermined period of time, the moment for sending the response is after the period of time.

[0072] In some embodiments, in response to determining that the number of generated responses is greater than or equal to a predetermined threshold, the moment for sending the response is during the period of time.

[0073] In some embodiments, the command includes a random read command or a random write command, wherein the size of each command in each random read command or random write command is less than or equal to 4 kb.

[0074] In some embodiments, the storage system includes a Universal Flash Storage (UFS) device, wherein the UFS device includes a controller and a storage device.

[0075] In some embodiments, the corresponding data structure of each read command in the command includes a read command UFS protocol information unit (UPIU), the corresponding data structure of each write command in the command includes a write command UPIU, the corresponding data structure of each read response in the response includes a read response UPIU, and the corresponding data structure of each write response in the response includes a write response UPIU.

[0076] In some embodiments, the operations further include: receiving the state of a response count switch; receiving a predetermined threshold; and receiving a predetermined period value.

[0077] In some embodiments, these operations further include: determining that the received state of the response count switch is on; determining that the automatic response switch is on; and in response to determining that the state of the response count switch is on and the automatic response switch is on, turning off the automatic response switch; setting a predetermined threshold to the received predetermined threshold; and setting a predetermined time period to the received predetermined time period value.

[0078] Although this specification contains many specific implementation details, these details should not be construed as limitations on the scope that may be claimed, but rather as descriptions of features that may be specific to particular implementations. Certain features described in the context of separate implementations in this specification can also be implemented in combination in a single implementation. Conversely, the various features described in the context of a single implementation can also be implemented separately or in any sub-combination in multiple implementations. Additionally, although the previously described features may be described as operating in certain combinations and even initially claimed as such, one or more features from the claimed combination can in some cases be removed from the combination, and the claimed combination can relate to a sub-combination or a variant of a sub-combination.

[0079] As used in this disclosure, the terms "a," "an," or "the" are used to include one or more than one, unless the context clearly dictates otherwise. The term "or" is used to refer to a non-exclusive "or" unless otherwise stated. "At least one of A and B" has the same meaning as "A, B, or A and B." Additionally, the wording or terms used in this disclosure, unless otherwise defined, are for descriptive purposes only and not limiting. Any use of section headings is intended to assist in reading the document and should not be construed as restrictive; information related to a section heading may appear within or outside of that particular section.

[0080] As used in this disclosure, the term "about" or "approximately" can permit a degree of variability in a value or range, for example, within 10%, 5%, or 1% of a stated value or a stated range limit.

[0081] As used in this disclosure, the term "substantially" means a majority or most, at least about 50%, 60%, 70%, 80%, 90%, 95%, 96%, 97%, 98%, 99%, 99.5%, 99.9%, 99.99%, or at least about 99.999% or more.

[0082] Values expressed in a range format should be interpreted in a flexible manner to include not only the recited values as the limits of the range, but also all individual values or sub-ranges subsumed within that range as if each individual value and sub-range were explicitly recited. For example, a range of “0.1% to about 5%” or “0.1% to 5%” should be interpreted to include from about 0.1% to about 5%, as well as individual values within the specified range (e.g., 1%, 2%, 3%, and 4%) and sub-ranges (e.g., 0.1% to 0.5%, 1.1% to 2.2%, 3.3% to 4.4%). Unless otherwise stated, “X to Y” has the same meaning as “about X to about Y”. Similarly, unless otherwise stated, the statement “X, Y, or Z” has the same meaning as “about X, about Y, or about Z”.

[0083] Specific embodiments of the subject matter have been described. Other embodiments, variations, and permutations of the described embodiments will be apparent to those skilled in the art within the scope of the appended claims. Although operations are described in a particular order in the figures or claims, these operations need not be performed in the particular order or sequence shown, or all illustrated operations may not be required (some operations may be considered optional) to achieve the desired result. In some cases, multitasking or parallel processing (or a combination of multitasking and parallel processing) may be advantageous and considered appropriate.

[0084] Moreover, the separation or integration of the various system modules and components in the above-described embodiments is not required in all embodiments, and the described components and systems may generally be integrated together or packaged into multiple products.

[0085] Accordingly, the previously described example embodiments do not define or limit the present disclosure. Other changes, substitutions, and alterations are possible without departing from the spirit and scope of the present disclosure.

Claims

1. A storage system, comprising: An interface and a controller, wherein the interface is configured to perform operations including the following: Receiving a command from a host; and Sending a response to the host at a moment, each response in the response being generated in the storage system during a time period and being a response to a corresponding one of the commands.

2. The storage system according to claim 1, wherein, The controller is coupled to the interface and is configured to perform one or more operations including the following: Receiving a command from the host through the interface; and Generating the response in response to receiving the command.

3. The storage system according to claim 1 or 2, wherein In response to determining that the time period is longer than or equal to a predetermined time period, the moment for sending the response is after the time period.

4. The storage system according to claim 1 or 2, wherein In response to determining that the number of generated responses is greater than or equal to a predetermined threshold, the moment for sending the response is during the time period.

5. The storage system according to any one of claims 1 to 4, wherein, The command includes a random read command or a random write command, and wherein the size of each of the random read command or the random write command is less than or equal to 4 kb.

6. The storage system according to any one of claims 1 to 5, wherein, The storage system includes a Universal Flash Storage (UFS) device, and wherein the UFS device includes the controller and a storage device.

7. The storage system according to claim 6, wherein, The corresponding data structure of each read command in the command includes a Read Command UFS Protocol Information Unit (UPIU), the corresponding data structure of each write command in the command includes a Write Command UPIU, the corresponding data structure of each read response in the response includes a Read Response UPIU, and the corresponding data structure of each write response in the response includes a Write Response UPIU.

8. A storage system, comprising: A storage device and a controller coupled to the storage device, wherein the controller is configured to perform operations including the following: Receiving a command from a host; Generating a response during a time period in response to receiving the command, each response in the response being a response to a corresponding one of the commands; and Sending the generated response to the host at a moment.

9. The storage system according to claim 8, wherein, In response to determining that the time period is longer than or equal to a predetermined time period, the moment for sending the response is after the time period.

10. The storage system according to claim 8, wherein, In response to determining that the number of generated responses is greater than or equal to a predetermined threshold, the moment for sending the response is during the time period.

11. The storage system according to any one of claims 8 to 10, wherein, The command includes a random read command or a random write command, and wherein the size of each of the random read command or the random write command is less than or equal to 4 kb.

12. The storage system according to any one of claims 8 to 11, wherein, The storage system includes a Universal Flash Storage (UFS) device, and wherein the UFS device includes the controller and the storage device.

13. The storage system according to claim 12, wherein the corresponding data structure of each read command in the command includes a read command UFS protocol information unit (UPIU), the corresponding data structure of each write command in the command includes a write command UPIU, the corresponding data structure of each read response in the response includes a read response UPIU, and the corresponding data structure of each write response in the response includes a write response UPIU.

14. The storage system according to any one of claims 10 to 13, wherein, The operation further includes: Receiving the status of the response count switch; Receiving a predetermined threshold; and Receiving a predetermined time period value.

15. The storage system according to claim 14, wherein, The operation further includes: Determining that the received status of the response count switch is on; Determining that the auto-response switch is on; and In response to determining that the status of the response count switch is on and the auto-response switch is on: Turning off the auto-response switch; Setting the predetermined threshold to the received predetermined threshold; and Setting the predetermined time period to the received predetermined time period value.

16. A method for controlling a storage system, comprising: Receiving a command from a host; And Sending a response to the host at a moment, each response in the response being generated in the storage system during a time period and being a response to a corresponding one of the commands.

17. The method according to claim 16, wherein, In response to determining that the time period is longer than or equal to a predetermined time period, the moment for sending the response is after the time period.

18. The method according to claim 16, wherein, In response to determining that the number of generated responses is greater than or equal to a predetermined threshold, the moment for sending the response is during the time period.

19. The method according to any one of claims 16 to 18, wherein The command includes a random read command or a random write command, and wherein the size of each of the random read command or the random write command is less than or equal to 4 kb.

20. The method according to any one of claims 16 to 19, wherein, The storage system includes a universal flash storage (UFS) device, and wherein the UFS device includes a controller and one or more storage devices.