Method for allocating a plurality of storage channels of a storage device for a stream data write, storage device and storage medium thereof

CN114691017BActive Publication Date: 2026-08-28SK HYNIX INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011612762.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-30
Publication Date
2026-08-28
Estimated Expiration
2040-12-30

AI Technical Summary

Technical Problem

由此可知,输入输出的操作的效率可能会下降

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114691017B_ABST
    Figure CN114691017B_ABST
Patent Text Reader

Abstract

A method for allocating a plurality of storage channels of a storage device for a stream data write, a storage device and a storage medium thereof. The method comprises the steps of: providing, by a controller of the storage device for processing a stream data write of a plurality of streams, overall available storage channel status data and stream applicable storage channel status data for one stream of the plurality of streams; generating stream available storage channel status data for the stream based on the overall available storage channel status data and the stream applicable storage channel status data for the stream; selecting available storage channels according to the stream available storage channel status data for the stream; updating the overall available storage channel status data and updating the stream applicable storage channel status data for the stream for the selected available storage channels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an electronic device, and more particularly to a method for allocating multiple storage channels of a storage device for streaming data writing, a storage device, and a storage medium thereof. Background Technology

[0002] Because data stored in non-volatile storage devices is not lost after power is cut off, and they are energy-efficient and small in size, non-volatile storage devices, such as flash memory-based storage devices, are widely used in electronic devices. In addition, non-volatile storage devices, such as solid-state storage devices (SSDs), have gradually become the storage devices equipped in computer systems such as desktop computers, laptops, and servers.

[0003] When electronic devices (or hosts) execute applications to store various types of data such as text, data, photos, and play audio or video, they often need to make a large number of data write or read requests to storage devices (such as SSDs) in a short period of time. To improve the capacity and performance of storage devices like SSDs, the number of memory chips and channels in SSDs has been gradually increasing. SSD controllers utilize these memory chips to achieve high-performance input / output operations through multi-channel and interleaved page read or write operations.

[0004] However, in real-world applications, when multiple applications simultaneously or at close range request large amounts of data to be written, this data from different applications is transmitted to the SSD irregularly, like random data. The SSD controller can only allocate the received data sequentially to the memory chips across multiple channels. The data to be written by one of these applications might only be allocated to a smaller number of memory chips. Consequently, when this data needs to be read, it can only be read from a smaller number of memory chips. Therefore, the efficiency of input / output operations may decrease. Summary of the Invention

[0005] The embodiment provides a method, storage device, and storage medium for allocating multiple storage channels of a storage device for streaming data writing. This method enables allocation of write operations and is applicable to handling write operations from multiple applications on a host. It individually allocates write operations for at least one of these streams, thereby facilitating the more even distribution of write data corresponding to the stream across the memory chips of the multiple channels of the storage device. This helps improve the performance when reading data from the storage device.

[0006] An implementation provides a method for allocating multiple storage channels of a storage device for writing streaming data, the method comprising the following steps: (a) a controller of the storage device for processing streaming data writing of multiple streaming streams provides overall available storage channel status data and streaming applicable storage channel status data for one of the multiple streaming streams, wherein the overall available storage channel status data indicates whether each of the multiple storage channels has been allocated for writing streaming data, and the streaming applicable storage channel status data indicates whether each of the multiple storage channels has been allocated for writing streaming data for the streaming stream; (b) the controller, based on the overall available storage channel status data and the streaming applicable storage channel status data for the streaming stream... According to the method, the following steps are taken: (a) generating streaming available storage channel status data for the streaming stream, wherein the streaming available storage channel status data for the streaming stream indicates whether each of the plurality of storage channels is available to be allocated for writing streaming data for the streaming stream; (b) the controller selects an available storage channel based on the streaming available storage channel status data for the streaming stream; (c) updating the overall available storage channel status data for the selected available storage channel to indicate that the selected available storage channel has been allocated for writing streaming data for the streaming stream; and (d) updating the streaming applicable storage channel status data for the streaming stream for the selected available storage channel to indicate that the selected available storage channel has been allocated for writing streaming data for the streaming stream.

[0007] In some embodiments, the controller is configured to allocate the plurality of storage channels for writing streaming data to the plurality of streams, and to provide individual streaming-applicable storage channel status data for each of the plurality of streams.

[0008] In some embodiments, after the controller performs steps (b) to (e) for one of the plurality of streams, the controller performs steps (b) to (e) for one of the plurality of streams.

[0009] In one embodiment, after step (e), the method further includes issuing a notification to perform a write operation on the stream and the selected available storage channel.

[0010] In one embodiment, the method further includes issuing a notification to perform a write operation on the plurality of storage channels when the overall available storage channel status data indicates that each of the plurality of storage channels has been allocated for writing streaming data.

[0011] Another embodiment provides a storage medium that records program code for causing a storage device to execute a method for allocating multiple storage channels of the storage device for streaming data writing, as described in any of the above embodiments.

[0012] Another embodiment provides a storage device, including: a plurality of memory chips and a controller. The controller is coupled to the plurality of memory chips via a plurality of memory channels for processing streaming data writing of a plurality of streams. The controller is configured to perform a plurality of operations, the plurality of operations including: (a) providing overall available memory channel status data and streaming applicable memory channel status data for a single stream, wherein the overall available memory channel status data indicates whether each of the plurality of memory channels has been allocated for writing streaming data, and the streaming applicable memory channel status data indicates whether each of the plurality of memory channels has been allocated for writing streaming data for the stream; (b) based on the overall available memory channel status data and the streaming applicable memory channel status data for the stream, generating a data processing mechanism for the stream. (c) Selecting an available storage channel based on the available storage channel status data for the stream; (d) updating the overall available storage channel status data for the selected available storage channel to indicate that the selected available storage channel has been allocated for writing stream data; and (e) updating the applicable storage channel status data for the stream based on the selected available storage channel to indicate that the selected available storage channel has been allocated for writing stream data.

[0013] In one embodiment, the controller is configured to allocate the plurality of storage channels for writing streaming data to the plurality of streaming streams, and to provide individual streaming-applicable storage channel status data for each of the plurality of streaming streams.

[0014] In one embodiment, after the controller performs operations (b) to (e) for one of the plurality of streams, the controller performs operations (b) to (e) for one of the plurality of streams.

[0015] In one embodiment, after operation (e), the plurality of operations further include issuing a notification to perform a write operation on the stream and the selected available storage channel.

[0016] In one embodiment, the plurality of operations further include issuing a notification to perform a write operation on the plurality of storage channels when the overall available storage channel status data indicates that each of the plurality of storage channels has been allocated for writing streaming data.

[0017] Accordingly, the above embodiments provide a method, storage device and storage medium for allocating multiple storage channels of a storage device for streaming data writing, which can implement an allocation method for write operations, and is applicable to handling write operations of multiple applications from a host, and individually allocating write operations for at least one of these streams. Attached Figure Description

[0018] Figure 1 A schematic block diagram of one embodiment of a storage device;

[0019] Figure 2 A schematic block diagram of one embodiment of the controller;

[0020] Figure 3 A schematic flowchart of an embodiment of a method for allocating multiple storage channels of a storage device for streaming data writing;

[0021] Figure 4 for Figure 3 A schematic diagram of an embodiment of step S10;

[0022] Figure 5 for Figure 3 A schematic diagram of one embodiment of step S20;

[0023] Figure 6 for Figure 3 A schematic diagram of one embodiment of steps S30 to S50;

[0024] Figure 7 To execute against a stream Figure 3 A schematic diagram of one embodiment of step S20;

[0025] Figure 8 To execute against a stream Figure 3 A schematic diagram of one embodiment of steps S30 to S50;

[0026] Figure 9 for Figure 3 A schematic diagram of another embodiment of the method;

[0027] Figure 10 For based on Figure 3 A schematic flowchart of another embodiment of the method;

[0028] Figure 11For application Figure 10 A schematic diagram illustrating an example of the written data arrangement obtained by the method; and

[0029] Figure 12 Based on Figure 11 This is a schematic diagram illustrating an example of how data is arranged in a sequence when a storage device outputs a stream of data.

[0030] Figure Labels

[0031] 10 mainframes

[0032] 100, 300 controllers

[0033] 110 Processing Unit

[0034] 120 buffer units

[0035] 130_1~130_N storage channels

[0036] 140 Storage Channel Control Unit

[0037] 150 Host Interface Unit

[0038] 160 bus

[0039] 200 memory

[0040] D1_1~D1_M, DN_1~DN_M memory chips

[0041] 310 Host Interface Layer

[0042] 320 Flash Memory Translation Layer

[0043] 330 Flash Memory Interface Layer

[0044] Steps S10 to S50

[0045] Steps S100~S210

[0046] GACD overall available storage channel status data

[0047] SSCD_S0, SSCD_S1 to SSCD_SP are applicable storage channels for status data.

[0048] SSCD_SX stream is used to store channel status data.

[0049] SACD_S0 and SACD_S1 streams can store channel status data.

[0050] SACD_SX stream available storage channel status data

[0051] OPN Data Operations

[0052] WB Write to temporary register

[0053] WSA Write Data Arrangement Detailed Implementation

[0054] To fully understand the purpose, features and effects of the present invention, the present invention will be described in detail below with reference to the following specific embodiments and accompanying drawings.

[0055] Please refer to Figure 1 It illustrates an embodiment of the storage device of the present invention. Figure 1 Storage devices can be used to achieve Figure 3 The method or related embodiments for allocating multiple storage channels of a storage device for streaming data writing (which will be described in detail later and will be omitted here for now) are applicable to handling write operations of multiple applications from a host, individually allocating write operations for at least one of these streams, thereby facilitating the storage of the write data corresponding to the stream in a more even distribution across the memory chips of the multiple channels of the storage device. The following is about... Figure 1 and Figure 2 The examples are provided to illustrate applicable scenarios in implementing the present invention; however, the implementation of the present invention is not limited to the examples.

[0056] like Figure 1 As shown, the storage device includes a controller 100 and a memory 200. The controller 100 includes a processing unit 110, a buffer unit 120, multiple storage channels 130_1 to 130_N (where N is an integer greater than 1), and corresponding storage channel control units 140. The buffer unit 120 can be implemented using volatile or non-volatile memory. The memory 200 includes multiple memory chips D1_1 to D1_M to DN_1 to DN_M (where N and M are integers greater than 1). For example, the memory chips are flash memory, such as NOR or NAND flash memory; however, the implementation of this invention is not limited to this example.

[0057] The controller 100 can communicate with the host 10 via the host interface unit 150 to receive read or write requests from the host 10. The controller 100 generates corresponding read or write commands for each host read or write request and transmits these commands to the storage channel control unit 140 of the corresponding storage channel (e.g., 130_1 to 130_N). The storage channel control unit 140 controls at least one memory chip. For example, the storage channel control unit 140 transmits a data read command to a memory chip and transmits the read data to the controller 100, such as to the buffer unit 120. The controller 100 transmits the data requested by the host 10 to the host 10. For another example, the storage channel control unit 140 writes the data to be written to the memory chip according to a data write command. When the controller 100 controls the operation of the memory 200, the buffer unit 120 can store data used by the controller 100 and the memory 200 for various operations such as read operations, write operations, programmed operations, and erase operations. Figure 1 In this embodiment, multiple storage channel control units 140 operate read or write operations in parallel. Furthermore, the processing unit 110 can be electrically coupled to the storage channels (e.g., 130_1 to 130_N) via a bus 160. However, the implementation of this invention is not limited to the above examples. For instance, the aforementioned storage channel control units can be implemented using logic circuits or programmable circuits, or implemented in software and executed by the processing unit 110.

[0058] The host interface unit 150 can process commands and data provided from the host 10, and can communicate with the host 10 through at least one of various interface protocols such as Universal Serial Bus (USB), Multimedia Card (MMC), Peripheral Component Connect-Fast (PCI-E), Serial Attached SCSI (SAS), Serial Advanced Technology Connect (SATA), Parallel Advanced Technology Connect (PATA), Small Computer System Interface (SCSI), Enhanced Small Panel Interface (ESDI) and Integrated Drive Circuit (IDE), Advanced Host Controller Interface (AHCI), and Non-Volatile Memory Express (NVMe).

[0059] Please also refer to Figure 1 and Figure 2 ,in Figure 2 This is a schematic block diagram of one embodiment of the controller. Figure 2The architecture of controller 300 is presented as either firmware or software implementation. For example, controller 300 includes a host interface layer 310, a flash memory translation layer 320, and a flash memory interface layer 330. Host interface layer 310 communicates with host 10 and serves as the interface between host 10 and controller 300. Flash memory translation layer 320 manages read, write, and erase operations. Flash memory translation layer 320 further translates logical addresses (such as logical block addresses or logical page addresses) into physical addresses (such as physical block addresses or physical page addresses) corresponding to the memory chips (such as D1_1 to D1_M to DN_1 to DN_M) of memory 200. Flash memory interface layer 330 handles communication between flash memory translation layer 320 and memory 200, such as transmitting commands from flash memory translation layer 320 to memory 200.

[0060] Figure 2 The controller 300 shown can be used Figure 1 The hardware architecture is implemented as follows. The flash memory translation layer 320 needs to refer to and maintain an address mapping table when converting logical addresses to physical addresses. Because the address mapping table is large, the flash memory translation layer 320 stores a portion of the address mapping table in a cache. When the cache does not contain the required correspondence between logical and physical addresses, the flash memory translation layer 320 needs to update the contents of the address mapping table in the cache to generate a mapping table read command. Furthermore, in some memory product applications, such as embedded multimedia cards (eMMC) or other memory products, the address mapping table is stored in the memory of the memory product, and this invention is not limited to this example.

[0061] Controller 300 controls various operations on memory 200, such as write operations, read operations, programmed operations, and erase operations. For example, the controller can generate and execute write commands upon a write request from host 10. The controller can utilize a command queue to store host write commands. The controller can process the host write commands stored in the command queue sequentially to perform data write operations.

[0062] Furthermore, the controller 300 can control the firmware algorithms used in the flash memory translation layer 320. For example, the controller 300 can implement algorithms including garbage collection (GC), wear-leveling (WL), block reclaim (BC), and runtime bad block (RBB).

[0063] above Figure 1 and Figure 2To illustrate the applicable scenarios in which the present invention can be implemented, it is acknowledged that the implementation of the present invention is not limited to the above examples. In practical application scenarios, a host may execute multiple applications, which may simultaneously or within a short period of time request the writing of large amounts of data; these write data requests will then be transmitted irregularly to storage devices (such as SSDs), for example, to the write buffer of the storage device, much like random data. To allow for the individual allocation of write operations for at least one of these streams, thereby facilitating the more even storage of the write data corresponding to the stream across multiple channels of memory chips, the following is an embodiment of a method for allocating multiple storage channels of a storage device for streaming data writing.

[0064] Please refer to Figure 3 This is a schematic flowchart of an embodiment of a method for allocating multiple storage channels of a storage device for streaming data writing. Please refer to... Figure 1 and 3 , Figure 3 One embodiment of the method includes the steps S10 to S50. References are made thereto. Figure 1 The components in the examples are provided for illustrative purposes; however, the implementation of the method is not limited to these examples.

[0065] As shown in step S10, the controller 100 provides overall available storage channel status data and stream-applicable storage channel status data for one of the multiple streams, wherein the overall available storage channel status data indicates whether each of the multiple storage channels has been allocated for writing stream data, and the stream-applicable storage channel status data indicates whether each of the multiple storage channels has been allocated for writing stream data for the stream.

[0066] As shown in step S20, the controller 100 generates streaming available storage channel status data for the streaming stream based on the overall available storage channel status data and the streaming applicable storage channel status data for the streaming stream. The streaming available storage channel status data for the streaming stream indicates whether each of the plurality of storage channels can be allocated for writing streaming data for the streaming stream.

[0067] As shown in step S30, the controller 100 selects an available storage channel based on the stream available storage channel status data for the stream.

[0068] As shown in step S40, the overall available storage channel status data is updated for the selected available storage channel to indicate that the selected available storage channel has been allocated for writing streaming data.

[0069] As shown in step S50, for the selected available storage channel, the stream-applicable storage channel status data for the stream is updated to indicate that the selected available storage channel has been allocated for writing stream data for the stream.

[0070] From the above steps S10 to S50, it can be seen that, Figure 3 The method helps to store the write data corresponding to the streams in a more even distribution across the memory chips of multiple channels of the storage device by individually allocating write operations for at least one of these streams.

[0071] The following examples further illustrate the above. Figure 3 Various implementations of the method.

[0072] In some embodiments, the controller 100 allocates the plurality of storage channels to write streaming data to the plurality of streams. The stream in steps S10 to S50 is one of the plurality of streams, and the controller 100 provides individual stream-specific storage channel status data for each of the plurality of streams. For example, in some application scenarios, the host may be allowed to associate each write operation with a stream, each stream being considered as corresponding to an application. The request for a write operation on the stream includes relevant stream information, such as an identifier or any suitable information to help the storage device controller distinguish between different streams. For example, write data from the host may be stored in the write register of the storage device along with a corresponding stream identifier. Write data for a particular stream may originate from the same file or application and is sequential data. When multiple applications simultaneously transmit sequential data from different streams to a storage device, the storage device method of this embodiment can be configured to individually allocate the sequential data of each of these streams, thereby helping to store the sequential data corresponding to the multiple streams in a more uniform distribution across the memory chips of multiple channels of the storage device.

[0073] For details, please refer to Figure 4 , it is Figure 3 A schematic diagram of one embodiment of step S10. Figure 4 In the controller, two different status data are provided to facilitate write operation allocation. The first status data is global available channel status data (GACD). The second status data is stream suitable channel status data (SSCD) for individual streams. Figure 4 In this embodiment, there are P+1 streams (where P is a non-zero positive integer), and the controller provides stream-specific storage channel status data (e.g., represented by SSCD_S0, SSCD_S1 to SSCD_SP) for streams 0, 1 to P respectively. This status data can be represented, for example, using a bitmap, bytes, numbers, characters, tables, or any suitable data structure. For ease of explanation, in... Figure 4 In the relevant diagrams and embodiments, these state data are exemplified by representing them using a bit array; however, the implementation of the present invention is not limited to these examples. Figure 4 In the embodiments, for example, Figure 1 Taking a storage device with eight storage channels (0-7) as an example, the eight bits of the Overall Available Storage Channel Status Data (GACD) from left to right indicate whether each channel (0-7) has been allocated for writing streaming data. For example, bit 0 indicates that the storage channel is unavailable, and bit 1 indicates that the storage channel is available. Furthermore, the Stream Applicable Storage Channel Status Data (SSCD_S0) indicates whether each of the seven storage channels (0-7) has been allocated for writing streaming data to stream 0. For example, bit 0 indicates that the storage channel is not applicable, and bit 1 indicates that the storage channel is applicable. The phrase "the storage channel is applicable" means that the storage channel was not allocated for writing streaming data to stream 0 during this allocation process. If the storage channel is used, the written data will be allocated to a previously unused storage channel, thus avoiding reuse of the same storage channel. Therefore, the storage channel is applicable for this allocation process. Conversely, "the storage channel is not applicable" means that it was already allocated for writing streaming data to stream 0 before this allocation process (e.g., in the previous allocation process). Therefore, if the storage channel is used in this allocation process, the written data will reuse the same storage channel, hence it is considered inapplicable. Similarly, the streaming applicable storage channel status data SSCD_S1 indicates whether each of storage channels 0 to 7 has been allocated for writing streaming data to stream 1; and so on, the streaming applicable storage channel status data SSCD_SP indicates whether each of storage channels 0 to 7 has been allocated for writing streaming data to stream P.

[0074] Furthermore, in practical applications, the controller 100 may need to execute the logic separately for each individual stream. Figure 3 The allocation process is repeated multiple times, thus handling the writing of multiple stream data.

[0075] Please refer to Figure 5 , it is Figure 3 A schematic diagram of one embodiment of step S20. (See diagram below.) Figure 5As shown, the controller 100 generates stream available channel status data (SACSD, denoted as SACD_S0) for a specific stream (e.g., stream 0) based on the overall available channel status data (GACD) and the stream available channel status data (SSCD_S0) for a particular stream (e.g., stream 0). The stream available channel status data SACD_S0 for stream 0 indicates whether each of the storage channels 0 to 7 is available for allocation as write stream data for stream 0; for example, bit 0 indicates the storage channel is unavailable, and bit 1 indicates the storage channel is available. According to step S20, the controller 100 performs a data operation OPN based on the overall available channel status data GACD and the stream available channel status data SSCD_S0 for stream 0 to generate the stream available channel status data SACD_S0 for stream 0. In this embodiment, the data operation OPN is, for example, a bitwise AND operation. Figure 5 As shown, the overall available storage channel status data (GACD) is "01011001", and the stream available storage channel status data SSCD_S0 for stream 0 is "00111001". Therefore, the stream available storage channel status data SACD_S0 is "00011001". In some instances, the data operation OPN can be implemented as other suitable bit-based logical operations, and the meaning represented by the bits can be defined in the opposite way. Therefore, the implementation of this invention is not limited to the examples.

[0076] Please refer to Figure 6 , it is Figure 3 A schematic diagram of one embodiment of steps S30 to S50. According to step S30, the controller 100 selects an available storage channel based on the stream available storage channel status data SACD_S0 for stream 0. For example... Figure 6 As shown, the available storage channel status data SACD_S0 for the stream is "00011001". This example indicates that storage channels 3, 4, and 7 are currently available for writing data to stream 0, and controller 100 can select at least one or all of storage channels 3, 4, and 7 to write data to stream 0. Figure 6In the example, controller 100 selects bits 3 and 4 (as indicated by the dashed circle), indicating that the selected available storage channels are storage channels 3 and 4. Controller 100 accordingly allocates storage channels 3 and 4 to store data from stream 0. According to step S40, controller 100 updates the Global Available Storage Channels Status Data (GACD) for the selected available storage channels (e.g., storage channels 3 and 4) to indicate that the selected available storage channels (e.g., storage channels 3 and 4) have been allocated for writing stream data. Figure 6 In the example, if the bits corresponding to storage channels 3 and 4 in the Overall Available Storage Channel Status Data (GACD) are set to bit 0, then the updated Overall Available Storage Channel Status Data (GACD) will be "01000001". On the other hand, according to step S50, for the selected available storage channels (such as storage channels 3 and 4), the Stream Applicable Storage Channel Status Data SSCD_S0 for stream 0 is updated to indicate that the selected available storage channels have been allocated for writing stream data to stream 0. Figure 6 In the example, if the bits corresponding to storage channels 3 and 4 in the streaming applicable storage channel status data SSCD_S0 are set to bit 0, then the updated streaming applicable storage channel status data SSCD_S0 will be "00100001".

[0077] In some embodiments, after the controller 100 performs steps (b) to (e) for one of the plurality of streams, the controller 100 performs steps (b) to (e) for the same stream. Please refer to [link to relevant documentation]. Figure 7 It is executed for a single stream (e.g., stream 1). Figure 3 A schematic diagram of one embodiment of step S20. Continuing from the above... Figures 4 to 6 In the example, Figure 7 As illustrated, according to step S20, the controller 100 performs the aforementioned data operation OPN based on the overall available storage channel status data GACD and the stream available storage channel status data SSCD_S1 for stream 1 to generate stream available storage channel status data SACD_S1 for stream 1. Figure 7 As shown, the overall available storage channel status data (GACD) is "01000001", and the stream available storage channel status data SSCD_S1 for stream 1 is "01000001". Therefore, the stream available storage channel status data SACD_S1 is "01000001".

[0078] Figure 8 To execute on a stream (e.g., stream 1) Figure 3A schematic diagram of one embodiment of steps S30 to S50. According to step S30, the controller 100 selects an available storage channel based on the stream available storage channel status data SACD_S1 for stream 1. For example... Figure 6 As shown, the available storage channel status data SACD_S1 for the stream is "01000001". This example indicates that storage channels 1 and 7 are currently available for writing data to stream 1, and controller 100 can select at least one or all of storage channels 1 and 7 to write data to stream 1. Figure 7 In the example, controller 100 selects bits 1 and 7 (as indicated by the dashed circle), indicating that the selected available storage channels are storage channels 1 and 7. Controller 100 accordingly allocates storage channels 1 and 7 to store data from stream 1. According to step S40, controller 100 updates the Global Available Storage Channels Status Data (GACD) for the selected available storage channels (e.g., storage channels 1 and 7) to indicate that the selected available storage channels (e.g., storage channels 1 and 7) have been allocated for writing stream data. Figure 7 In the example, if the bits corresponding to storage channels 1 and 7 in the Overall Available Storage Channel Status Data (GACD) are set to bit 0, then the updated Overall Available Storage Channel Status Data (GACD) will be "00000000". On the other hand, according to step S50, for the selected available storage channels (such as storage channels 1 and 7), the Stream Applicable Storage Channel Status Data SSCD_S1 for stream 1 is updated to indicate that the selected available storage channels have been allocated for writing stream data to stream 1. Figure 7 In the example, if the bits corresponding to storage channels 1 and 7 in the streaming applicable storage channel status data SSCD_S1 are set to bit 0, then the updated streaming applicable storage channel status data SSCD_S1 will be "00000000".

[0079] Please refer to Figure 9 , it is Figure 3 A schematic diagram of another embodiment of the method. Continuing from the above... Figure 8 Examples, such as Figure 8 As shown, when the content of the storage channel status data (e.g., SSCD_S1) for a stream (e.g., stream 1) indicates that after one round of allocation for the stream (e.g., one or more executions of steps S20 to S50), the data of the stream (at least a portion of it) has been evenly distributed to all storage channels, as... Figure 9As shown, the content of the applicable storage channel status data (e.g., SSCD_S1) for the stream (e.g., stream 1) is reset, for example, to "11111111", to indicate that subsequent data allocation for stream 1 will continue through repeated steps S20-S50. In some application scenarios, after this round of allocation for the stream is completed, stream 1 may have new write data, or after this round of allocation for the stream, there may still be unallocated write data in stream 1. In other application scenarios, after resetting the content of the applicable storage channel status data (e.g., SSCD_S1) for the stream (e.g., stream 1), stream 1 can be assigned to represent a stream of an application, or the same application.

[0080] In addition, such as Figure 8 As shown, when the content of the Overall Available Storage Channel Status Data (GACD) (e.g., "00000000") indicates that after one round of allocation for the plurality of storage channels (e.g., storage channels 0-7) and the plurality of streams (i.e., overall) (e.g., after executing steps S20-S50 once or more for at least one or more streams), such that the data of at least one stream has been evenly distributed to all storage channels, as... Figure 9 As shown, the contents of the Overall Available Storage Channel Status Data (GACD) are reset, for example, to "11111111", to indicate that the allocation of data for subsequent streams will continue by repeating steps S20 to S50. In some application scenarios, after this round of allocation for the whole, there may still be streams (e.g., stream 0, stream P) with data still being written, or after this round of allocation for the whole, there may be new stream data.

[0081] In some embodiments, after step S50, the method optionally further includes issuing a notification for a write operation to the stream and the selected available storage channel. For example, controller 100 may be configured or programmed to update a stream (such as...) Figure 6 In the illustrated embodiment, after the stream (e.g., stream 0) is used to store channel status data (e.g., SSCD_S0), the controller 100 issues an internal notification for a write operation to the stream (e.g., stream 0) and the selected available storage channel (e.g., storage channel 3, 4). For example, please refer to... Figure 1 and Figure 3 Implemented in controller 100 Figure 3 In the flash memory translation layer 320, the flash memory translation layer 320 contains multiple modules responsible for different functions, such as those based on... Figure 3The method includes modules (such as a "stream data allocation module"), a data writing module, and other modules. In this embodiment, after updating the stream applicable storage channel status data SSCD_S0 for stream 0, the stream data allocation module in controller 100 sends an internal notification to the data writing module to perform a write operation for stream 0 and the selected available storage channels 3 and 4, thus initiating the data writing module to perform the relevant data writing operation. Furthermore, controller 100 can be configured or programmed to update the data for a stream (such as a stream data allocation module), and then... Figure 8 After the streaming channel status data (such as SSCD_S1) of the streaming stream 1) illustrated in the embodiment is applied, the controller 100 may also issue an internal notification for writing operations to the streaming stream (such as streaming stream 1) and the selected available storage channels (such as storage channels 1 and 7).

[0082] In one embodiment, the method may optionally further include issuing a notification to perform a write operation on the plurality of storage channels when the Global Available Storage Channel Status Data (GACD) (e.g., "00000000") indicates that each of the plurality of storage channels has been allocated for writing streaming data. For example, the controller 100 may be configured or programmed to, when the Global Available Storage Channel Status Data (GACD) is "00000000", issue an internal notification in the streaming data allocation module of the controller 100 to the data writing module to perform a write operation on all storage channels, thereby initiating the data writing module to perform the relevant data writing operation.

[0083] Figure 10 For based on Figure 3 A schematic flowchart of another embodiment of the method. Figure 10 The method can be applied to components including controller 100 and memory 200, such as... Figure 1 Storage device. Controller 100 is coupled to the multiple memory chips (e.g., M chips per memory channel, i.e., N x M memory chips in total) via multiple storage channels to process the writing of streaming data from multiple streams.

[0084] As shown in step S100, the controller 100 provides Global Available Memory Channel Status Data (GACD) and Stream Applicable Memory Channel Status Data (SSCD) for at least one of the multiple streams. The meanings of these two states are as described above regarding... Figure 3 The example of step S10 is described. For instance, if the two types of state data are represented by a bit array, during initialization, all bits of the Global Available Memory Channel Status Data (GACD) are set to 1, and all bits of the Stream Applicable Memory Channel Status Data (SSCD) for at least one stream are set to 1.

[0085] As shown in step S110, the controller 100 determines whether to begin processing at least one stream based on at least one judgment criterion. Figure 3 Steps S20 to S50 are performed to allocate data for the write operation, distributing the streaming data in the write buffer. In this embodiment, this judgment criterion is optional or flexible and can be designed according to the scheduling policy of the controller 100 at the time of implementation. The implementation of this invention is not limited by this judgment criterion. In some embodiments, the judgment criterion may be whether the amount of streaming data in the write buffer is greater than or equal to the buffer threshold value, where the amount of streaming data may refer to the amount of data in a certain streaming data volume, the total amount of data in all current streaming data, or the total number of streaming data or other suitable parameters. For example, when the amount of streaming data (such as the total number of streaming data) is greater than the buffer threshold value (such as 3), the judgment result of step S110 is yes; otherwise, the judgment result is no. In addition, in another embodiment, the judgment criterion may be whether the idle time is greater than or equal to the time threshold value. If the idle time is greater than or equal to the time threshold, the judgment result of step S110 is yes; otherwise, the judgment result is no. If the judgment result of step S110 is yes, then the following steps are executed.

[0086] As shown in step S120, one stream is selected from multiple streams. If there are P+1 streams (where P is a non-zero positive integer), one stream X (where X>=0 or X<=P) is selected from streams 0 to P. In this embodiment, the criterion for selecting the stream in step S120 is optional or flexible and can be selected according to the scheduling strategy of the controller 100 at the time of implementation. For example, the criterion for selecting the stream can be determined based on the stream's priority, waiting time, data volume, or other relevant and suitable parameters, or multiple parameters. The implementation of the present invention is not limited by this criterion for selecting the stream.

[0087] As shown in step S130, the controller 100 generates stream available storage channel status data (such as SACD_SX) for stream X based on the overall available storage channel status data (GACD) and the stream applicable storage channel status data (such as SSCD_SX) for stream X. The stream available storage channel status data SACD_SX for stream X indicates whether each of the N storage channels can be allocated for writing stream data for stream X.

[0088] As shown in step S140, the controller 100 selects an available storage channel based on the stream available storage channel status data SACD_SX for stream X. For example, please refer to the aforementioned... Figure 5 or Figure 7 Examples of implementations.

[0089] As shown in step S150, for the selected available storage channel in step S140, the Global Available Storage Channel Status Data (GACD) is updated to indicate that the selected available storage channel has been allocated for writing stream data; and similarly, the Stream Applicable Storage Channel Status Data SSCD_SX for the stream X is updated to indicate that the selected available storage channel has been allocated for writing stream data for the stream. Step S150 is based on Figure 3 The steps S40 and S50 are performed, for example, please refer to the above. Figure 6 or Figure 8 Examples of implementations.

[0090] As shown in step S160, after step S150, optionally, Figure 10 The method may further include issuing a notification to perform a write operation on the stream X and the available storage channel selected in step S140. For example, please refer to the aforementioned... Figure 6 or Figure 8 Related embodiments.

[0091] As shown in step S170, the controller 100 determines whether the content of the stream-applied storage channel status data SSCD_SX for stream X indicates that the data of stream X (at least partially) has been evenly distributed to all storage channels. If the content of the stream-applied storage channel status data SSCD_SX is equal to, for example, "00000000", then the determination result of step S170 is yes; otherwise, the determination result of step S170 is no. If the determination result of step S170 is yes, then step S180 is executed. If the determination result of step S170 is no, then step S190 is executed.

[0092] As shown in step S180, the controller 100 resets the content of the stream-applicable storage channel status data SSCD_SX for stream X, for example, resetting it to "11111111". Please refer to the information about... Figure 8 and Figure 9 An example related to resetting state data.

[0093] As shown in step S190, the controller 100 determines whether the content of the Overall Available Memory Channel Status Data (GACD) indicates that after a round of overall allocation for N memory channels and at least one selected stream (which may be part or all of stream P+1), the data of the selected stream has been evenly distributed to all memory channels. For example, if the content of the Overall Available Memory Channel Status Data (GACD) is equal to, for example, "00000000", then the determination result of step S190 is yes; otherwise, the determination result of step S190 is no. If the determination result of step S190 is yes, then step S200 is executed. If the determination result of step S190 is no, then starting from step S110, step S120 and subsequent processes are performed for another selected stream to allocate write data for the individual stream.

[0094] As shown in step S200, the controller 100 resets the contents of the Overall Available Storage Channel Status Data (GACD), for example, to "11111111". Please refer to the information about... Figure 8 and Figure 9 An example related to resetting state data.

[0095] As shown in step S210, optionally, after step S200... Figure 10 The method further includes issuing a notification for write operations to the plurality of storage channels. For example, the controller 100 can be configured or programmed to have the streaming data allocation module issue an internal notification for write operations to all storage channels to the data writing module, thereby initiating the data writing module to perform the relevant data write operations. For example, please refer to the embodiment regarding issuing the notification.

[0096] In the above Figure 10 In embodiments of the method, steps S160 and S210 are optional. Therefore, in some examples, step S170 can be executed after step S150, and / or after step S200, subsequent steps can be executed starting from step S110 or S120 to perform the allocation of write data for the selected stream.

[0097] Please refer to Figure 11 Its application Figure 10 A schematic diagram illustrating an example of the arrangement of written data obtained by the method of storing data on a storage device. For example... Figure 11The horizontally arranged grid above illustrates that the write register WB of the storage device contains multiple streams of data (e.g., 5 streams). The symbols in each grid, such as "S1,0" representing the 0th data page of stream 1 (or data page 0 of stream 1), "S1,1" representing the 1st data page of stream 1 (or data page 1 of stream 1), and "SX,Y" representing the Yth data page of stream X (or data page Y of stream X), and X and Y are non-negative integers. Figure 11 The grid array below (e.g., 7x4 grids) represents the... Figure 10 This is a schematic diagram illustrating an example of the write data arrangement WSA obtained by allocating the five streams of data written to the scratchpad WB using a storage device method. Figure 11 In the WSA (Write Data Arrangement), each row of cells corresponds to a storage location provided by a specific storage channel (such as any one of storage channels 0 to 7). These storage locations are in units of data pages. For example, the leftmost row represents storage locations 0 to 3 provided by storage channel 0, storing data pages 0 (S1,0) of stream 1, 3 (S3,3) of stream 3, 3 (S2,3) of stream 2, and 3 (S4,3) of stream 4 from top to bottom. The meanings of the cells in other rows can be deduced similarly, so they will not be elaborated further. For ease of explanation, Figure 11 This only shows a portion of the storage locations provided by each storage channel. Furthermore, the storage locations provided by each storage channel can be implemented using one or more memory chips. The above regarding... Figure 11 The example is provided for illustrative purposes only. Figure 10 The method for storing the device is merely an example of a possible configuration, and the implementation of the present invention is not limited to this example.

[0098] Please refer to Figure 11 Stream 2 has pages 0-7 of data to be written, therefore the application... Figure 10 The method for storing data in stream 2 allows controller 100 to evenly distribute the write data of pages 0 to 7 of stream 2 across storage channels 0 to 7, as illustrated by the grids with thick squares in the write data arrangement WSA, which represent the distribution of data pages of stream 2 across storage channels 0 to 7. Please refer to... Figure 12 Based on Figure 11 This is a schematic diagram illustrating an example of how data is allocated and arranged when a storage device outputs data from a stream (e.g., stream 2). Figure 12 As shown, the cells with thick squares in the WSA (Write Data Arrangement) accompanied by upward arrows indicate that multiple data pages of stream 2 can be read simultaneously from storage locations 0-7 of storage channels. Due to this parallel processing, enhanced read efficiency is achieved. Furthermore, in Figure 11In the example, stream 3 also has data written to pages 0 to 7, so it can achieve the same effect in a similar way.

[0099] In practical applications, the total data volume of each stream differs. For example, stream 1 has pages 0-5, while streams 4 and 5 have pages 0-4. Therefore, applications... Figure 10 With this storage device method, after all streams 1-5, the data pages of each stream in streams 1, 4, and 5 can be evenly distributed across different storage channels. Overall, the data in the streams can be more evenly distributed to appropriate storage locations within the storage channels to provide better durability or improve performance, such as enhanced read efficiency.

[0100] In some embodiments, a storage device includes: a plurality of memory chips (such as...) Figure 1 (as shown in memory 200) and controller (such as Figure 1 The controller 100 is coupled to the plurality of memory chips via multiple storage channels to process the writing of multiple streams of streaming data. The controller 100 is configured to perform multiple operations, including those corresponding to... Figure 3 The operation of steps S10 to S50 in the control method. In some embodiments, the storage device can be configured or programmed to implement the above-mentioned control method. Figure 3 The method can be implemented as at least one or a combination thereof in several embodiments. The storage device can be a solid-state storage device (SSD), universal flash memory (UFS), embedded multimedia card (eMMC), or any other suitable storage device or storage-based product.

[0101] Furthermore, in the above embodiments regarding storage devices (such as...) Figure 1 , Figure 2In this invention, at least one or a combination of the processing unit 110, the storage channel control unit 140, and the host interface unit 150 can be implemented using one or more circuits, such as a microcontroller, processor, or digital signal processor. Alternatively, it can be designed using techniques based on hardware description languages ​​(HDLs) or any other design method for digital circuits familiar to those skilled in the art, and can be implemented using one or more circuits such as field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), or complex programmable logic devices (CPLDs), or can be implemented using dedicated circuits or modules. Furthermore, the storage channel control unit can also be implemented using software methods such as processes, threads, program modules, or other software methods. However, the implementation of this invention is not limited to these examples. In addition, the foregoing... Figure 3 Steps S10 to S50 Figures 4-9 ,or Figure 10 The steps in this process can also be implemented using hardware circuits, such as logic circuits or other suitable digital circuits.

[0102] Furthermore, in some embodiments, a non-transitory storage medium is proposed, which records information for a computing device (as described above) Figure 1 (or the storage device shown in Figure 2), by means of a controller in the storage device, executes program code for a method of allocating multiple storage channels of the storage device for streaming data writing, wherein the method includes according to Figure 3 Any embodiment of the method or a combination thereof. For example, program code is one or more programs or program modules, such as those used to implement the method. Figure 3 Steps S10 to S50 Figures 4-9 ,or Figure 10 The steps in the code, the program code of these modules, operate in a coordinated manner and can be executed in any suitable order or in parallel. When the computing device executes this program code, it causes the computing device to perform actions based on... Figure 3 This is one embodiment of a method for allocating multiple storage channels of a storage device for streaming data writing. The readable storage medium described above can be, for example, firmware, ROM, RAM, memory cards, optical information storage media, magnetic information storage media, or any other type of storage medium or memory, and the implementation of the invention is not limited to this example.

[0103] Therefore, the above embodiments provide a method, a storage device, and a storage medium for allocating multiple storage channels of a storage device for streaming data writing. This allows for the allocation of write operations and is applicable to handling write operations from multiple applications on a host. Individual allocation is performed for write operations of at least one of these streams, thereby facilitating the more even distribution of the write data corresponding to the stream across the memory chips of the multiple channels of the storage device. This helps improve the performance when reading data from the storage device.

[0104] The present invention has been disclosed above with reference to preferred embodiments. However, those skilled in the art should understand that the embodiments are merely illustrative and should not be construed as limiting the scope of the invention. It should be noted that all variations and substitutions equivalent to the described embodiments should be considered within the scope of the present invention. Therefore, the scope of protection of the present invention is defined by the claims.

Claims

1. A method for allocating multiple storage channels of a storage device for streaming data writing, characterized in that, The method includes the following steps: (a) A controller of the storage device for processing streaming data writing of a plurality of streaming streams provides overall available storage channel status data and streaming applicable storage channel status data for one of the plurality of streaming streams, wherein the overall available storage channel status data indicates whether each of the plurality of storage channels has been allocated for writing streaming data, and the streaming applicable storage channel status data indicates whether each of the plurality of storage channels has been allocated for writing streaming data for the streaming stream; (b) The controller generates streaming available storage channel status data for the streaming stream based on the overall available storage channel status data and the streaming applicable storage channel status data for the streaming stream, wherein the streaming available storage channel status data for the streaming stream indicates whether each of the plurality of storage channels is available to be allocated for writing streaming data for the streaming stream. (c) The controller selects an available storage channel based on the status data of the available storage channels for the stream; (d) For the selected available storage channel, update the overall available storage channel status data to indicate that the selected available storage channel has been allocated for writing streaming data; and (e) For the selected available storage channel, update the stream-applicable storage channel status data for the stream to indicate that the selected available storage channel has been allocated for writing stream data for the stream.

2. The method according to claim 1, characterized in that, The controller is used to allocate the multiple storage channels for writing streaming data to the multiple streams, and to provide individual streaming channel status data for each of the multiple streams.

3. The method according to claim 2, characterized in that, After the controller performs steps (b) to (e) for one of the plurality of streams, the controller performs steps (b) to (e) for one of the plurality of streams.

4. The method according to claim 1, characterized in that, Following step (e), the method further includes issuing a notification to perform a write operation on the stream and the selected available storage channel.

5. The method according to claim 1, characterized in that, The method further includes issuing a notification to perform a write operation on the plurality of storage channels when the overall available storage channel status data indicates that each of the plurality of storage channels has been allocated for writing streaming data.

6. A storage medium, characterized in that, The storage medium records program code for causing the storage device to execute the method according to any one of claims 1 to 5 for allocating multiple storage channels of the storage device for streaming data writing.

7. A storage device, characterized in that, include: Multiple memory chips; and A controller, coupled to the plurality of memory chips via multiple storage channels, is configured to process the writing of multiple streams of data, wherein the controller is configured to perform multiple operations, the multiple operations including: (a) Provide overall available storage channel status data and stream-applicable storage channel status data for one of the plurality of streams, wherein the overall available storage channel status data indicates whether each of the plurality of storage channels has been allocated for writing stream data, and the stream-applicable storage channel status data indicates whether each of the plurality of storage channels has been allocated for writing stream data for the stream. (b) Based on the overall available storage channel status data and the stream-applicable storage channel status data for the stream, generate stream-available storage channel status data for the stream, wherein the stream-available storage channel status data for the stream indicates whether each of the plurality of storage channels is available to be allocated for writing stream data for the stream. (c) Select an available storage channel based on the stream available storage channel status data for the stream; (d) For the selected available storage channel, update the overall available storage channel status data to indicate that the selected available storage channel has been allocated for writing streaming data; and (e) For the selected available storage channel, update the stream-applicable storage channel status data for the stream to indicate that the selected available storage channel has been allocated for writing stream data for the stream.

8. The storage device according to claim 7, characterized in that, The controller is used to allocate the multiple storage channels for writing streaming data to the multiple streams, and to provide individual streaming channel status data for each of the multiple streams.

9. The storage device according to claim 8, characterized in that, After the controller performs operations (b) to (e) for one of the plurality of streams, the controller performs operations (b) to (e) for one of the plurality of streams.

10. The storage device according to claim 7, characterized in that, Following operation (e), the plurality of operations further include issuing a notification to perform a write operation on the stream and the selected available storage channel.

11. The storage device according to claim 7, characterized in that, The plurality of operations further include issuing a notification to perform a write operation on the plurality of storage channels when the overall available storage channel status data indicates that each of the plurality of storage channels has been allocated for writing streaming data.

Citation Information

Patent Citations

  • Track seeking method and device based on collection channel of processor

    CN105703956A

  • Controller and Storage Device Performing Efficient Buffer Allocation and Operating Method of Storage Device

    CN108121674A