Concurrent processing method of operation request, flash memory device, and storage medium
By optimizing the concurrent processing method of large-capacity flash memory devices, and reasonably solving the technical problems of large capacity in the prior art by setting concurrent groups according to bandwidth rate and power consumption threshold, the performance of large-capacity flash memory devices has been optimized. This has enabled the application of concurrent processing technology, improved the application of large-capacity flash memory devices, and addressed the technical challenges and problems existing in the prior art, thereby enhancing the performance of large-capacity flash memory devices.
Patent Information
- Application Number
- CN202411985695.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In high-capacity flash memory devices, the power consumption is too high when multiple dies operate simultaneously, causing the power module to be unable to supply the power and resulting in instantaneous current overload. Existing strategies such as RAID algorithms have weakened protection capabilities on high-capacity disks, and wear leveling and garbage collection algorithms are not applicable.
By determining the bandwidth rate and maximum power consumption threshold of a single die, and setting the maximum number of dies in a concurrent group, the concurrent processing of operation requests can be optimized, including building a scheduling list and a response list, and rationally allocating operation requests to improve performance.
While enabling concurrent processing of operation requests, it improves the performance of flash memory devices, avoids problems such as excessive power consumption and current overload, and optimizes wear leveling and garbage collection.
Smart Images

Figure CN119960677B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The embodiment of the present application relates to the field of storage devices, in particular to a concurrent processing method of operation request, a flash memory device and a storage medium. BACKGROUND
[0002] The flash memory device refers to a storage device manufactured based on flash memory technology. Flash memory is an electronic storage medium that uses electric current to store and read data in semiconductor transistors. For example, NAND flash is a type of flash memory composed of multiple storage units, each of which can store a data bit (0 or 1). The flash memory device can be a standalone storage unit, such as a USB flash drive, a solid state drive (SSD), etc., or a storage module embedded in other devices, such as eMMC or UFS storage in a smartphone.
[0003] With the development of nand Flash manufacturing process, plus the requirements of AI, data center and other use scenarios for single disk storage capacity, the capacity of SSD single disk is getting larger and larger, developing to 64TB, 128TB or even larger. The storage density of the mainstream nand flash is still 512Gb / 1Tb / 2Tb per Die, so there will be 128Die, 256Die, 512Die or even more Die configurations on large-capacity disks.
[0004] In the existing technical solution, the following problems exist in the implementation process of large-capacity disks: if E / P / R (E, erase; P, program, write; R, read) occurs simultaneously on multiple Dies on the disk, the power consumption of the SSD will be particularly large, causing the power module on the disk to be unable to meet the supply; the full-frame server may experience transient current overload; in the general SSD FTL (Flash Translation layer) technology, a block is selected from each Die to form a concurrent set (industry commonly known as super block), to ensure write concurrency; at the same time, based on this super block strategy, other algorithms such as wear leveling, bad block management, garbage collection, etc. are implemented, which are not applicable on such large-capacity disks; in the usual algorithms of SSD, the Raid algorithm is implemented, which is often an N + 1 raid algorithm, such as a 128Die disk. Usually, 127Die stores user data, and the remaining Die stores redundant protection data; on large-capacity disks, this strategy will weaken the protection capability. In summary, the existing technical solution has various strategies, which have defects when multiple dies are used on large-capacity disks. SUMMARY
[0005] The embodiment of the application provides a concurrent processing method of operation request, a flash memory device and a storage medium, the method comprises the following steps: determining a first maximum die quantity according to a bandwidth rate corresponding to a single die; determining a second maximum die quantity according to a maximum power consumption threshold of the flash memory device; determining a maximum die quantity corresponding to a concurrent group according to a total die quantity of the flash memory device, the first maximum die quantity and the second maximum die quantity; determining a plurality of concurrent groups according to the maximum die quantity corresponding to the concurrent group; obtaining an operation request sent by a host, and performing concurrent processing on the operation request based on the concurrent group, and the application can improve the performance of the flash memory device while realizing concurrent processing of the operation request.
[0006] The embodiment of the application provides the following technical scheme:
[0007] In a first aspect, the embodiment of the application provides a concurrent processing method of operation request, applied to a flash memory device, the flash memory device being communicatively connected with a host, and the method comprises the following steps:
[0008] obtaining a total die quantity of the flash memory device;
[0009] determining a first maximum die quantity according to a bandwidth rate corresponding to a single die;
[0010] determining a second maximum die quantity according to a maximum power consumption threshold of the flash memory device;
[0011] determining a maximum die quantity corresponding to a concurrent group according to the total die quantity of the flash memory device, the first maximum die quantity and the second maximum die quantity;
[0012] determining a plurality of concurrent groups according to the maximum die quantity corresponding to the concurrent group;
[0013] obtaining an operation request sent by a host, and performing concurrent processing on the operation request based on the concurrent group.
[0014] In some embodiments, the die comprises a plurality of planes, the plane comprises a plurality of pages, the first maximum die quantity is determined according to the bandwidth rate corresponding to the single die, and the method comprises the following steps:
[0015] obtaining a time required for the flash memory device to write data to the page to determine a first time;
[0016] determining a maximum data storage amount corresponding to each write of the die according to a number of planes in the die and a maximum data storage amount of each page;
[0017] obtaining the bandwidth rate corresponding to the single die according to the first time and the maximum data storage amount corresponding to each write of the die;
[0018] According to the bandwidth rate corresponding to the single die and the preset bandwidth requirement, a first maximum die quantity in each concurrent group is determined, wherein the first maximum die quantity = the preset bandwidth requirement / the bandwidth rate corresponding to the single die.
[0019] In some embodiments, according to the maximum power consumption threshold of the flash memory device, the second maximum die quantity is determined, including:
[0020] The power consumption value when the flash memory device performs the write operation is acquired;
[0021] According to the preset maximum power consumption threshold and the power consumption value when the flash memory device performs the write operation, a second maximum die quantity in each concurrent group is determined, wherein the second maximum die quantity = the preset maximum power consumption threshold / the power consumption value when the flash memory device performs the write operation.
[0022] In some embodiments, according to the total die quantity of the flash memory device, the first maximum die quantity and the second maximum die quantity, the maximum die quantity corresponding to the concurrent group is determined, including:
[0023] When the total die quantity of the flash memory device is an exponential of 2, according to a plurality of division coefficients and the total die quantity of the flash memory device, a plurality of divided die quantities are determined, wherein the division coefficient is an exponential of 2, and the total die quantity = the channel quantity * the die select line quantity included in each channel * the logical unit quantity corresponding to each die select line;
[0024] According to the first maximum die quantity and the second maximum die quantity, the maximum die quantity corresponding to the concurrent group is determined from the divided die quantities, wherein the maximum die quantity is greater than or equal to the first maximum die quantity, and less than or equal to the second maximum die quantity.
[0025] In some embodiments, the method further includes:
[0026] When the total die quantity of the flash memory device is not an exponential of 2, a first die quantity is determined, wherein the first die quantity is an exponential of 2 N , the total die quantity of the flash memory device is greater than 2 N-1 , and less than the first die quantity;
[0027] According to a plurality of division coefficients and the first die quantity, a plurality of divided die quantities are determined, wherein the division coefficient is an exponential of 2;
[0028] According to the first maximum die quantity and the second maximum die quantity, the maximum die quantity corresponding to the concurrent group is determined from the divided die quantities, wherein the maximum die quantity is greater than or equal to the first maximum die quantity, and less than or equal to the second maximum die quantity;
[0029] obtaining a maximum die number corresponding to the equal division coefficient, and determining a second die number according to the equal division coefficient, wherein the second die number = the first die number / equal division coefficient;
[0030] obtaining a difference between the maximum die number and the second die number to determine a first number of unusable dies in each concurrent group, wherein the first number is equal to the difference.
[0031] In some embodiments, the method further comprises:
[0032] setting a die number for each die in each concurrent group, wherein a maximum value of the die number is a number of concurrent groups in the flash memory device * a maximum die number corresponding to the concurrent group;
[0033] based on the concurrent group, setting a scheduling linked list corresponding to the concurrent group, wherein a number of the scheduling linked list is equal to the maximum die number corresponding to the concurrent group;
[0034] obtaining an operation request issued by a host, wherein the operation request includes a die number corresponding to the operation request;
[0035] performing a modulo operation on the die number corresponding to the operation request according to the maximum die number corresponding to the concurrent group to obtain a sequence number of the scheduling linked list;
[0036] inserting the operation request into the scheduling linked list according to the sequence number of the scheduling linked list.
[0037] In some embodiments, the method further comprises:
[0038] each time the operation request in the scheduling linked list is distributed, obtaining an operation request located at a head of the scheduling linked list;
[0039] after the operation request located at the head of the scheduling linked list is distributed, deleting the operation request from the scheduling linked list.
[0040] In some embodiments, inserting the operation request into the scheduling linked list according to the sequence number of the scheduling linked list comprises:
[0041] obtaining a time when the scheduling linked list receives the operation request;
[0042] determining an expected scheduling time corresponding to the operation request according to the time when the operation request is received, wherein the expected scheduling time = the time when the operation request is received + a preset scheduling time interval;
[0043] inserting the operation request corresponding to the expected scheduling time into the scheduling linked list corresponding to the sequence number according to an order from large to small of the expected scheduling time.
[0044] In some embodiments, determining the expected scheduling time corresponding to the operation request according to the time when the operation request is received comprises:
[0045] When the operation request is a read request, the preset scheduling time interval is set as a first time interval, and an expected scheduling time corresponding to the read request is determined according to the first time interval and a time at which the operation request is received;
[0046] When the operation request is a write request or an erase request, a first execution time of the write request and a second execution time of the erase request are obtained; a larger value of the first execution time and the second execution time is determined as a second time interval; the preset scheduling time interval is set as the second time interval, and an expected scheduling time corresponding to the write request or the erase request is determined according to the second time interval and the time at which the operation request is received, wherein the second time interval is greater than the first time interval.
[0047] In some embodiments, the operation request includes a read request in a data moving process, and the method further includes:
[0048] creating a response chain table;
[0049] obtaining an expected completion time corresponding to each read request, wherein the expected completion time = a time at which the scheduling chain table receives the read request + a preset delay time;
[0050] inserting the read request corresponding to the expected completion time into the response chain table in a descending order of the expected completion time.
[0051] In some embodiments, the method further includes:
[0052] polling the response chain table every fixed time interval to obtain a read request currently located at a head of the response chain table and a first expected completion time corresponding to the read request;
[0053] determining whether the first expected completion time is less than or equal to a current time according to the first expected completion time and the current time;
[0054] if the first expected completion time is less than or equal to the current time, sending response information corresponding to the read request to a firmware module, so that the firmware performs a write operation after receiving the response information;
[0055] after sending the response information corresponding to the read request to the firmware module, deleting the read request from the response chain table.
[0056] In a second aspect, an embodiment of the present application provides a flash memory device, including:
[0057] a processor and a memory, the processor being configured to execute executable program codes in the memory, and when the executable program codes are executed, the processor executes instructions of the operation request concurrent processing method according to the first aspect.
[0058] In a third aspect, the embodiments of the present application provide a computer readable storage medium, which stores a computer program. When the computer program is executed, the operation request concurrent processing method of the first aspect is implemented.
[0059] The embodiments of the present application have the beneficial effect that, different from the prior art, the embodiments of the present application provide an operation request concurrent processing method, which is applied to a flash memory device, the flash memory device is communicatively connected to a host, and the method comprises the following steps: obtaining a total die number of the flash memory device; determining a first maximum die number according to a bandwidth rate corresponding to a single die; determining a second maximum die number according to a maximum power consumption threshold of the flash memory device; determining a maximum die number corresponding to a concurrent group according to the total die number of the flash memory device, the first maximum die number and the second maximum die number; determining a plurality of concurrent groups according to the maximum die number corresponding to the concurrent group; and obtaining an operation request sent by the host and performing concurrent processing on the operation request based on the concurrent group.
[0060] By determining the first maximum die number according to the bandwidth rate corresponding to the single die, determining the second maximum die number according to the maximum power consumption threshold of the flash memory device, determining the maximum die number corresponding to the concurrent group according to the total die number of the flash memory device, the first maximum die number and the second maximum die number, determining the plurality of concurrent groups according to the maximum die number corresponding to the concurrent group, obtaining the operation request sent by the host and performing the concurrent processing on the operation request based on the concurrent group, the present application can improve the performance of the flash memory device while realizing the concurrent processing of the operation request. BRIEF DESCRIPTION OF DRAWINGS
[0061] One or more embodiments are illustrated by way of example with reference to the accompanying drawings, which are schematic and not intended to be limiting of the embodiments, and in which like reference numerals designate similar elements in the figures and wherein: the figures are not to scale.
[0062] Figure 1 is a structure schematic diagram of a package provided by the embodiments of the present application;
[0063] Figure 2 is a relationship schematic diagram of a Die and a CH, a CE and a LUN provided by the embodiments of the present application;
[0064] Figure 3 is a flow schematic diagram of an operation request concurrent processing method provided by the embodiments of the present application;
[0065] Figure 4 is Figure 3 is a refinement flow schematic diagram of step S302 in
[0066] Figure 5 is Figure 3a detailed flowchart of step S303 in
[0067] Figure 6 is Figure 3 a detailed flowchart of step S304 in
[0068] Figure 7 is a flowchart of constructing a scheduling linked list provided by an embodiment of the present application;
[0069] Figure 8 is a schematic diagram of a scheduling linked list provided by an embodiment of the present application;
[0070] Figure 9 is Figure 7 a detailed flowchart of step S705 in
[0071] Figure 10 is Figure 9 a detailed flowchart of step S752 in
[0072] Figure 11 is a flowchart of deleting an operation request from a scheduling linked list provided by an embodiment of the present application;
[0073] Figure 12 is a schematic diagram of data moving provided by an embodiment of the present application;
[0074] Figure 13 is a flowchart of creating a response linked list provided by an embodiment of the present application;
[0075] Figure 14 is a schematic diagram of a response linked list provided by an embodiment of the present application;
[0076] Figure 15 is a flowchart of judging whether a first expected completion time is less than or equal to a current time provided by an embodiment of the present application;
[0077] Figure 16 is a structural schematic diagram of a flash memory device provided by an embodiment of the present application.
[0078] BRIEF DESCRIPTION OF THE DRAWINGS
[0079] DETAILED DESCRIPTION
[0080] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings for the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0081] In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as there is no conflict.
[0082] Unless otherwise defined, all technical and scientific terms used in the present application have the same meanings as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used in the present application are only for the purpose of describing specific embodiments of the present application and are not intended to limit the present application. The term "and / or" used in the present application includes any and all combinations of one or more related listed items.
[0083] The technical solutions of the present application are specifically described below in combination with the accompanying drawings of the present application:
[0084] Please refer to Figure 1 , Figure 1 is a schematic diagram of a packaged structure provided by the embodiments of the present application;
[0085] As shown in Figure 1 , the package in the flash memory device refers to the physical packaging unit of the NAND Flash, which is a whole packaged NAND Flash chip and can contain one or more targets.
[0086] In the embodiments of the present application, the packaging form of the package includes HDP, and the HDP (Hexadeca Die Package) refers to the NAND Flash packaging form containing 16 dies in each package. HDP is the abbreviation of Hexadeca Die Package, which refers to the NAND Flash packaging form containing 16 dies in each package. This packaging form improves the storage density and capacity of the NAND Flash, so that more storage units can be accommodated in the same physical space.
[0087] Specifically, each Target contains multiple Dies (dies), which are the basic building blocks of NAND Flash and are used to store data. The Package serves as the physical packaging of NAND Flash, providing a protective shell for the Dies, allowing them to work more stably and reliably. At the same time, the Package also facilitates the installation and replacement of NAND Flash. A Target contains one or more Dies, and one or more Dies of a Target share a set of data signals. The Die is the smallest unit in NAND Flash that can independently execute commands and report status, corresponding one-to-one with the logic unit. Within a Target, one or more LUNs share a set of data signals, and each Target is controlled by a CE pin (chip select). Here, LUN (Die) and logic unit are one-to-one in NAND Flash, meaning that each LUN (Die) can be regarded as an independent logical storage unit for performing read, write, and erase operations.
[0088] The Die is an independent flash chip that contains multiple Blocks for data storage. In a multi-channel SSD, each Die can independently perform read, write, or erase operations, allowing parallel processing to improve performance. The Plane is an independent storage unit within the flash chip, used for storing and managing data. Each Die typically contains multiple Planes, and each Plane is further composed of multiple Blocks, each containing multiple Pages. The main advantage of Planes is that they can independently perform read, write, and erase operations, thereby improving the performance of SSDs.
[0089] Multiple Planes make up a Die. This means that within an independent flash chip (Die), there are multiple Planes to share the task of data storage and management. This structure helps to improve storage density and performance, as more data can be accommodated in a smaller physical space, and read / write speed can be improved through parallel processing of multiple data blocks.
[0090] In practical application scenarios, multi-Plane operations take advantage of the parallelism of NAND flash to perform read / write tasks simultaneously on multiple Planes within the same Die, significantly improving data transfer rates. Asynchronous Plane operations provide higher operational independence, allowing read tasks on different Planes to proceed independently without waiting for the completion of operations on other Planes, thereby improving the response speed of random reads.
[0091] Please refer to Figure 2 , Figure 2Figure 1 is a schematic diagram of the relationship between a Die and a CH, a CE, and a LUN provided by an embodiment of the present application.
[0092] As shown in Figure 2 , for the host controller of the SSD, a multi-channel (hereinafter referred to as CH) design is adopted, each CH shares a data transmission line, and each CH internally has multiple CE (Chip enable) lines. The CE line corresponds to a target inside the flash. When a specific Die needs to be operated, the CH and CE line can be selected on the hardware, and then a specific LUN inside the target can be selected on the software. For example, when Die0 on the disk needs to be selected, CH0 can be selected first, CE0 can be pulled low, and then LUN0 can be selected to operate CH0-CE0-LUN0, i.e., Die0 on the disk.
[0093] Please refer to Figure 3 , Figure 3 Figure 2 is a flowchart of a concurrent processing method of an operation request provided by an embodiment of the present application.
[0094] The concurrent processing method of the operation request is applied to a flash device, and the flash device includes multiple dies. Specifically, an execution subject of the concurrent processing method of the operation request is one or more controllers of the flash device.
[0095] As shown in Figure 3 , the concurrent processing method of the operation request includes the following steps.
[0096] Step S301: acquiring a total die quantity of the flash device;
[0097] Specifically, the flash device includes multiple dies, and the total die quantity of the flash device is acquired, where the total die quantity of the flash device = channel quantity * number of chip enable lines included in each channel * number of logical units corresponding to each chip enable line.
[0098] Step S302: determining a first maximum die quantity according to a bandwidth rate corresponding to a single die;
[0099] Specifically, please refer to Figure 4 , Figure 4 Figure 3 is a detailed flowchart of step S302 in Figure 3 .
[0100] As shown in Figure 4 , step S302 includes the following steps.
[0101] Step S321: acquiring a time required for the flash device to write data to a page to determine a first time;
[0102] Specifically, the die includes a plurality of planes, the planes include a plurality of pages, the time required for the flash device to write data to the pages is obtained to determine a first time, for example, if the tProgram of a certain nand is 400us, the first time is 400us.
[0103] Step S322: According to the number of planes in the die and the maximum data storage amount of each page single write, the maximum data storage amount of each write of the die is determined;
[0104] Specifically, the number of planes in the die and the maximum data storage amount of each page single write are obtained, the product of the number of planes in the die and the maximum data storage amount of each page single write is calculated, and the maximum data storage amount of each write of the die is obtained, for example, if the number of planes in the die is 4plane and the maximum data storage amount of each page single write (single-plane page) is 16kB, the data amount of multi-plane page is 64kB, that is, the maximum data storage amount of each write of the die is 64kB.
[0105] Step S323: According to the first time and the maximum data storage amount of each write of the die, the bandwidth rate corresponding to a single die is obtained;
[0106] Specifically, according to the first time and the maximum data storage amount of each write of the die, the bandwidth rate corresponding to a single die is obtained, wherein the bandwidth rate corresponding to a single die = the maximum data storage amount of each write of the die / the first time, for example, assuming that the first time is 400us and the maximum data storage amount of each write of the die is 64KB, then the bandwidth rate corresponding to a single die is 64kB / 400us = 0.076Gb / s.
[0107] It should be noted that the calculation of the bandwidth rate ignores the time of data transmission to the nand Flash, because the transmission time will be different for different transmission configurations.
[0108] Step S324: According to the bandwidth rate corresponding to a single die and the preset bandwidth requirement, the first maximum die number of each concurrent group is determined;
[0109] Specifically, a preset bandwidth requirement is set, for example, the bandwidth requirement is set to 8GB / s, and it should be noted that the preset bandwidth requirement can be set according to actual needs, and the present application does not limit it. According to the bandwidth rate corresponding to a single die and the preset bandwidth requirement, the first maximum die number of each concurrent group is determined, wherein the first maximum die number = preset bandwidth requirement / bandwidth rate corresponding to a single die. For example, assuming that the preset bandwidth requirement is 8GB / s, and the bandwidth rate corresponding to a single die is 0.076Gb / s, then the first maximum die number is 8GB / s ÷ 0.076Gb / s = 105.26, which is approximately 106 Die.
[0110] Step S303: determining the second maximum die number according to the maximum power consumption threshold of the flash memory device;
[0111] Specifically, Figure 5 is Figure 3 a detailed flowchart of step S303 in
[0112] As Figure 5 shown, step S303: determining the second maximum die number according to the maximum power consumption threshold of the flash memory device, includes:
[0113] Step S331: obtaining the power consumption value of the flash memory device when performing a write operation;
[0114] Specifically, the power consumption value of the flash memory device when performing a write operation, i.e. the power consumption value of the flash when performing program, can be obtained by actual measurement or by checking nand Spec.
[0115] Step S332: determining the second maximum die number of each concurrent group according to the preset maximum power consumption threshold and the power consumption value of the flash memory device when performing a write operation;
[0116] Specifically, a preset maximum power consumption threshold is set, which is the power consumption threshold of the entire SSD. According to the preset maximum power consumption threshold and the power consumption value of the flash memory device when performing a write operation, the second maximum die number of each concurrent group is determined, wherein the second maximum die number = preset maximum power consumption threshold / power consumption value of the flash memory device when performing a write operation. For example, the maximum power consumption threshold of the entire SSD is about 20w, and the maximum power consumption threshold of a large-capacity disk can be relaxed to 25w. After deducting the power consumption of cache, main control and other devices on the disk, the power consumption left for the flash is generally 19-20w. Therefore, when the maximum power consumption threshold is 20w and the power consumption value of the flash memory device when performing a write operation is 0.15w, 20 / 0.15 = 133 Die.
[0117] Step S304: Determine the maximum number of dies corresponding to the concurrent group based on the total number of dies in the flash memory device, the first maximum number of dies, and the second maximum number of dies;
[0118] Specifically, Figure 6 yes Figure 3 A detailed flowchart of step S304 in the process;
[0119] like Figure 6 As shown, step S304: Determine the maximum number of bare dies corresponding to the concurrent group based on the total number of bare dies in the flash memory device, the first maximum number of bare dies, and the second maximum number of bare dies, including:
[0120] Step S341: Obtain the total number of bare dies in the flash memory device;
[0121] Specifically, a flash memory device includes multiple dies. The total number of dies in the flash memory device is calculated as follows: Total number of dies = Number of channels * Number of chip select lines in each channel * Number of logic cells corresponding to each chip select line.
[0122] Step S342: Determine whether the total number of dies in the flash memory device is a power of 2;
[0123] Specifically, it is determined whether the total number of dies in the flash memory device is a power of 2. If the total number of dies in the flash memory device is a power of 2, then proceed to step S343; if the total number of dies in the flash memory device is not a power of 2, then proceed to step S345.
[0124] Step S343: Determine the number of bare dies after multiple equal divisions based on multiple division coefficients and the total number of bare dies in the flash memory device;
[0125] Specifically, if the total number of dies in the flash memory device is determined to be an exponent of 2, then based on multiple division coefficients and the total number of dies in the flash memory device, multiple dies are divided into three equal parts. The division coefficients are 2, 4, and 8. The total number of dies in the flash memory device is divided by each division coefficient to obtain three dies. For example, if the total number of dies in the flash memory device is 512, then the dies after division are 256, 128, and 64.
[0126] Step S344: Based on the first maximum number of bare dies and the second maximum number of bare dies, determine the maximum number of bare dies corresponding to the concurrent group from the equally divided number of bare dies;
[0127] Specifically, the first maximum die number and the second maximum die number are selected from the plurality of divided die numbers to determine a maximum die number corresponding to the concurrent group, wherein the maximum die number is a divided die number satisfying a preset condition, the preset condition is greater than or equal to the first maximum die number and less than or equal to the second maximum die number, and if there are a plurality of divided die numbers satisfying the preset condition, a maximum value of the plurality of divided die numbers is obtained and determined as the maximum die number corresponding to the concurrent group.
[0128] Step S345: determining the first die number;
[0129] Specifically, if it is determined that the total die number of the flash memory device is not an exponential of 2, the first die number is determined, wherein the first die number is 2 raised to the power of N, the total die number of the flash memory device is greater than 2 raised to the power of N-1 and less than the first die number.
[0130] Step S346: determining a plurality of divided die numbers according to the plurality of division coefficients and the first die number;
[0131] Specifically, the plurality of divided die numbers are determined according to the plurality of division coefficients and the first die number, wherein the division coefficient is an exponential of 2, for example, assuming that the division coefficients are 2, 4 and 8, the first die number of the flash memory device is divided by each division coefficient to obtain three divided die numbers, for example, assuming that the first die number of the flash memory device is 512, the divided die numbers are 256, 128 and 64.
[0132] Step S347: determining a maximum die number corresponding to the concurrent group from the divided die numbers according to the first maximum die number and the second maximum die number;
[0133] Specifically, the first maximum die number and the second maximum die number are selected from the plurality of divided die numbers to determine a maximum die number corresponding to the concurrent group, wherein the maximum die number is a divided die number satisfying a preset condition, the preset condition is greater than or equal to the first maximum die number and less than or equal to the second maximum die number, and if there are a plurality of divided die numbers satisfying the preset condition, a maximum value of the plurality of divided die numbers is obtained and determined as the maximum die number corresponding to the concurrent group.
[0134] Based on the above configuration, this application also makes some corresponding designs in software coding, specifically including: setting a die number (DieId) for each die in the concurrent group, the maximum value of which is the number of concurrent groups in the flash memory device multiplied by the maximum number of dies corresponding to the concurrent group; establishing a relationship between DieId and CH, CE, and LUN; and using union syntax and bit fields to convert between DieId and CH, CE, and LUN. The union of DieId contains a uint16_t type DieId and an anonymous structure, which uses bit fields to define CH, CE, and LUN. That is, knowing the DieId, you can directly obtain CH, CE, and LUN; and vice versa. Taking the previous configuration of 16CH * 8CE * 4LUN as an example, CH uses 4 bits, CE uses 3 bits, and LUN uses 2 bits, for a total of 9 bits. The value of CH is 0~15, which can be represented by 4 bits, so CH_BITS is 4; similarly, CE_BITS is 3, and LUN_BITS is 2. For example, when dieId=0, CH, CE, CE:0-0-0.
[0135] In this embodiment of the application, the code for implementing the union structure is as follows:
[0136] struct {
[0137] union {
[0138] struct {
[0139] unsigned intchannel : CH_BITS; / / channel
[0140] unsigned int ce : CE_BITS; / / Chip select line
[0141] unsigned intlun : LUN_BITS; / / Logical unit
[0142] };
[0143] unsigned intdieId: DIE_BITS;
[0144] };
[0145] };
[0146] Step S348: Obtain the division coefficient corresponding to the maximum number of bare dies, and determine the second number of bare dies based on the division coefficient;
[0147] Specifically, an equal division coefficient corresponding to the maximum die number is obtained, and the second die number is determined according to the equal division coefficient. For example, assuming that the equal division coefficient corresponding to the maximum die number is 2, the second die number is determined according to the equal division coefficient, where the second die number = the first die number / equal division coefficient.
[0148] Step S349: obtaining a difference value between the maximum die number and the second die number to determine the first number of unusable dies in each concurrent group.
[0149] Specifically, the maximum die number is subtracted by the second die number to obtain the difference value between the maximum die number and the second die number, and the difference value is determined as the first number to determine the first number of unusable dies in each concurrent group, that is, the state of the first number of dies is set to the unusable state.
[0150] For example, when the Die on the disk is not an exponential of 2, such as some configurations are 31 HDP (Hexadeca Die Package, 16 dies in one package) disks, at this time, there are 496 dies on the disk, and we still calculate according to the configuration of 512 dies as described above. For the host, there are 8 CEs under some or two CHs that are not fully used, and normally, 8 CEs are fully used. For example, when CH-x CE-y is not used, the corresponding LUNs under CH-x CE-y on the disk are all unusable and in the default state. The default Die position is marked as inValid, which is unusable and cannot distribute E / P / R operations. At this time, each Parallel Group is still 128 dies, but only 124 dies can be used, and 4 dies are inValid.
[0151] Step S305: determining a plurality of concurrent groups according to the maximum die number corresponding to each concurrent group.
[0152] Specifically, a plurality of concurrent groups are determined according to the maximum die number corresponding to each concurrent group, where the die number in each concurrent group is the same, and the number of concurrent groups = the total die number of the flash memory device / the maximum die number corresponding to each concurrent group.
[0153] Step S306: obtaining an operation request sent by a host and concurrently processing the operation request based on the concurrent groups.
[0154] Specifically, the flash memory device is in communication connection with the host, receives a plurality of operation requests sent by the host, and concurrently processes the operation requests based on the concurrent groups.
[0155] Please refer to Figure 7 , Figure 7 is a flowchart of constructing a scheduling linked list provided by an embodiment of the present application;
[0156] AsFigure 7 As shown, the process of constructing the scheduling linked list includes:
[0157] Step S701: Set the die number for the die in each concurrent group;
[0158] Specifically, a die number is assigned to each die in each concurrent group, where one die number corresponds to one die. Assuming there are four concurrent groups, and the maximum number of dies in each concurrent group is 128, then the die numbers for the first concurrent group are 1 to 128, the die numbers for the second concurrent group are 129 to 256, the die numbers for the third concurrent group are 267 to 384, and the die numbers for the first concurrent group are 385 to 512.
[0159] Step S702: Based on the concurrency group, set the scheduling list corresponding to the concurrency group;
[0160] Specifically, based on the concurrency group, a scheduling list corresponding to the concurrency group is set up, wherein the number of scheduling lists is equal to the maximum number of bare dies.
[0161] Step S703: Obtain the operation request issued by the host;
[0162] Specifically, the host sends an operation request to the flash memory device, which includes, but is not limited to, read requests, write requests, and erase requests.
[0163] Step S704: Based on the maximum number of raw dies corresponding to the concurrent group, perform a modulo operation on the raw die number corresponding to the operation request to obtain the sequence number of the scheduling list;
[0164] Specifically, the operation request includes its corresponding die number. The process involves obtaining the die number corresponding to the operation request, performing a modulo operation on the die number corresponding to the operation request based on the maximum number of dies in the concurrent group, and obtaining the sequence number of the scheduling list. Each scheduling list corresponds to a sequence number. For example, assuming the die number corresponding to the operation request is 12 and the maximum number of dies in the concurrent group is 128, then performing a modulo operation on the die number corresponding to the operation request based on the maximum number of dies in the concurrent group yields a remainder of 12, which is then used as the sequence number of the scheduling list.
[0165] Step S705: Insert the operation request into the scheduling list according to the sequence number of the scheduling list;
[0166] For details, please refer to [link / reference]. Figure 8 , Figure 8 yes Figure 7 A detailed flowchart of step S705 in the process;
[0167] like Figure 8 As shown, step S705: Insert the operation request into the scheduling list according to the sequence number of the scheduling list, including:
[0168] Step S751: obtaining the time when the scheduling chain table receives the operation request;
[0169] Specifically, when the scheduling chain table obtains the operation request, the time when the scheduling chain table receives the operation request is recorded.
[0170] Step S752: determining the expected scheduling time corresponding to the operation request according to the time when the operation request is received;
[0171] Specifically, please refer to Figure 9 , Figure 10 is Figure 9 the detailed flowchart of step S752 in
[0172] Step S7521: obtaining the operation request;
[0173] Specifically, the operation request issued by the host is obtained.
[0174] Step S7522: judging whether the operation request is a read request;
[0175] Specifically, it is judged whether the operation request is a read request. If the operation request is a read request, step S7523 is entered. If the operation request is not a read request, step S7524 is entered.
[0176] Step S7523: setting the preset scheduling time interval as a first time interval, and determining the expected scheduling time corresponding to the read request according to the first time interval and the time when the operation request is received;
[0177] Specifically, if the operation request is a read request, the preset scheduling time interval is set as a first time interval, and the expected scheduling time corresponding to the read request is determined according to the first time interval and the time when the operation request is received. The first time interval can be set according to actual needs. In order to ensure that the read request is preferentially scheduled, the first time interval is preferably set to 0. The expected scheduling time corresponding to the read request is determined by adding the first time interval and the time when the operation request is received, that is, the expected scheduling time corresponding to the read request = the first time interval + the time when the operation request is received.
[0178] Step S7524: obtaining the first execution time of the write request and the second execution time of the erase request;
[0179] Specifically, if the operation request is not a read request, it is determined that the operation request is a write request or an erase request, and the first execution time of the write request and the second execution time of the erase request are obtained.
[0180] Step S7525: determining the larger value between the first execution time and the second execution time as a second time interval;
[0181] Specifically, according to the first execution time of the write request and the second execution time of the erase request, the larger value of the first execution time and the second execution time is determined as the second time interval.
[0182] Step S7526: set the preset scheduling time interval as the second time interval, and determine the expected scheduling time corresponding to the write request or the erase request according to the second time interval and the time of receiving the operation request;
[0183] Specifically, the preset scheduling time interval is set as the second time interval, and the expected scheduling time corresponding to the write request or the erase request is determined by adding the second time interval and the time of receiving the operation request, wherein the expected scheduling time corresponding to the write request or the erase request = the second time interval + the time of receiving the operation request, the second time interval is greater than the first time interval, and the second time interval can be set according to actual needs, for example, the second time interval is set as 100 ms.
[0184] Step S753: insert the operation request corresponding to the expected scheduling time into the scheduling linked list corresponding to the serial number in the order of the expected scheduling time from large to small;
[0185] Specifically, the operation request corresponding to the expected scheduling time is sorted in the order of the expected scheduling time from large to small, and the operation request corresponding to the expected scheduling time is inserted into the scheduling linked list corresponding to the serial number in the order of sorting.
[0186] Please refer to Figure 10 , Figure 10 is a schematic diagram of a scheduling linked list provided by an embodiment of the present application;
[0187] As Figure 10 shown, the number of Dies included in each parallel group Parallel Group is equal, denoted as ParallelCnt, which is a division of the total number of Dies. Set Parallel Cnt scheduling linked lists List, Parallel Group has Parallel Cnt Dies, use DieOffn to represent the nth Die in Parallel Group, the serial number of each scheduling linked list corresponds to DieOff one by one, and the scheduling linked list includes a head and a tail, and the smaller the expected scheduling time is, the closer to the head of the scheduling linked list.
[0188] Please refer to Figure 11 , Figure 11 A flowchart of an embodiment of the present application for deleting an operation request from a scheduling linked list is provided;
[0189] Step S1101: Each time an operation request in the scheduling list is dispatched, obtain the operation request located at the head of the scheduling list;
[0190] Specifically, each time an operation request in the scheduling chain is distributed, the operation request located at the head of the scheduling chain is retrieved first.
[0191] Step S1102: After dispatching the operation request located at the head of the scheduling list, delete the operation request from the scheduling list;
[0192] Specifically, each time a Dispatch Req is dispatched, the operation request at the head of the dispatch list is dispatched first. After dispatching the operation request at the head of the dispatch list, the operation request is removed from the dispatch list.
[0193] Please refer to the following: Figure 12 , Figure 12 This application provides a schematic diagram of a data transfer method.
[0194] like Figure 12 As shown, SSD data migration generally follows these strategies: 1) Read data from the source address of Mv into the cache, i.e., MvRd; 2) Then write data from the cache to the target address of Mv, i.e., MvWr; 3) Enterprise-grade SSDs have an important performance indicator: steady-state random write performance. At this point, the amount of user writes and the speed of garbage collection are in a fixed ratio, i.e., HostWr and MvWr are in a certain speed ratio (this is a common industry practice and is not within the scope of this patent design); 4) Step 2 can only be performed after Step 1 is completed. If there are many E / P operations on a certain DieOff, MvRd will not be dispatched for a long time. Therefore, in the previous strategy, the migration speed of Mv is random, especially when the full Die is divided into four equal parts, this randomness will be enhanced; if MvRd cannot be dispatched in time, the firmware will wait for MvRd to complete before performing MvWr, causing MvWr speed fluctuations, which in turn cause HostWr performance fluctuations.
[0195] Based on this, the application designs a strategy: 1) the time of receiving the Req is recorded as Treq, and the expected time of the Req is recorded as Texp, Texp = Treq + EXP; for Flash, the reading tRead is generally short, at the level of microseconds (typically, TLC: 45us, QLC: 80us), and the erasing tErase and the writing tProrgam are both at the level of milliseconds. Therefore, for reading, EXPrd = 0; for erasing / writing, Max (tErase, tProrgam) can be taken, such as taking the experience value EXPProgram = 10ms; EXPErase = 10ms; 2) according to Texp, the corresponding List of DieOff is inserted from large to small, to ensure that the Req with small Texp is scheduled first
[0196] In the embodiment of the application, the above strategy ensures that MvRd is scheduled first; at the same time, it also prevents the situation that erasing / writing requests are always inserted in front of reading requests, so that the erasing / writing requests cannot be scheduled and are starved.
[0197] Please refer to Figure 13 , Figure 13 The embodiment of the application provides a flowchart for creating a response chain table;
[0198] As shown in the flowchart for creating a response chain table, the flowchart comprises the following steps: Figure 13
[0199] Step S1301: creating a response chain table;
[0200] Specifically, the response chain table is created, and after MvRd is completed on the Flash, the Delay Ack time is hung on the response chain table.
[0201] Step S1302: obtaining an expected completion time corresponding to each reading request;
[0202] Specifically, the expected completion time corresponding to each reading request is obtained, wherein the expected completion time = the time of receiving the reading request by the scheduling chain table + a preset delay time tDelay, and the preset delay time tDelay can be set according to actual conditions, for example, tDelay is taken as tProrgam / 2.
[0203] Step S1303: inserting the reading request corresponding to the expected completion time into the response chain table in the order from large to small according to the expected completion time;
[0204] Specifically, the reading request corresponding to the expected completion time is sorted in the order from large to small according to the expected completion time, and the reading request corresponding to the expected completion time is inserted into the response chain table in the order of sorting.
[0205] Please refer toFigure 14 , Figure 14 A schematic diagram of a response chain table is provided in an embodiment of the present application.
[0206] As shown in Figure 14 , the scheduling chain table includes a head and a tail, and the smaller the expected completion time is, the closer to the head of the scheduling chain table. The response information corresponding to the read request is sent to the firmware module, so that the firmware performs a write operation after receiving the response information; and after sending the response information corresponding to the read request to the firmware module, the read request is deleted from the response chain table.
[0207] Please refer to Figure 15 , Figure 15 A schematic diagram of a flow for determining whether the first expected completion time is less than or equal to the current time is provided in an embodiment of the present application.
[0208] As shown in Figure 15 , the flow for determining whether the first expected completion time is less than or equal to the current time includes:
[0209] Step S1501: Poll the response chain table every fixed time to obtain a read request currently located at the head of the response chain table, and obtain a first expected completion time corresponding to the read request.
[0210] Specifically, the fixed time is set by a timer, for example, the fixed time is set to 10 microseconds, and the response chain table is quickly polled every fixed time to obtain a read request currently located at the head of the response chain table, and a first expected completion time corresponding to the read request.
[0211] In the embodiments of the present application, a strategy for processing requests and responses is provided, especially in scenarios where a large number of requests need to be processed efficiently and timely responses are ensured. The strategy includes: when processing requests, those requests that have reached or exceeded the expected completion time are processed first and are immediately given response information / acknowledgement information (Ack), so that the requests that have reached the expected completion time are Acked as soon as possible, which means that the system has an expected completion time or deadline, and for each request, when its processing time reaches or exceeds the expected time, the system should immediately send a response information (Ack) to the requestor, including the firmware module, indicating that the request has been processed or completed. This ensures that the requestor obtains feedback in a timely manner, reduces waiting time, and improves the response speed and efficiency of the system.
[0212] Meanwhile, a response list AckList is created, which is a list for storing requests to be confirmed, and at each time a new request is inserted into the response list (AckList), the head of the list is checked to see if there is a request requiring a cq, which represents a special processing queue or channel for processing requests with high priority or requiring special attention.
[0213] In the embodiments of the present application, the strategy for efficiently processing requests not only ensures timely response of the requests, but also considers the requirements of priority and special processing, which helps to improve the overall performance of the system.
[0214] Step S1502: judging whether the first expected completion time is less than or equal to the current time according to the first expected completion time and the current time;
[0215] Specifically, whether the first expected completion time is less than or equal to the current time is judged according to the first expected completion time and the current time, that is, whether the first expected completion time is less than or equal to the current time is determined by comparing the first expected completion time and the current time, if the first expected completion time is less than or equal to the current time, step S1503 is entered; if the first expected completion time is greater than the current time, the present polling is stopped, and step S1501 is returned to wait for the next fixed time interval to start the next polling.
[0216] For example, the AckList is polled periodically. The TAck of the Req at the head of the AckList is compared with the current Tcurrent, if TAck<= Tcurrent, the Req Ack is returned, and then the next Req on the AckList is checked until TAck> Tcurrent, and the present polling is exited.
[0217] Step S1503: sending the response information corresponding to the read request to the firmware module, so that the firmware performs a write operation after receiving the response information;
[0218] Specifically, if the first expected completion time is less than or equal to the current time, the response information corresponding to the read request is sent to the firmware module, so that the firmware performs a write operation after receiving the response information, wherein the write operation refers to a write operation of data migration.
[0219] Step S1504: deleting the read request from the response list after sending the response information corresponding to the read request to the firmware module;
[0220] Specifically, after sending the response information corresponding to the read request to the firmware module, the read request needs to be deleted from the response list, and the next polling is waited for.
[0221] In the embodiments of the present application, the present application provides a concurrent processing method of operation request, applied to a flash memory device, the flash memory device being communicatively connected to a host, and the method comprises: obtaining a total die number of the flash memory device; determining a first maximum die number according to a bandwidth rate corresponding to a single die; determining a second maximum die number according to a maximum power consumption threshold of the flash memory device; determining a maximum die number corresponding to a concurrent group according to the total die number of the flash memory device, the first maximum die number and the second maximum die number; determining a plurality of concurrent groups according to the maximum die number corresponding to the concurrent group; and obtaining an operation request sent by the host and performing concurrent processing on the operation request based on the concurrent group. By determining the first maximum die number according to the bandwidth rate corresponding to the single die, determining the second maximum die number according to the maximum power consumption threshold of the flash memory device, determining the maximum die number corresponding to the concurrent group according to the total die number of the flash memory device, the first maximum die number and the second maximum die number, determining the plurality of concurrent groups according to the maximum die number corresponding to the concurrent group, and obtaining the operation request sent by the host and performing the concurrent processing on the operation request based on the concurrent group, the present application can improve the performance of the flash memory device while realizing the concurrent processing of the operation request.
[0222] Please refer to Figure 16 , Figure 16 FIG. 1 is a structural schematic diagram of a flash memory device provided by an embodiment of the present application;
[0223] As Figure 16 shown, the flash memory device 160 comprises one or more processors 161 and a memory 162. Among them, Figure 16 take one processor 161 as an example.
[0224] The processor 161 and the memory 162 can be connected through a bus or other means, Figure 16 take the connection through the bus as an example.
[0225] The processor 161 is configured to provide calculation and control capability to control the flash memory device 160 to perform corresponding tasks, for example, to control the flash memory device 160 to perform the concurrent processing method of operation request in any one of the method embodiments described above, applied to a flash memory device, the flash memory device being communicatively connected to a host, and the method comprises: obtaining a total die number of the flash memory device; determining a first maximum die number according to a bandwidth rate corresponding to a single die; determining a second maximum die number according to a maximum power consumption threshold of the flash memory device; determining a maximum die number corresponding to a concurrent group according to the total die number of the flash memory device, the first maximum die number and the second maximum die number; determining a plurality of concurrent groups according to the maximum die number corresponding to the concurrent group; and obtaining an operation request sent by the host and performing concurrent processing on the operation request based on the concurrent group.
[0226] The first maximum die number is determined according to the bandwidth rate corresponding to a single die; the second maximum die number is determined according to the maximum power consumption threshold of the flash memory device; the maximum die number corresponding to the concurrent group is determined according to the total die number of the flash memory device, the first maximum die number and the second maximum die number; the plurality of concurrent groups is determined according to the maximum die number corresponding to the concurrent group; the operation request sent by the host is acquired, and the operation request is processed concurrently based on the concurrent group, so that the performance of the flash memory device can be improved while the operation request is processed concurrently.
[0227] The processor 161 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0228] The memory 162, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the concurrent processing method of operation requests in the embodiments of the present application. The processor 161 can implement the concurrent processing method of operation requests in any of the method embodiments described above by running the non-transitory software programs, instructions and modules stored in the memory 162. Specifically, the memory 162 can include volatile memory (VM), such as random access memory (RAM); the memory 162 can also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD) or solid-state drive (SSD) or other non-transitory solid-state storage devices; the memory 162 can also include a combination of the above types of memory.
[0229] The memory 162 can include high-speed random access memory and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state memory device. In some embodiments, the memory 162 can optionally include memory that is remotely located with respect to the processor 161, and these remote memories can be connected to the processor 161 through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0230] One or more modules are stored in the memory 162, and when executed by the one or more processors 161, perform the concurrent processing method of operation requests in any of the method embodiments described above, for example, perform the steps described above. Figure 3 The steps shown.
[0231] In the embodiments of the present application, the flash device 160 can also have a wired or wireless network interface, a keyboard and an input / output interface, etc., to perform input / output, and the flash device 160 can also include other components for implementing device functions, which are not described herein.
[0232] The embodiment of the present application further provides a nonvolatile computer readable storage medium, for example, a memory including program codes, which can be executed by a processor to complete the concurrent processing method of operation requests in the above embodiment. For example, the nonvolatile computer readable storage medium can be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CDROM), a magnetic tape, a floppy disk and an optical data storage device, etc.
[0233] The embodiment of the present application further provides a nonvolatile computer readable storage medium, for example, a memory including program codes, which can be executed by a processor to complete the concurrent processing method of operation requests in the above embodiment. For example, the nonvolatile computer readable storage medium can be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CDROM), a magnetic tape, a floppy disk and an optical data storage device, etc.
[0234] The embodiment of the present application further provides a computer program product, which includes one or more program codes stored in a nonvolatile computer readable storage medium. The processor of the flash device reads the program codes from the nonvolatile computer readable storage medium, and the processor executes the program codes to complete the method steps of the concurrent processing method of operation requests provided in the above embodiment.
[0235] Those skilled in the art can understand that all or part of the steps of the above embodiments can be completed by hardware, or by program codes related to hardware, and the program can be stored in a nonvolatile computer readable storage medium, and the storage medium mentioned above can be a Read-Only Memory, a magnetic disk or an optical disk, etc.
[0236] Through the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus a general hardware platform, and of course can also be implemented by hardware. Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware, and the program can be stored in a non-volatile computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiment methods. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM), etc.
[0237] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; under the idea of the present application, the technical features of the above examples or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes of the different aspects of the present application as described above. In order to be brief, they are not provided in detail; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for concurrent processing of operation requests, characterized in that, Applied to a flash memory device, the flash memory device being communicatively connected to a host, the method includes: Obtain the total number of bare dies in the flash memory device; The first maximum number of bare dies is determined based on the bandwidth corresponding to a single bare die, wherein the bare die includes multiple planes, and the planes include multiple pages; The second maximum number of bare dies is determined based on the maximum power consumption threshold of the flash memory device; The maximum number of dies corresponding to the concurrent group is determined based on the total number of dies in the flash memory device, the first maximum number of dies, and the second maximum number of dies. Multiple concurrent groups are determined based on the maximum number of bare dies corresponding to the concurrent groups; Obtain the operation request sent by the host, and process the operation request concurrently based on the concurrency group; The step of determining the first maximum number of bare dies based on the bandwidth corresponding to a single bare die includes: The time required for the flash memory device to write data to the page is obtained to determine the first time. The maximum data storage amount corresponding to each write operation of the bare die is determined based on the number of planes in the bare die and the maximum data storage amount for each page written at one time; Based on the first time and the maximum data storage volume corresponding to each write to the die, obtain the bandwidth corresponding to a single die; Based on the bandwidth corresponding to the individual die and the preset bandwidth requirement, determine the first maximum number of dies in each concurrent group, wherein the first maximum number of dies = the preset bandwidth requirement / the bandwidth corresponding to the individual die; The step of determining the maximum number of bare dies corresponding to the concurrent group based on the total number of bare dies in the flash memory device, the first maximum number of bare dies, and the second maximum number of bare dies includes: When the total number of dies in the flash memory device is a power of 2, the number of dies after multiple equal divisions is determined based on multiple division coefficients and the total number of dies in the flash memory device. The division coefficients are powers of 2, and the total number of dies = number of channels * number of chip select lines in each channel * number of logic units corresponding to each chip select line. Based on the first maximum number of bare dies and the second maximum number of bare dies, the maximum number of bare dies corresponding to the concurrent group is determined from the number of bare dies after equal division, wherein the maximum number of bare dies is greater than or equal to the first maximum number of bare dies, and less than or equal to the second maximum number of bare dies.
2. The method according to claim 1, characterized in that, The step of determining the second maximum number of bare dies based on the maximum power consumption threshold of the flash memory device includes: Obtain the power consumption value of the flash memory device when performing a write operation; Based on the preset maximum power consumption threshold and the power consumption value of the flash memory device when performing a write operation, the second maximum number of dies in each concurrent group is determined, wherein the second maximum number of dies = the preset maximum power consumption threshold / the power consumption value of the flash memory device when performing a write operation.
3. The method according to claim 1, characterized in that, The method further includes: When the total number of dies in the flash memory device is not a power of 2, a first die count is determined, wherein the first die count is 2. N The total number of dies in the flash memory device is greater than 2. N-1 And less than the number of the first bare wafers; Based on multiple division coefficients and the first number of bare dies, a multiple number of bare dies after division is determined, wherein the division coefficients are exponents of 2; Based on the first maximum number of bare dies and the second maximum number of bare dies, determine the maximum number of bare dies corresponding to the concurrent group from the number of bare dies after equal division, wherein the maximum number of bare dies is greater than or equal to the first maximum number of bare dies, and less than or equal to the second maximum number of bare dies; Obtain the division coefficient corresponding to the maximum number of bare dies, and determine the second number of bare dies based on the division coefficient, wherein the second number of bare dies = the first number of bare dies / division coefficient; The difference between the maximum number of bare dies and the second number of bare dies is obtained to determine a first number of unusable bare dies in each concurrent group, wherein the first number is equal to the difference.
4. The method according to claim 1, characterized in that, The method further includes: A die number is assigned to each die in the concurrent group, and the maximum value of the die number is the number of concurrent groups in the flash memory device multiplied by the maximum number of dies corresponding to the concurrent group. Based on the concurrency group, a scheduling list corresponding to the concurrency group is set, wherein the number of scheduling lists is equal to the maximum number of bare dies corresponding to the concurrency group; Obtain the operation request issued by the host, wherein the operation request includes the die number corresponding to the operation request; Based on the maximum number of raw dies corresponding to the concurrent group, perform a modulo operation on the raw die number corresponding to the operation request to obtain the sequence number of the scheduling list; The operation request is inserted into the scheduling list according to the sequence number of the scheduling list.
5. The method according to claim 4, characterized in that, The method further includes: Each time an operation request is dispatched in the scheduling chain, the operation request located at the head of the scheduling chain is obtained; After the operation request located at the head of the scheduling list is dispatched, the operation request is deleted from the scheduling list.
6. The method according to claim 4, characterized in that, The step of inserting the operation request into the scheduling list according to the sequence number of the scheduling list includes: Obtain the time when the operation request was received by the scheduling list; Based on the time when the operation request is received, the expected scheduling time corresponding to the operation request is determined, wherein the expected scheduling time = the time when the operation request is received + a preset scheduling time interval; According to the order of the expected scheduling time from largest to smallest, the operation request corresponding to the expected scheduling time is inserted into the scheduling list corresponding to the sequence number of the scheduling list.
7. The method according to claim 6, characterized in that, The step of determining the expected scheduling time corresponding to the operation request based on the time of receiving the operation request includes: When the operation request is a read request, the preset scheduling time interval is set to the first time interval, and the expected scheduling time corresponding to the read request is determined according to the first time interval and the time when the operation request is received; When the operation request is a write request or an erase request, the first execution time of the write request and the second execution time of the erase request are obtained; the larger value between the first execution time and the second execution time is determined as the second time interval; the preset scheduling time interval is set as the second time interval, and the expected scheduling time corresponding to the write request or erase request is determined according to the second time interval and the time when the operation request is received, wherein the second time interval is greater than the first time interval.
8. The method according to claim 6, characterized in that, The operation request includes a read request during the data migration process, and the method further includes: Create a response list; Obtain the expected completion time for each read request, wherein the expected completion time = the time when the scheduling list receives the read request + a preset delay time; The read requests corresponding to the expected completion times are inserted into the response list in descending order of expected completion times.
9. The method according to claim 8, characterized in that, The method further includes: At fixed intervals, the response list is polled to obtain the read request currently at the head of the response list and to obtain the first expected completion time corresponding to the read request. Based on the first expected completion time and the current time, determine whether the first expected completion time is less than or equal to the current time; If the first expected completion time is less than or equal to the current time, then send the response information corresponding to the read request to the firmware module so that the firmware can perform a write operation after receiving the response information; After sending the response information corresponding to the read request to the firmware module, the read request is deleted from the response list.
10. A flash memory device, characterized in that, include: A processor and a memory, the processor being configured to execute executable program code in the memory, wherein, when the executable program code is executed, the processor executes instructions for a concurrent processing method of an operation request as described in any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the concurrent processing method for operation requests as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Method and device for improving hybrid read-write performance of SSD (Solid State Disk), storage medium and equipment
CN116343849A
Performance evaluation method of flash memory interface and related device
CN116755639A