Method, electronic device and computer program product for flashing data

By prioritizing the flushing of storage segments with high maturity levels based on a maturity-level-based flushing strategy, the problem of high bandwidth consumption caused by random access in DRAM cache and the difficulty in maintaining complex data structures is solved, thus achieving efficient bandwidth utilization of the disk array.

CN116009762BActive Publication Date: 2025-11-11EMC IP HLDG CO LLC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111233547.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-22
Publication Date
2025-11-11
Estimated Expiration
2041-10-22

AI Technical Summary

Technical Problem

Existing technologies in DRAM cache flushing strategies suffer from high bandwidth consumption due to random disk access and difficulties in maintaining complex data structures, especially in disk arrays where bandwidth is not effectively utilized.

Method used

A write method based on the maturity level of storage segments is adopted. Storage segments are inserted into multiple lists to be written and written in descending order of maturity level, with priority given to writing storage segments with higher maturity levels.

Benefits of technology

It improves the bandwidth utilization of the disk array, reduces system resource consumption, and enhances data flushing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116009762B_ABST
    Figure CN116009762B_ABST
Patent Text Reader

Abstract

The embodiments of this disclosure relate to methods for writing data, electronic devices, and computer program products. In the data writing method provided by the embodiments of this disclosure, storage segments are inserted into multiple write-to-write lists corresponding to different maturity levels, based on the maturity levels of storage segments. Each write-to-write list corresponds to a different maturity level, and the maturity level at least indicates the ratio of the number of blocks of written data in the storage segment to the total number of blocks. The write-to-write lists for each maturity level are then written to the disk array in descending order of maturity level. This improves the bandwidth utilization of the disk array.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of this disclosure relate to the field of data storage, and more specifically, to methods for writing data, electronic devices, and computer program products. Background Technology

[0002] The flushing efficiency of Dynamic Random Access Memory (DRAM) cache is crucial to the overall performance of the storage system. Cache write mechanisms are divided into write-through and write-back modes. In write-through mode, data is written to both the cache and the back-end disk simultaneously. In write-back mode, data is written to the cache via input / output (I / O) operations, and then flushed to the back-end disk according to the flushing strategy. Typically, DRAM caches operate in write-back mode.

[0003] Disk array technology is a common backend disk management technology for commercial servers. Redundant Array of Independent Disks (RAID), as a type of redundant disk array, provides a solution for a large, independent storage device. The read and write performance of a disk array can be several times that of a single disk. Summary of the Invention

[0004] In a first aspect of this disclosure, a data flushing method is provided. The method includes inserting storage segments into multiple flushing lists corresponding to maturity levels, each of the multiple flushing lists corresponding to a different maturity level, the maturity level indicating at least the ratio of the number of blocks of written data in the storage segment to the total number of blocks. The method further includes flushing the flushing lists for their respective maturity levels to a disk array in descending order of maturity level.

[0005] In a second aspect of this disclosure, an electronic device is provided. The electronic device includes a processor and a memory coupled to the processor, the memory having instructions stored therein, the instructions causing the device to perform actions when executed by the processor. The actions include inserting storage segments into multiple write-to-flush lists corresponding to maturity levels, the multiple write-to-flush lists each corresponding to a different maturity level, the maturity level indicating at least the ratio of the number of blocks of written data in the storage segment to the total number of blocks. The actions also include flushing write-to-flush lists for corresponding maturity levels to a disk array in descending order of maturity level.

[0006] In a third aspect of this disclosure, a computer program product is provided, which is tangibly stored on a computer-readable medium and includes machine-executable instructions that, when executed, cause a machine to perform the method according to the first aspect.

[0007] The summary section is provided to present the chosen concepts in a simplified form, which will be further described in the detailed description below. The summary section is not intended to identify key or principal features of this disclosure, nor is it intended to limit the scope of this disclosure. Attached Figure Description

[0008] The above and other objects, features, and advantages of this disclosure will become more apparent from the accompanying drawings, in which like reference numerals generally denote like parts. In the drawings:

[0009] Figure 1 A schematic diagram of an example environment in which embodiments of the present disclosure may be implemented is shown;

[0010] Figure 2 A flowchart illustrating an example method for writing data according to an embodiment of the present disclosure is shown;

[0011] Figure 3 A schematic diagram illustrating the re-insertion of storage segments based on an updated maturity level, according to some embodiments of this disclosure;

[0012] Figure 4 A schematic diagram of a skip list to be written according to some embodiments of the present disclosure is shown; and

[0013] Figure 5 A block diagram of an example device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation

[0014] The principles of this disclosure will now be described with reference to several exemplary embodiments illustrated in the accompanying drawings. While preferred embodiments of this disclosure are shown in the drawings, it should be understood that these embodiments are described only to enable those skilled in the art to better understand and implement this disclosure, and are not intended to limit the scope of this disclosure in any way.

[0015] The term "comprising" and its variations as used herein signify open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "at least partially based on". The terms "one example embodiment" and "one embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0016] In traditional technologies, two flushing strategies are known: flushing by time order and flushing by logical block address (LBA) order of the backend disk. Each of these strategies has its advantages and disadvantages.

[0017] When using a time-ordered flush strategy, the cache segments to be flushed are typically arranged in a first-in, first-out (FIFO) queue. Data written to this queue first is flushed to the backend disk first. The time-ordered flush strategy is simple and efficient. However, because the location of data flushed to the backend disk is random, storage segments with adjacent logical block addresses on the backend disk may be scattered across multiple flushes, resulting in random access to the backend disk. Disk addressing is typically linear, based on LBA addresses. This random access to the backend disk reduces addressing efficiency and leads to high bandwidth utilization on the backend disk.

[0018] The LBA sorting and flushing strategy solves the problem of random disk access mentioned above, reducing bandwidth consumption on the backend disk. However, this strategy requires continuous balancing of a complex data structure (e.g., a red-black tree). Regardless of the amount of data in a storage segment, a balancing operation needs to be performed based on the storage address indicated by each storage segment when data is inserted or deleted.

[0019] Furthermore, the LBA sorting flush strategy is favorable for backend disks with a single physical disk. However, more and more storage systems now use disk arrays, which consist of multiple physical disks. In a disk array (e.g., RAID), several physical disks are combined into a larger virtual device. Read and write requests are distributed across the disks in a striped fashion, achieving "simultaneous" read / write operations and thus improving performance. Therefore, for such disk arrays, it is desirable to write more data to each stripe in a single flush. The LBA sorting flush strategy does not take into account the striping concept of disk arrays.

[0020] The embodiments of this disclosure propose a data flushing scheme. Based on the maturity level of the storage segment to be flushed, the storage segment is inserted into a flushing list corresponding to that maturity level in multiple flushing lists. Then, the flushing lists for the corresponding maturity levels in the multiple flushing lists are flushed to the disk array in descending order of maturity level.

[0021] According to the embodiments described herein, by prioritizing the writing of storage segments with higher maturity levels to the disk array, more data can be written to the stripe in a single write operation. This improves the bandwidth utilization of the disk array and reduces the consumption of system resources.

[0022] The basic principles and several exemplary implementations of this disclosure will be described below with reference to the accompanying drawings. It should be understood that these exemplary embodiments are given only to enable those skilled in the art to better understand and implement the embodiments of this disclosure, and are not intended to limit the scope of this disclosure in any way.

[0023] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure may be implemented is shown. (See diagram for reference.) Figure 1 As shown, environment 100 includes cache 110 and disk array 120. When an IO operation writes data to cache 110, the data for different IO operations is stored in storage segments of cache 110. Figure 1 The diagram illustrates storage segments 111-1, 111-2, 111-3, and 111-N (which may also be collectively or individually referred to as "storage segment 111"), where N is a natural number. Each storage segment 111 indicates a storage address within the disk array 120. Storage segment 111 comprises multiple blocks, and data written during I / O operations is stored within these blocks. When data is flushed to the disk array 120, data stored in the same storage segment 111 is flushed to the storage address of the disk array 120 indicated by that storage segment 111.

[0024] According to embodiments of this disclosure, multiple lists of items to be written are stored in cache 110. Figure 1 The diagram shows write-to-write lists 112-1, 112-2, 112-3, and 112-M (which may also be collectively or individually referred to as "write-to-write lists 112"), where M is a natural number. Each write-to-write list 112 includes nodes for inserting into storage segments 111. Before writing the data stored in storage segments 111 to the disk array 120, the storage segments 111 are inserted into write-to-write lists 112 based on their respective maturity levels. This will be discussed later in conjunction with... Figure 2 Provide a detailed description.

[0025] Disk array 120 can communicate with cache 110. Data can be flushed from cache 110 to disk array 120, and data can also be read from disk array 120 into cache 110. Although disk array 120... Figure 1 It is shown as a whole, but in reality, disk array 120 includes multiple physical disks.

[0026] It should be understood that the structure and function of environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure. For example, embodiments of this disclosure can also be applied to environments different from environment 100. Additionally, although Figure 1The image only shows four storage segments in the cache, but it is not limited to this; there can be more or fewer storage segments in the cache. Although Figure 1 The image only shows that each storage segment includes 8 blocks, but it is not limited to this; each storage segment may also include more or fewer blocks.

[0027] Figure 2 A flowchart illustrating an example method 200 for writing data according to an embodiment of the present disclosure is shown. Method 200 can be implemented, for example, in... Figure 1 The method is executed in environment 100 as shown. It should be understood that method 200 may also include additional actions not shown and / or the actions shown may be omitted; the scope of this disclosure is not limited in this respect. The following is in conjunction with… Figure 1 Let me describe method 200 in detail.

[0028] At box 210, based on the maturity level of storage segment 111, storage segment 111 is inserted into multiple write-to-write lists 112 corresponding to that maturity level. The maturity level refers to the ratio of the number of blocks with written data in storage segment 111 to the total number of blocks. Different write-to-write lists 112 correspond to different maturity levels.

[0029] The lowest maturity level indicates a percentage greater than zero. The percentages indicated by each maturity level can be set according to actual needs. For example, in some embodiments, the highest maturity level can be set to 100%, meaning all blocks in storage segment 111 have been written to (also referred to as "storage segment 111 is full"). In some embodiments, storage segment 111 may not typically be full, so the percentage indicated by the highest maturity level can be set lower, such as 93.75%, 87.5%, 80%, 75%, 62.5%, 50%, 37.5%, or lower.

[0030] The granularity of maturity level division can also be set according to actual needs. For example, in some embodiments, each storage segment 111 has, for example, the granularity of maturity level division. Figure 1 The diagram shows 8 blocks. If the highest maturity level is set to 100% and the granularity of the partition is set to 25%, then there will be 4 maturity levels: Level 1 (25%), Level 2 (50%), Level 3 (75%), and Level 4 (100%) (i.e., every two blocks with written data constitute Level 1).

[0031] The lists to be refreshed, 112-1, 112-2, 112-3, and 112-M, correspond to these four maturity levels, respectively. Let's assume that list 112-1 corresponds to level one, list 112-2 to level two, list 112-3 to level three, and list 112-M to level four. When the proportion of blocks with written data in storage segment 111 is not higher than 25% (e.g., storage segment 111-1), storage segment 111-1 is inserted into the write-to-write list 112-1; when the proportion is higher than 25% but not higher than 50% (e.g., storage segment 111-2), storage segment 111-2 is inserted into the write-to-write list 112-2; when the proportion is higher than 50% but not higher than 75% (e.g., storage segment 111-3), storage segment 111-3 is inserted into the write-to-write list 112-3; when the proportion is higher than 75% (e.g., storage segment 111-N), storage segment 111-N is inserted into the write-to-write list 112-M.

[0032] In some embodiments, the number of maturity levels can be set to be equal to the total number of blocks in storage segment 111. That is, maturity levels are divided with the smallest granularity, and the maturity level increases by one level for each block written.

[0033] Then, at box 220, in descending order of maturity level, the write-to-write lists 112 for their respective maturity levels are written to the disk array 120. For example, as Figure 1 The read list 112-M corresponds to the highest maturity level, so it is written to disk array 120 first. Read list 112-1 is written last because it corresponds to the lowest maturity level.

[0034] When writing to disk array 120, the storage segments 111 inserted in the write list 112 are written to the storage address of disk array 120 indicated by the storage segment 111 in the order in the list.

[0035] In this way, by prioritizing the writing of high-maturity storage segments to the disk array, more data can be written to the stripes of disk array 120 in a single write operation, thereby improving the bandwidth utilization of the disk array.

[0036] In some embodiments, in response to an increase in the number of blocks in storage segment 111 that have been written to, the maturity level of storage segment 111 is updated. Then, based on the updated maturity level of storage segment 111, it is inserted into a write-to-push list 112 corresponding to the updated maturity level. During the flushing of the write-to-push list 112 at a higher maturity level, storage segments 111 that have been inserted into the write-to-push list 112 at a lower maturity level can be removed. The removed storage segments 111 are not full and still have available blocks that can be used to store new data written by I / O operations. The following will combine... Figure 1 and Figure 3 Such embodiments are described in detail.

[0037] Figure 3 A schematic diagram is shown illustrating the re-insertion of storage segment 111 based on an updated maturity level, according to some embodiments of this disclosure. Figure 3 In the process, storage segment 111-1, which was originally at maturity level 1, was removed from the corresponding level's write-to-pick list 112-1. Then, four new data entries written by the new IO operation were stored in storage segment 111-1. Therefore, the maturity level of storage segment 111-1 was updated from level 1 to level 3. Based on the updated maturity level, storage segment 111-1 should be inserted into the write-to-pick list 112-3 corresponding to level 3.

[0038] In some embodiments, even while the write-to-be-written list 112 is being written, the inserted but not yet written storage segments 111 can be retrieved and re-inserted as described above. Alternatively, updated storage segments 111 can be inserted into nodes in the write-to-be-written list 112 that are currently being written but have not yet been written.

[0039] In this way, it is possible to ensure that storage segments with higher maturity levels are written every time disk array 120 is written. This allows more data to be written to the stripes of disk array 120 in a single write operation, further improving the bandwidth utilization of the disk array.

[0040] Figure 4 A schematic diagram of a skip list to be written 400 according to some embodiments of the present disclosure is shown. The skip list to be written 400 can be as follows: Figure 1 Example implementations of one or more write lists in skip list form in write list 112 shown, such as write list 112-M.

[0041] In some embodiments, in response to a ratio of the number of blocks with written data in storage segment 111 to the total number of blocks exceeding a threshold ratio, storage segment 111 is inserted into one or more skip list write-to-write lists 400 corresponding to the respective maturity level, based on the maturity level and the storage address of the disk array 120 indicated by storage segment 111. The threshold ratio can be set according to actual needs. For example, in situations such as... Figure 1 In the four maturity levels of the pending write list 112 shown, if the above threshold ratio is set to 50%, then the pending write list 112-3 and the pending write list 112-M will be two skip list pending write lists 400 in the form of skip lists.

[0042] like Figure 1 As shown, 7 blocks in storage segment 111-N have been written to, representing 87.5% of the total number of blocks, which is higher than the threshold of 50%. Furthermore, storage segment 111-N is at maturity level four, therefore, storage segment 111-N should be inserted. Figure 4 The skip list to be written is shown in list 400 (i.e., in skip list format, list 112-M). Next, we will combine... Figure 4 This describes the insertion of storage segments 111-N.

[0043] The skip list to be flushed 400 includes nodes 410-1, 410-2, 410-3, 410-4, 410-5, and 410-P (which may also be collectively referred to as "node 410" or simply as "node 410") for inserting storage segment 111, where P is a natural number. Each node 410 includes at least a first-level index pointing to the next node 410. For example, the first-level index of node 410-1 points to node 410-2, the first-level index of node 410-2 points to node 410-3, and so on.

[0044] Some nodes in node 410 (such as node 410-1, node 410-4, and node 410-5) also include second-level indexes. These second-level indexes point to the next node 410 that includes a second-level index. For example, the second-level index of node 410-1 points to node 410-4, and the second-level index of node 410-4 points to node 410-5.

[0045] Some nodes in node 410 that include a second-level index (such as nodes 410-1 and 410-5) also include a third-level index. The third-level index points to the next node 410 that includes a third-level index. For example, the third-level index of node 410-1 points to node 410-5.

[0046] When inserting storage segment 111-N into the skip list to be flushed list 400, the storage address in disk array 120 indicated by storage segment 111-N is first compared with the storage address indicated by the already inserted storage segment 111 in nodes 410 (e.g., nodes 410-1 and 410-5) including the third-level index. The comparison reveals that the storage address indicated by storage segment 111-N is greater than the storage address indicated by the already inserted storage segment 111 in node 410-1, and less than the storage address indicated by the already inserted storage segment 111 in node 410-5. Therefore, the range of the third-level index where storage segment 111-N should be inserted is determined to be between nodes 410-1 and 410-5.

[0047] Next, within the determined third-level index range, the storage address indicated by storage segment 111-N is compared with the storage address indicated by storage segment 111 already inserted in node 410 (e.g., node 410-4), which includes the second-level index. The comparison reveals that the storage address indicated by storage segment 111-N is less than the storage address indicated by storage segment 111 already inserted in node 410-4. Therefore, the second-level index range where storage segment 111-N should be inserted is determined to be the range between nodes 410-1 and 410-4.

[0048] Finally, within the determined second-level index range, the storage address indicated by storage segment 111-N is compared with the storage addresses indicated by storage segments 111 already inserted in other nodes 410 (e.g., node 410-3) within that range. The comparison reveals that the storage address indicated by storage segment 111-N is less than the storage address indicated by the storage segment 111 already inserted in node 410-3. Therefore, it is determined that storage segment 111-N should be inserted into node 410-2.

[0049] The distance between nodes 410 including the third-level index (e.g., the distance between nodes 410-1 and 410-5) corresponds to the maximum write range allowed in a single flush of disk array 120. The distance between nodes 410 including the second-level index (e.g., the distance between nodes 410-1 and 410-4) corresponds to the stripe size of disk array 120. Storage segments inserted into the same third-level index range are flushed to disk array 120 using the same thread. Storage segments inserted into the same second-level index range are flushed into the same stripe of disk array 120. The size of the third-level index range and the size of the second-level index range vary depending on the type and width of disk array 120. The width of disk array 120 refers to the number of physical disks merged into a single unit.

[0050] When flushing the skip list to be flushed 400 to the disk array 120, a thread corresponding to the number of nodes 410 including the third-level index is allocated. Using the allocated thread, the skip list to be flushed 400 is flushed starting from multiple nodes 410 including the third-level index.

[0051] In this way, by storing higher-maturity storage segments in a skip list format, more data can be flushed to more stripes of disk array 120 in a single flush. This improves flush efficiency and further enhances the bandwidth utilization of disk array 120.

[0052] In other embodiments, in response to a ratio of the number of blocks with written data to the total number of blocks in storage segment 111 being less than or equal to a threshold ratio, storage segment 111 is inserted into one or more FIFO flush lists corresponding to the respective maturity level. If the threshold ratio is set to 50%, then the flush lists 112-1 and 112-2 will be FIFO flush lists in a first-in-first-out (FIFO) format. This avoids the need to maintain complex flush lists for storage segments 111 with low maturity levels, saving system resources.

[0053] Figure 5 A schematic block diagram of an example device 500 that can be used to implement embodiments of the present disclosure is shown. For example, such as Figure 1 The cloud server 110 shown can be implemented by device 500. For example... Figure 5 As shown, device 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 502 or loaded from storage unit 508 into random access memory (RAM) 503. RAM 503 may also store various programs and data required for the operation of device 500. CPU 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.

[0054] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0055] The various processes and handling described above, such as method 200, can be executed by processing unit 501. For example, in some embodiments, method 200 can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by CPU 501, one or more actions of method 200 described above can be performed.

[0056] This disclosure can be a method, apparatus, system, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.

[0057] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0058] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0059] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0060] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0061] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0062] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0063] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0064] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A data flushing method, comprising: Based on the maturity level of the storage segment, the storage segment is inserted into multiple write-to-flush lists corresponding to the maturity level. The multiple write-to-flush lists correspond to different maturity levels, and the maturity level at least indicates the ratio of the number of blocks with written data in the storage segment to the total number of blocks. as well as According to the descending order of maturity level, the write-to-write lists for the corresponding maturity levels from the plurality of write-to-write lists are written to the disk array, wherein inserting the storage segment based on the maturity level includes: In response to the ratio being greater than a threshold ratio, based on the maturity level and the storage address of the disk array indicated by the storage segment, the storage segment is inserted into one or more skip list write lists corresponding to the maturity level, wherein the one or more skip list write lists are write lists in the form of skip lists among the plurality of write lists.

2. The method according to claim 1, wherein the nodes in the skip list to be flushed that are used to insert storage segments include at least a first-level index pointing to the next node. Some of the nodes also include a second-level index, which points to the next node that includes the second-level index. The nodes in this subset also include a third-level index, which points to the next node that includes a third-level index. This includes the distance between nodes in the third-level index corresponding to the maximum write range allowed in a single flush of the disk array, and the distance between nodes in the second-level index corresponding to the stripe size of the disk array.

3. The method according to claim 2, wherein inserting the storage segment into the skip list to be flushed corresponding to the maturity level based on the storage address indicated by the storage segment comprises: Starting from the third-level index and progressing to the first-level index, the storage address indicated by the storage segment is compared with the storage address indicated by the storage segment already inserted in the skip list to be flushed, so as to determine the node to be inserted in the skip list to be flushed at the storage address indicated by the storage segment.

4. The method of claim 2, wherein writing the write-to-write list for a corresponding maturity level from the plurality of write-to-write lists to the disk array comprises: Allocate threads corresponding to the number of nodes including the third-level index; as well as Using the allocated thread, the list to be flushed is started from multiple nodes, including the third-level index.

5. The method of claim 1, wherein writing the write-to-write list for a corresponding maturity level from the plurality of write-to-write lists to the disk array comprises: The data already written in the storage segment inserted in the list to be written is flushed to the storage address of the disk array indicated by the storage segment.

6. The method according to claim 1, further comprising: In response to an increase in the number of blocks in the storage segment that have been written with data, the maturity level of the storage segment is updated; as well as Based on the updated maturity level of the storage segment, the storage segment is inserted into the write-to-pick list corresponding to the updated maturity level.

7. An electronic device, comprising: processor; as well as A memory coupled to the processor, the memory having instructions stored therein, the instructions causing the device to perform actions when executed by the processor, the actions including: Based on the maturity level of a storage segment, the storage segment is inserted into multiple write-to-flush lists corresponding to the maturity level. These multiple write-to-flush lists each correspond to a different maturity level, and the maturity level at least indicates the ratio of the number of blocks with written data to the total number of blocks in the storage segment. According to the descending order of maturity level, the write-to-write lists for the corresponding maturity levels from the plurality of write-to-write lists are written to the disk array, wherein inserting the storage segment based on the maturity level includes: In response to the ratio being greater than a threshold ratio, based on the maturity level and the storage address of the disk array indicated by the storage segment, the storage segment is inserted into one or more skip list write lists corresponding to the maturity level, wherein the one or more skip list write lists are write lists in the form of skip lists among the plurality of write lists.

8. The device of claim 7, wherein the nodes in the skip list to be flushed that are used to insert storage segments include at least a first-level index pointing to the next said node. Some of the nodes also include a second-level index, which points to the next node that includes the second-level index. The nodes in this subset also include a third-level index, which points to the next node that includes a third-level index. This includes the distance between nodes in the third-level index corresponding to the maximum write range allowed in a single flush of the disk array, and the distance between nodes in the second-level index corresponding to the stripe size of the disk array.

9. The device of claim 8, wherein inserting the storage segment into the skip list to be flushed corresponding to the maturity level based on the storage address indicated by the storage segment comprises: Starting from the third-level index and progressing to the first-level index, the storage address indicated by the storage segment is compared with the storage address indicated by the storage segment already inserted in the skip list to be flushed, so as to determine the node to be inserted in the skip list to be flushed at the storage address indicated by the storage segment.

10. The device of claim 8, wherein writing the write-to-write list for a corresponding maturity level from the plurality of write-to-write lists to the disk array comprises: Allocate threads corresponding to the number of nodes including the third-level index; as well as Using the allocated thread, the list to be flushed is started from multiple nodes, including the third-level index.

11. The device of claim 7, wherein writing the write-to-write list for a corresponding maturity level from the plurality of write-to-write lists to the disk array comprises: The data already written in the storage segment inserted in the list to be written is flushed to the storage address of the disk array indicated by the storage segment.

12. The device according to claim 7, wherein the action further includes: In response to an increase in the number of blocks in the storage segment that have been written with data, the maturity level of the storage segment is updated; as well as Based on the updated maturity level of the storage segment, the storage segment is inserted into the write-to-pick list corresponding to the updated maturity level.

13. A computer program product tangibly stored on a computer-readable medium and comprising machine-executable instructions that, when executed, cause a machine to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Destaging modified data blocks from cache memory

    US5542066A