Method and system for promoting multi-stream sequential read performance improvement and reducing read amplification
By identifying the order similar patterns of LBA in multi-stream scenarios and prefetching data, the problems of read amplification and delay in multi-stream scenarios are solved, and the performance and life of SSD are improved.
Patent Information
- Application Number
- CN202210247553.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-03-30
- Filing Date
- 2022-03-14
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-03-14
AI Technical Summary
In the prior art, in multi-flow scenarios, sequential read requests cause read amplification and delay increase due to interleaving and disordered reception of LBAs, which affects SSD performance and lifetime.
By receiving the LBA and stream identifiers of multiple streams, the LBA is allocated into the queue using the LBA comparator, identifying sequential patterns, prefetching data and bypassing data processing operations, and storing them in volatile memory.
Reduces read amplification, improves SSD performance and life, and reduces read latency.
Smart Images

Figure CN114780018B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to the field of data storage. More specifically, the present disclosure relates to a method and system for facilitating multi-stream sequential read performance improvement and reducing read amplification. Background Art
[0002] Today, various storage systems are used to store and access an increasing amount of digital content. A storage system may include a storage server having one or more storage devices or drives (e.g., solid state drives (SSDs)). Data may be stored in the non-volatile storage medium of an SSD, such as non-volatile (NAND) flash memory. SSDs are continuously evolving with increased capacity and parallelism. However, file systems continue to use a relatively small access granularity (e.g., 4KB) compared to the basic read unit of NAND flash memory (e.g., 16KB). As a result, most of the data physically read from NAND pages is discarded after being sensed. This may result in non-trivial read amplification and an increased number of issued read operations, which increases the overall latency of read requests. In addition, the issued read operations increase "read interference" (e.g., the coupling effect of reading from a given NAND flash cell affects adjacent cells), and may cause a decline in the quality and reliability of stored data.
[0003] Read operations include random read requests and sequential read requests. While random read requests may not follow any recognizable pattern, sequential read requests follow a recognizable pattern based on the predictability of consecutive or sequential logical block addresses (LBAs). One current solution for reducing the number of issued read operations (e.g., accessing NAND pages) is to place several (e.g., four) consecutive LBAs in the same physical NAND page, which allows the system to read all four LBAs in one read operation from the NAND flash instead of four separate read operations. However, in a multi-stream scenario, the requested LBAs may be received by the SSD in an interleaved and disorderly manner, which is similar to random reads and may cause the same challenges as described above, such as increased read latency and read amplification and a decline in the performance and lifespan of the SSD. Summary of the Invention
[0004] One embodiment provides a system for facilitating data management. The system receives a first plurality of logical block addresses (LBAs) and corresponding stream identifiers via read requests from multiple streams through a storage device. The system assigns the corresponding LBAs to a first queue among a plurality of queues based on the stream identifiers corresponding to the LBAs. In response to determining that a second plurality of LBAs in the first queue have a sequentially similar pattern: the system retrieves data associated with the second plurality of LBAs from the non-volatile memory of the storage device; the system stores the retrieved data and the second plurality of LBAs in the volatile memory of the storage device while bypassing data processing operations.
[0005] In some embodiments, in response to determining that the second plurality of LBAs in the first queue do not have a sequentially similar pattern based on a predetermined threshold, the system performs the following operations: the system retrieves first data associated with the second plurality of LBAs from the non-volatile memory of the storage device. The system avoids storing the retrieved first data and the second plurality of LBAs in the volatile memory. The system performs data processing operations on the retrieved first data, and the data processing operations include error correction code (ECC) decoding and cyclic redundancy check (CRC). The system returns the processed first data as error-free data to the requesting application.
[0006] In some embodiments, the data processing operations include error correction code (ECC) decoding and cyclic redundancy check (CRC).
[0007] In some embodiments, the plurality of queues include first-in-first-out (FIFO) queues.
[0008] In some embodiments, the system determines that the second plurality of LBAs in the first queue have a sequentially similar pattern based on a predetermined threshold, and this determination for a first LBA and a second LBA assigned to the first queue further includes the following operations: the system truncates the least significant bits of the first LBA and the second LBA. The system obtains a first result based on a bitwise exclusive OR comparison of the truncated first LBA and the truncated second LBA. The system accumulates the first result and a second result, and the second result comes from a comparison pair of truncated LBAs assigned to the first queue. The system tracks the number of current matching results based on the accumulated result.
[0009] In some embodiments, in response to determining that the number of current matching results is greater than the predetermined threshold, the system generates a determination that the second plurality of LBAs have a sequentially similar pattern. In response to determining that the number of current matching results is not greater than the predetermined threshold, the system generates a decision that the second plurality of LBAs do not have a sequentially similar pattern.
[0010] In some embodiments, the system determines the input LBA associated with a first read request from a requesting application; and compares the input LBA with the stored second plurality of LBAs to obtain a second result.
[0011] In some embodiments, the retrieved data and the second plurality of LBAs are stored as raw data in the volatile memory. In response to determining, based on the second result, that the input LBA matches the stored second plurality of LBAs, the system performs the following operations: reads the raw data from the volatile memory; performs data processing operations on the raw data including ECC decoding and cyclic redundancy check; and returns the processed data as error-free data to the requesting application.
[0012] In some embodiments, in response to determining, based on the second result, that the input LBA does not match the stored second plurality of LBAs: the system performs the following operations: retrieves second data associated with the input LBA from the non-volatile memory of the storage device; performs data processing operations on the retrieved second data including ECC decoding and cyclic redundancy check; and returns the processed second data as error-free data to the requesting application.
[0013] In some embodiments, the retrieved second data includes requested data and unrequested data associated with the first read request. Data processing operations are performed on the requested data associated with the first request. The processed second data returned to the requesting application includes the processed requested data associated with the first request.
[0014] In some embodiments, the system alternatively determines that the second plurality of LBAs in the first queue have a sequentially similar pattern based on detecting a hint associated with the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 An exemplary environment for facilitating multi-stream sequential reads according to the prior art is shown.
[0016] Figure 2 An exemplary environment for facilitating multi-stream sequential reads according to embodiments of the present application is shown.
[0017] Figure 3 An exemplary LBA comparator module according to embodiments of the present application is shown.
[0018] Figure 4 An exemplary storage device according to embodiments of the present application is shown, including prefetching of raw data based on the output of the LBA comparator module.
[0019] Figure 5A A flowchart is presented that illustrates a method for facilitating multi-stream sequential reads according to an embodiment of the present application.
[0020] Figure 5B A flowchart is presented that illustrates a method for facilitating multi-stream sequential reads according to an embodiment of the present application, including operations of an LBA comparator module.
[0021] Figure 5C A flowchart is presented that illustrates a method for facilitating multi-stream sequential reads according to an embodiment of the present application, including operations of an LBA comparator module.
[0022] Figure 5D A flowchart is presented that illustrates a method for facilitating multi-stream sequential reads according to an embodiment of the present application, including comparing an input LBA with the LBA of data stored in volatile memory.
[0023] Figure 6 An exemplary computer system for facilitating multi-stream sequential reads according to an embodiment of the present application is shown.
[0024] Figure 7 An exemplary device for facilitating multi-stream sequential reads according to an embodiment of the present application is shown.
[0025] In the drawings, like reference numerals refer to like elements. Detailed Description
[0026] The following description is provided in the context of a particular application and its requirements to enable any person skilled in the art to make and use the embodiments. Various modifications to the disclosed embodiments will be apparent to those skilled in the art, and the general principles defined herein can be applied to other embodiments and applications without departing from the spirit and scope of the disclosure. Thus, the embodiments described herein are not limited to the embodiments shown, but are to be accorded the widest scope consistent with the principles and features disclosed herein.
[0027] Overview
[0028] The embodiments described herein provide a system that helps improve performance and reduce read amplification in multi-stream sequential reads. The system evaluates multi-stream read scenarios, enables access pattern recognition for allocated LBAs, and performs predictive data read operations based on the access patterns, which can result in reduced read amplification.
[0029] As described above, the difference between the access granularity of the file system (e.g., 4KB) and the basic read unit of the NAND flash memory (e.g., 16KB) can lead to non-trivial read amplification, where most of the data physically read from the NAND pages is discarded after being perceived. In addition to non-trivial read amplification, this can also lead to an increase in the number of read operations issued, thereby increasing the overall latency of the read requests. The issued read operations increase "read interference" (e.g., the coupling effect of reading from a given NAND flash cell affects adjacent cells), and may cause a decline in the quality and reliability of the stored data.
[0030] Read operations can include random read requests and sequential read requests. While random read requests may not follow any recognizable pattern, sequential read requests follow a recognizable pattern based on the predictability of consecutive LBAs. One current solution to reduce the number of read operations issued (e.g., accessing NAND pages) is to place several (e.g., four) consecutive LBAs in the same physical NAND page, which allows the system to read all four LBAs from the NAND flash in one read operation instead of in four separate read operations. However, in a multi-stream scenario, the requested LBAs may be received by the SSD in an interleaved and disorderly manner, which is similar to random reads and may lead to the same challenges as described above, such as increased read latency and read amplification and a decline in the performance and lifespan of the SSD. The following describes an exemplary multi-stream scenario in the prior art. Figure 1 Describe an exemplary multi-stream scenario in the prior art.
[0031] The embodiments described herein provide a system that addresses the challenge of mitigating and reducing read amplification to improve the performance and lifespan of the SSD and the entire storage system. Based on input read requests from multiple streams, the system can receive LBAs and corresponding stream identifiers. The stream identifier can be appended to each input LBA. The system can assign and place the LBAs into a first-in-first-out queue according to their corresponding stream identifiers. The system can achieve access pattern recognition by determining whether a given LBA is in a queue with a sequentially similar pattern. This determination can be performed by an LBA comparator, which can be implemented in hardware or firmware, as described below with respect to Figure 3 、 Figure 5B and Figure 5C described. The following describes an exemplary system for facilitating multi-stream sequential reads in conjunction with Figure 2 Describe an exemplary system for facilitating multi-stream sequential reads.
[0032] If the system determines an order similarity pattern for a given LBA, the system can prefetch the corresponding raw data from non-volatile memory and save the raw data and the corresponding given LBA in a temporary data buffer or the volatile memory of the SSD (e.g., double data rate (DDR) dynamic random access memory (DRAM)). This allows the system to bypass data processing operations such as ECC decoding and cyclic redundancy check. As described below in connection with Figure 4 and 5C prefetching data and bypassing data processing operations based on determining order similarity.
[0033] Subsequently, when evaluating an input LBA, the controller can compare the input LBA with the given LBA stored in the volatile memory. If the result matches, the system can directly retrieve the data from the volatile memory, which is more efficient than retrieving the data from non-volatile memory (e.g., it can reduce latency). The system can perform data processing operations on the retrieved data and return error-free data to the requesting application, as described below with respect to Figure 4 and 5D If the result does not match, the system can retrieve the data from non-volatile memory, perform data processing operations, and return error-free data.
[0034] Accordingly, the described embodiments provide a system that can mitigate and reduce read amplification and improve the performance of the overall system in a multi-stream sequential read scenario. By implementing access pattern recognition and performing predictive read operations based on access pattern recognition, the system provides a technical solution to the technical problem of improving performance and reducing read amplification in an SSD based on a multi-stream scenario (assigning LBAs to queues according to stream identifiers, determining order similarity between LBAs, and prefetching raw data while bypassing data - processing operations).
[0035] A "distributed storage system" or "storage system" can include multiple storage servers. A "storage server" or "storage system" can refer to a computing device that can include multiple storage devices or storage drives. A "storage device" or "storage drive" refers to a device or drive having non-volatile memory that can provide persistent storage of data, such as a solid state drive (SSD) or a flash-based storage device. A storage system can also be a computer system.
[0036] "Non-volatile memory" refers to a storage medium that can be used for persistent storage of data, such as flash memory of NAND dies of an SSD, magnetoresistive random access memory (MRAM), phase change memory (PCM), resistive random access memory (ReRAM), or other non-volatile memory.
[0037] "Volatile memory" refers to a medium that can be used to temporarily store data and requires power to maintain the stored data. Examples of volatile memory include DDR DRAM.
[0038] "Computing device" refers to any server, device, node, entity, drive, or any other entity that can provide any computing capabilities.
[0039] The term "read amplification" refers to a situation where the size or granularity of the requested data is smaller than the size or granularity of the overall data returned or retrieved (e.g., the basic physical units from NAND flash in a read operation). In this situation, the retrieved data is larger than the requested data, and any portion of the retrieved data that is not the requested data is discarded. This results in read amplification, which can lead to suboptimal utilization of resources associated with the read operation.
[0040] Example environment of multi-stream sequential read in the prior art
[0041] Figure 1 Illustrated is an exemplary environment 100 for facilitating multi-stream sequential read according to the prior art. Environment 100 may include multiple streams having sequential LBAs associated with read requests. For example, the streams may include: stream_1 110, which may include sequential LBAs 114 having values such as 11, 12, and 13; stream_2 120, which may include sequential LBAs 124 having values such as 21, 22, and 23; and stream_n 130, which may include sequential LBAs 134 having values such as 31, 32, and 33. Environment 100 may also include an SSD 140 having an SSD controller 142 and NAND flash (e.g., die) 150, 154, and 156. NAND 150 may store data in physical NAND pages, where each NAND page may include several sequential or consecutive LBAs. For example, NAND 150 may include page 152, which may correspond to sequential LBA 164, such as {i+1, i+2, i+3, and i+4}. Storing these four consecutive LBAs in one physical NAND page may allow the system to read four LBAs in one read operation instead of being read four times. This feature enables read amplification reduction.
[0042] However, one challenge in using this feature to achieve reduced read amplification is that the requested LBAs may arrive at the SSD in a staggered and unordered manner. For example, during operation, the system may process input read requests from multiple streams 110, 120, and 130 (via communications 116, 126, and 136 respectively). The SSD controller 142 may receive the staggered and unordered LBAs (such as LBA 160 received via communication 162): 11, 21, ..., 31, 12, 22, ..., 32, 13, 23, ..., 33, ... etc. That is, while the LBAs from a given stream may appear in order relative to each other, the overall order of the LBAs received (and subsequently to be processed) by the SSD controller 142 can be mixed (e.g., interleaved) and unordered with respect to the overall order.
[0043] Accordingly, the system may process LBA 160 as a random read operation and based on a random pattern. This results in one round of NAND page accesses for each LBA request, which consumes and increases the read latency. The overall latency of environment 100 may be similar to the overall latency of random reads. Additionally, due to a large amount of data being loaded and then discarded, the read amplification may be quite large. Thus, in this multi - stream scenario, the system loses the advantage of multi - stream sequential boosting and instead results in a degradation of the performance and endurance of the entire storage system.
[0044] Example environment for multi - stream sequential read using an allocation queue and an LBA comparator
[0045] Figure 2 Illustrates an exemplary environment 200 for facilitating multi - stream sequential read in accordance with an embodiment of the present application. Environment 200 includes: a stream multiplexer 202; multiple queues 210, 220, and 230, each queue corresponding to a specific stream based on a stream identifier; and an LBA comparator 240. During operation, the system may receive information 260, e.g., multiple LBAs and corresponding stream identifiers, which are associated with read requests from multiple streams. The respective stream identifiers may be appended to the corresponding LBAs.
[0046] The stream multiplexer 202 can receive information 260 and assign each LBA to a first queue among multiple queues based on the respective corresponding stream identifiers. Queues 210, 220, and 230 can be first-in-first-out (FIFO) queues that store LBAs sharing the same stream identifier. The FIFO queues can be stored in a buffer, for example, stored in the static random access memory (SRAM) of an SSD controller. For example: the stream_1 LBA FIFO queue 210 can include LBAs (not shown) corresponding to the stream identifier "1"; the stream_2 LBA FIFO queue 220 can include LBAs (not shown) corresponding to the stream identifier "2"; the stream_3 LBA FIFO queue 230 can include LBAs (not shown) corresponding to the stream identifier "3".
[0047] For each queue, and for a specific number of LBAs in a given queue (where the specific number can be a predetermined number or a second plural number based on a predetermined rule), the LBA comparator 240 can determine whether the LBAs in the second plural number of given queues have a sequentially similar pattern and output a decision 260. That is, the LBA comparator 240 can determine whether early reading and prefetching data can improve the performance of the system and can also reduce read amplification. Generally, the LBA comparator 240 can evaluate adjacent LBAs in the same FIFO queue to determine similarity and trends, such as LBA_x1 212 and LBA_x2 214 in the FIFO queue 210, and generate a decision 260, as described below with respect to Figure 3 described.
[0048] Meanwhile, the system can detect hints associated with an application. For example, an application can issue an application hint 250 that indicates sequential reading of a given set of LBAs or is associated with a specific read request from one or more specific streams. The application hint 250 can also be based on, for example, a user-specified command sent from a host-side application, a specific software configuration, an e-commerce service, or any other application-related configuration information. If the system does detect such an application hint 250, then the application hint 250 can override the decision from the LBA comparator 240, as shown by the application hint (bypass) 252.
[0049] Exemplary LBA Comparator Module
[0050] Figure 3 Illustrates an exemplary LBA comparator module 300 according to an embodiment of the present application. The LBA comparator module can correspond to Figure 2The LBA comparator 240. It can be implemented in hardware or in firmware. The LBA comparator 300 can include: a Least Significant Bit (LSB) truncation module 302; a D-type flip-flop (D-FF) component 304; a bitwise Exclusive OR (XOR) module 306; an accumulator component 308; a D-FF component 310; a counter 312; and a determination module 314.
[0051] During operation, the LBA comparator 300 can receive multiple LBAs for processing, e.g., from the stream_1 LBA FIFO queue 210 (via communication 322) Figure 2 of the LBA_x1 212 (“x1”) and LBA_x2 214 (“x2”). The LSB truncation module can truncate x1 and x2 simultaneously, resulting in the truncated x1 (denoted as “[x1]”) and the truncated x2 (denoted as “[x2]”). Using the D-FF 304 to cache the first LBA to form alignment and via communications 324, 326, and 328, the bitwise XOR module 306 can compare the truncated first LBA [x1] and the truncated second LBA [x2]. That is, the bitwise XOR module 306 can compare the Most Significant Bits (MSBs) of x1 and x2. The number of LSBs and MSBs can be based on predetermined information, e.g., the first total number of LSBs and / or the second total number of MSBs.
[0052] Note that the system compares the MSBs of two LBAs (i.e., the truncated LBAs [x1] and [x2]). Thus, the identified pattern does not have to be strictly sequential, just “have a pattern with similar order”. This order-similar pattern is determined based on predetermined thresholds or numbers (as below) for the LSBs and MSBs respectively and the first or second total number of bits.
[0053] The bitwise XOR module 306 can send the result of the comparison to the accumulator component 308 (via communication 332). Using the D-FF 310 and via communications 334 and 336, the accumulator 308 can accumulate the results of multiple comparisons made by the bitwise XOR module 306. For each result, the accumulator 308 can send a signal 338 to the counter 312. The signal 338 can indicate that the two compared (and truncated) LBAs are the same. The counter 312 can keep track of the current number of matching results (i.e., the number of LBAs whose MSBs match). The counter 312 can send the current number of matching results to the determination module 314 (via communication 340).
[0054] The determination module 314 may determine whether the current number of matching results is greater than a predetermined number (e.g., 6 or 10 matching LBAs). If the current number of matching results is greater than the predetermined number, the determination module 314 may generate a determination 342, which indicates that multiple LBAs in the stream_1LBA FIFO queue 210 have a sequentially similar pattern. This may trigger prefetching and caching data from non-volatile memory to volatile memory, as described below with respect to Figure 1 as described.
[0055] If the current number of matching results is not greater than the predetermined number, the determination module 314 may generate a determination 342, which indicates that multiple LBAs in the stream_1LBA FIFO queue 210 do not have a sequentially similar pattern. This may trigger a conventional retrieval of data from non-volatile memory, as described above with respect to the multi-stream sequential read of the prior art environment 100 in Figure 1 the description.
[0056] Original data prefetching based on the output of the LBA comparator
[0057] Figure 4 FIG. illustrates an exemplary storage device 400 according to an embodiment of the present application, including prefetching of original data based on the output of an LBA comparator module. The storage device 400 may be an SSD, which may include: an SSD controller 410 and a NAND 430; the SSD controller 410 may include: a host interface 412; a CRC module 414; an ECC decoder module 416; an LBA confirmation module 418; a DDR controller 420 that manages and interfaces with DDR DRAM 422, and a NAND interface 424 that interfaces with non-volatile memory (e.g., NAND 430). The SSD controller 410 may also include an LBA comparator (not shown), such as Figure 2 the LBA comparator 240 of Figure 3 the LBA comparator 300 of
[0058] During operation, the SSD controller 410 may receive LBAs and corresponding stream identifiers (via communication 440) from read requests from multiple streams. Based on the determination generated and output by the LBA comparator (e.g., Figure 3 the determination 342 in
[0059] Assume that page 432 in NAND 430 includes data associated with multiple LBAs (of stream_1 LBA FIFO queue 210) found to have a sequential similar pattern. The SSD controller can retrieve the original data (through communication 450) and store the retrieved original data together with the multiple corresponding LBAs in DDR DRAM 422. Note that the data is stored in DDR DRAM 422, bypassing the ECC decoder 416 and CRC module 414. That is, the SSD controller 410 does not need to perform data processing operations (such as ECC decoding and CRC checking respectively performed by modules 416 and 414) on the original data stored in DDR DRAM 422.
[0060] Subsequently, the system can determine the input LBA associated with a first read request from a requesting application (not shown). The LBA confirmation module 418 can compare the input LBA with the multiple stored corresponding LBAs to obtain a result. The system can determine based on the obtained result that the input LBA indeed matches the stored LBA, and can send the result to a module of the controller 410 (e.g., send it to the ECC decoder 416). The system can retrieve the stored original data from DDR DRAM 422 and send the stored original data to the ECC decoder 416 (through communication 454). The system can perform data processing operations on the original data. For example, the ECC decoder 416 can perform ECC decoding on the original data, and the CRC module 414 can perform CRC on the ECC decoded data (via communication 456), and the system can return the processed data as error-free data to the requesting application (through communication 456 and communication 460).
[0061] The system can also determine based on the obtained result that the input LBA does not match the stored LBA. In this case, the system can directly retrieve the data corresponding to the input LBA from NAND 430, perform data processing operations on the retrieved data, and return the processed data as error-free data to the requesting application (through communication 458).
[0062] Note that the data retrieved via communication 458 can include requested data and unrequested data associated with the first read request. In some embodiments, the system can perform data processing operations only on the requested data and return only the processed requested data to the requesting application. The system can detect a predetermined condition, and in response to detecting the predetermined condition, the system can store the unrequested data associated with the first read request in a temporary data buffer or a volatile memory of the storage device (e.g., DDR DRAM 422). The predetermined condition can include settings that cause the system to cache certain LBAs and / or unrequested data associated with certain LBAs.
[0063] Exemplary Method for Facilitating Multi-Stream Sequential Reads
[0064] Figure 5A FIG. 500 is a flow chart depicting a method for facilitating multi-stream sequential reads in accordance with an embodiment of the present application. During operation, the system receives a first plurality of LBAs and corresponding stream identifiers via read requests from multiple streams through a storage device (operation 502). The system assigns the respective LBAs to a first queue among a plurality of queues based on the stream identifiers corresponding to the LBAs (operation 504). The queue can be a FIFO queue. The system determines that a second plurality of LBAs in the first queue belong to a sequentially similar pattern (operation 506). The system retrieves data associated with the second plurality of LBAs from non-volatile memory of the storage device (operation 508), and the system stores the retrieved data and the second plurality of LBAs in volatile memory of the storage device while bypassing data processing operations (operation 510). Operations 508 and 510 are in response to operation 506, and the data processing operations can include ECC decoding and cyclic redundancy checks.
[0065] Figure 5B FIG. 520 is a flow chart showing a method for facilitating multi-stream sequential reads in accordance with an embodiment of the present application, including operations of an LBA comparator module. During operation, the system receives a first plurality of LBAs and corresponding stream identifiers via read requests from multiple streams through a storage device (operation 522). The system assigns the respective LBAs to a first queue among a plurality of queues based on the stream identifiers corresponding to the LBAs (operation 524). The queue can be a FIFO queue. If the system detects a hint from an application (decision 526), the system bypasses operations 528 and the operations of the LBA comparator module (e.g., Figure 5B operations 530 - 536 of Figure 5C and Figure 5C operations 542 of Figure 5C ), and continues Figure 5C with operation 544 of Figure 5C . The application hint can indicate that a set of LBAs from a given stream is sequential or in a sequentially similar pattern and should thus be processed together, which results in bypassing certain operations and continuing at Figure 5C operation 544.
[0066] If the system does not detect an application hint (decision 526), the system places the respective LBAs (and other LBAs assigned to the stream identifier) in the first queue (operation 528). The system can iterate through the LBAs in the first queue in pairs of LBAs that are placed in the first queue in a first-in, first-out (FIFO) manner. By processing two LBAs at a time and by performing operations 530 - 536 and 542, the system can determine via the LBA comparator whether the LBAs in the first queue have a sequentially similar pattern, as described below in connection with Figure 3 .
[0067] For the first LBA and the second LBA in the first queue, the system truncates the least significant bits (LSBs) of the first LBA and the second LBA (operation 530). The system compares the truncated first LBA and the truncated second LBA based on a bitwise exclusive OR to obtain a first result (operation 532), i.e., the system compares the most significant bits (MSBs) of the first LBA and the second LBA. The system accumulates the first result and other results of the comparison pairs from the truncated LBAs assigned to the first queue (operation 534). The system tracks the number of current matching results based on the accumulated result (operation 536). The operation continues at Figure 5C label A of
[0068] Figure 5C A flowchart 540 is provided, which shows a method for facilitating multi-stream sequential reading according to an embodiment of the present application, including operations of an LBA comparator module. If the system determines that the number of current matching results is greater than a predetermined threshold (decision 542), then the system generates a determination that the second plurality of LBAs have a sequential similarity pattern (operation 544, similar to operation 506). The system retrieves data associated with the second plurality of LBAs from the non-volatile memory of the storage device (operation 546, similar to operation 508). The system stores the retrieved data and the second plurality of LBAs as raw data in the volatile memory of the storage device while bypassing data processing operations (operation 548, similar to operation 510). The operation continues at Figure 5D label B of
[0069] If the system determines that the number of currently matching people if the result is not greater than a predetermined threshold (decision 542), then the system generates a determination that the second plurality of LBAs do not have a sequential similarity pattern (operation 550). The system retrieves first data associated with the second plurality of LBAs from the non-volatile memory of the storage device (operation 552). The system avoids storing the retrieved first data and the second plurality of LBAs in the volatile memory (operation 554). The system performs data processing operations on the retrieved first data (operation 556). As described above in connection with FIG. 5, the data processing operations may include ECC decoding and cyclic redundancy check. The system returns the processed first data as error-free data to the requesting application (operation 558).
[0070] Figure 5DPresents a flowchart 560, which illustrates a method for facilitating multi-stream sequential reading according to an embodiment of the present application, including comparing an input LBA with the LBA of data stored in volatile memory. The system determines an input LBA associated with a first read request from a requesting application (operation 562). The system compares the input LBA with a second plurality of stored LBAs to obtain a second result (operation 564). Based on the second result, if the input LBA matches the second plurality of stored LBAs (decision 566), the system reads the original data from volatile memory (operation 568), performs a data processing operation on the original data (operation 570), and returns the processed data as error-free data to the requesting application (operation 576).
[0071] Based on the second result, if the input LBA does not match the second plurality of stored LBAs (decision 566), the system retrieves second data associated with the input LBA from non-volatile memory of the storage device (operation 572), performs a data processing operation on the retrieved second data (operation 574), and returns the processed (second) data as error-free data to the requesting application (operation 576). Note that operation 576 indicates "processed" data and can refer to processed original data retrieved from volatile memory as part of operation 570 or processed second data retrieved from non-volatile memory as part of operation 574. The operation returns.
[0072] Exemplary computer systems and devices
[0073] Figure 6 Illustrates an exemplary computer system 600 for facilitating multi-stream sequential reading according to an embodiment of the present application. The computer system 600 includes a processor 602, volatile memory 606, and a storage device 608. In some embodiments, the computer system 600 may include a controller 604 (indicated by the dashed line). The volatile memory 606 may include, for example, random access memory (RAM), which serves as managed memory and may be used to store one or more memory pools. The storage device 608 may include persistent storage that can be managed or accessed by the processor 602 (or controller 604). Additionally, the computer system 600 may be coupled to a peripheral input / output (I / O) user device 610, such as a display device 611, a keyboard 612, and a pointing device 614. The storage device 608 may store an operating system 616, a content processing system 618, and data 634.
[0074] The content processing system 618 may include instructions that, when executed by the computer system 600, may cause the computer system 600 or the processor 602 to perform the methods and / or processes described in this disclosure. Specifically, the content processing system 618 may include instructions for receiving and sending data packets, including data to be read, LBAs, stream identifiers, and input / output (I / O) requests (e.g., read requests or write requests) (communication module 620).
[0075] The content processing system 618 may further include instructions for receiving, via read requests from multiple streams, a first plurality of LBAs and corresponding stream identifiers by a storage device (communication module 620). The content processing system 618 may include instructions for assigning each LBA to a first queue among a plurality of queues based on the stream identifier corresponding to the LBA (queue assignment module 622). The content processing system 618 may include instructions for, in response to determining that a second plurality of LBAs in the first queue have a sequential similarity pattern (similarity determination module 624): retrieving data associated with the second plurality of LBAs from the non-volatile memory of the storage device (data reading module 628); and storing the retrieved data and the second plurality of LBAs in the volatile memory of the storage device while bypassing data processing operations (volatile memory management module 626).
[0076] The content processing system 618 may further include instructions for, in response to determining that the second plurality of LBAs in the first queue do not have a sequential similarity pattern based on a predetermined threshold (similarity determination module 624): retrieving first data associated with the second plurality of LBAs from the non-volatile memory of the storage device (data reading module 628); avoiding storing the retrieved first data and the second plurality of LBAs in the volatile memory (volatile memory management module 626); performing data processing operations on the retrieved first data, including error correction code (ECC) decoding and cyclic redundancy check (CRC) (data processing module 630); and returning the processed first data as error-free data to the requesting application (communication module 620).
[0077] The content processing system 618 may additionally include instructions for: truncating the least significant bits of the first LBA and the second LBA; obtaining a first result by comparing the truncated first LBA and the truncated second LBA based on bitwise exclusive OR; accumulating other results and the product of the first result from comparison pairs of truncated LBAs assigned to the first queue; and tracking the current number of matching results based on the accumulated result (similarity determination module 624). The operations of the similarity determination module 624 may be performed by an LBA comparator, as described above with respect to Figure 3 stated.
[0078] The content processing system 618 may include instructions (LBA confirmation module 632) for determining an input LBA associated with a first read request from a requesting application. The content processing system 618 may also include instructions (LBA confirmation module 632) for comparing the input LBA with a stored second plurality of LBAs to obtain a second result.
[0079] Data 634 may include any data that needs to be input or generated as output by the methods and / or processes described in this disclosure. Specifically, data 634 may at least store: data; requests; read requests; stream indicators; stream identifiers; logical block addresses (LBAs); physical block addresses (PBAs); metadata; LBAs appended with corresponding stream identifiers; queues; first-in-first-out queues; indicators or identifiers of queues; determination or decision that a plurality of LBAs have a sequentially similar pattern; predetermined thresholds; predetermined numbers; predetermined rules; retrieved data; processed data; raw data; ECC encoded or decoded data; data with or without cyclic redundancy check; error-free data; least significant bits; most significant bits; truncated LBAs; comparison results between two truncated LSBs; accumulated results; matching results; the number of current matching results; an input LBA associated with a first read request; comparison results between the input LBA and a stored plurality of LBAs; determination of whether a set of LBAs matches another set of LBAs; predetermined conditions; requested data; unrequested data; and prompts associated with an application program.
[0080] Figure 7 An exemplary apparatus 700 facilitating multi-stream sequential reading according to an embodiment of the present application is illustrated. The apparatus 700 may include a plurality of units or devices that may communicate with each other via wired, wireless, quantum optical, or electrical communication channels. The apparatus 700 may be implemented using one or more integrated circuits and may include fewer or more units or devices than Figure 7 those shown. Additionally, the apparatus 700 may be integrated in a computer system or implemented as a separate device or multiple devices capable of communicating with other computer systems and / or devices.
[0081] The apparatus 700 may include modules or units 702 - 714 configured to perform functions or operations similar to Figure 6 those of the modules 620 - 632 of the computer system 600. It includes: a communication unit 702; a queue allocation unit 704; a similarity determination unit 706; a volatile memory management unit 708; a data reading unit 710; a data processing unit 712; and an LBA confirmation unit 714.
[0082] The data structures and code described in this detailed description are generally stored on a computer-readable storage medium, which can be any device or medium that can store code and / or data for use by a computer system. Computer-readable storage media include, but are not limited to, volatile memory, non-volatile memory, magnetic disks, and optical storage devices such as optical disk drives, magnetic tapes, CDs (compact discs), DVDs (digital versatile discs or digital video discs), or other media now known or later developed that are capable of storing computer-readable media.
[0083] The methods and processes described in the detailed description section can be embodied as code and / or data, which can be stored in the computer-readable storage medium as described above. When a computer system reads and executes the code and / or data stored on the computer-readable storage medium, the computer system performs the methods and processes embodied as data structures and code and stored within the computer-readable storage medium.
[0084] In addition, the above methods and processes can be included in hardware modules. For example, hardware modules can include, but are not limited to, application-specific integrated circuit (ASIC) chips, field-programmable gate arrays (FPGAs), and other programmable logic devices now known or later developed. When a hardware module is activated, the hardware module performs the methods and processes contained within the hardware module.
[0085] The foregoing embodiments described herein are presented for purposes of illustration and description only. They are not intended to be exhaustive or to limit the embodiments described herein to the disclosed form. Accordingly, many modifications and variations will be apparent to those skilled in the art. In addition, the foregoing disclosure is not intended to limit the embodiments described herein. The scope of the embodiments described herein is defined by the appended claims.
Claims
1. A computer-implemented method, comprising: Receiving, via a storage device, a first plurality of logical block addresses (LBAs) and corresponding stream identifiers from read requests from a plurality of streams; Allocating the respective LBAs to a first queue among a plurality of queues according to the stream identifier corresponding to the LBA; And In response to determining that a second plurality of LBAs in the first queue have a sequentially similar pattern: Retrieving data associated with the second plurality of LBAs from the non-volatile memory of the storage device; And Storing the retrieved data and the second plurality of LBAs in the volatile memory of the storage device while bypassing data processing operations; In response to determining that the second plurality of LBAs in the first queue do not have a sequentially similar pattern, performing a data processing operation on first data associated with the second plurality of LBAs and returning the processed first data as error-free data to the requesting application, wherein the first data and the second plurality of LBAs are not stored in the volatile memory.
2. The method according to claim 1, further comprising: Retrieving the first data associated with the second plurality of LBAs from the non-volatile memory of the storage device, wherein the data processing operation performed on the first data includes: the data processing operation includes error correction code (ECC) decoding and cyclic redundancy check (CRC).
3. The method according to claim 1, Wherein the data processing operation includes error correction code (ECC) decoding and cyclic redundancy check (CRC).
4. The method according to claim 1, Among them, The plurality of queues include first-in-first-out (FIFO) queues.
5. The method according to claim 1, wherein it is determined that the second plurality of LBAs in the first queue have a sequentially similar pattern based on a predetermined threshold, and for a first LBA and a second LBA assigned to the first queue, further comprising: Truncating the least significant bits of the first LBA and the second LBA; Comparing the truncated first LBA and the truncated second LBA based on bitwise exclusive OR to obtain a first result; Accumulating the first result and a second result, the second result being from a comparison pair of truncated LBAs assigned to the first queue; And Tracking the number of current matching results according to the accumulated result.
6. The method according to claim 5, further comprising: In response to determining that the number of current matching results is greater than the predetermined threshold, generating a determination that the second plurality of LBAs have a sequentially similar pattern; And In response to determining that the number of current matching results is not greater than the predetermined threshold, generating a determination that the second plurality of LBAs do not have a sequentially similar pattern.
7. The method according to claim 1, further comprising: Determining an input LBA associated with a first read request from a requesting application; And comparing the input LBA with the stored second plurality of LBAs to obtain a second result.
8. The method according to claim 7, wherein Storing the retrieved data and the second plurality of LBAs as raw data in the volatile memory, and wherein the method further comprises: In response to determining that the input LBA matches the stored second plurality of LBAs based on the second result: Read the original data from the volatile memory; Perform data processing operations on the original data including ECC decoding and cyclic redundancy check; and Return the processed data as error-free data to the requesting application.
9. The method according to claim 7, In response to determining that the input LBA does not match the stored second plurality of LBAs based on the second result: Retrieve second data associated with the input LBA from the non-volatile memory of the storage device; Perform data processing operations on the retrieved second data including ECC decoding and cyclic redundancy check; and return the processed second data as error-free data to the requesting application.
10. The method according to claim 9, Among them, The retrieved second data includes requested data and unrequested data associated with the first read request, wherein data processing operations are performed on the requested data associated with the first read request, and wherein the processed second data returned to the requesting application includes the processed requested data associated with the first read request.
11. The method according to claim 1, wherein it is determined that the second plurality of LBAs in the first queue have a sequentially similar pattern based on detecting a hint associated with the application.
12. A computer system, comprising: A processor; And A memory coupled to the processor and storing instructions that, when executed by the processor, cause the processor to perform a method that includes: Receiving a first plurality of logical block addresses (LBAs) and corresponding stream identifiers via read requests from a plurality of streams by a storage device; Allocating the corresponding LBAs to a first queue among a plurality of queues according to the stream identifier corresponding to the LBA; and In response to determining that a second plurality of LBAs in the first queue have a sequentially similar pattern: Retrieving data associated with the second plurality of LBAs from the non-volatile memory of the storage device; and storing the retrieved data and the second plurality of LBAs in the volatile memory of the storage device while bypassing data processing operations; In response to determining that the second plurality of LBAs in the first queue do not have a sequentially similar pattern, performing data processing operations on the first data associated with the second plurality of LBAs and returning the processed first data as error-free data to the requesting application, wherein the first data associated with the second plurality of LBAs is not stored in the volatile memory.
13. The computer system according to claim 12, wherein, The method further includes: Retrieving the first data associated with the second plurality of LBAs from the non-volatile memory of the storage device, wherein the data processing operations performed on the first data include: the data processing operations include error correction code (ECC) decoding and cyclic redundancy check (CRC).
14. The computer system according to claim 12, wherein, Determining that the second plurality of LBAs in the first queue have a sequentially similar pattern is based on a predetermined threshold, and further includes, for a first LBA and a second LBA assigned to the first queue: Truncating the least significant bits of the first LBA and the second LBA; Comparing the truncated first LBA and the truncated second LBA based on a bitwise exclusive OR to obtain a first result; Accumulating the first result and a second result, the second result being from a comparison pair of truncated LBAs assigned to the first queue; and Tracking the number of current matching results according to the accumulated result.
15. The computer system according to claim 14, wherein, The method further includes: Responsive to determining that the number of current matching results is greater than the predetermined threshold, generating a determination that the second plurality of LBAs have a sequentially similar pattern; and Responsive to determining that the number of current matching results is not greater than the predetermined threshold, generating a determination that the second plurality of LBAs do not have a sequentially similar pattern.
16. The computer system according to claim 12, wherein, Storing the retrieved data and the second plurality of LBAs as raw data in the volatile memory, And wherein the method further includes: Determining an input LBA associated with a first read request from a requesting application; Comparing the input LBA with the stored second plurality of LBAs to obtain a second result; and Responsive to determining, based on the second result, that the input LBA matches the stored second plurality of LBAs: Reading the raw data from the volatile memory; Performing data processing operations on the raw data including ECC decoding and cyclic redundancy check; and Returning the processed data as error-free data to the requesting application.
17. The computer system according to claim 16, wherein, The method further includes: Responsive to determining, based on the second result, that the input LBA does not match the stored second plurality of LBAs: Retrieving second data associated with the input LBA from the non-volatile memory of the storage device; Performing data processing operations on the retrieved second data including ECC decoding and cyclic redundancy check; and Returning the processed second data as error-free data to the requesting application.
18. The computer system according to claim 12, wherein, Determining that the second plurality of LBAs in the first queue have a sequentially similar pattern based on detecting a hint associated with an application.
19. A non-transitory computer-readable storage medium having instructions stored thereon that, when executed by a computer, cause the computer to perform a method, the method including: Receiving, via a storage device, a first plurality of logical block addresses (LBAs) and corresponding stream identifiers from a plurality of streams via read requests; Assigning the respective LBAs to a first queue among a plurality of queues according to the stream identifier corresponding to the LBA; And Responsive to determining that a second plurality of LBAs in the first queue have a sequentially similar pattern: Retrieving data associated with the second plurality of LBAs from the non-volatile memory of the storage device; And Storing the retrieved data and the second plurality of LBAs in the volatile memory of the storage device while bypassing data processing operations; In response to determining that the second plurality of LBAs in the first queue do not have a pattern with similar order, perform a data processing operation on the first data associated with the second plurality of LBAs, and return the processed first data as error-free data to the requesting application, wherein the first data and the second plurality of LBAs are not stored in the volatile memory.
20. The storage medium according to claim 19, wherein, The retrieved data and the second plurality of LBAs are stored in the volatile memory as raw data, and wherein the method further includes: Determine the input LBA associated with a first read request from a requesting application; Compare the input LBA with the stored second plurality of LBAs to obtain a second result; and In response to determining, based on the second result, that the input LBA matches the stored second plurality of LBAs: Read the raw data from the volatile memory; Perform data processing operations on the raw data including ECC decoding and cyclic redundancy check; and Return the processed data as error-free data to the requesting application.
Citation Information
Patent Citations
Page-based prefetching triggered by TLB activity
US20170161194A1