Use the insertion point to determine the position of the track in the cache list that is processed by the move
By using insertion points in the cache list to determine the track position and delay moving the track to the MRU side, the lock contention problem is solved and the cache hit rate and processing efficiency is improved.
Patent Information
- Application Number
- CN202010788698.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-08-07
- Filing Date
- 2020-08-07
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2040-08-07
AI Technical Summary
In cache management systems, lock contention problems lead to the delay and processing efficiency of track movement to the MRU side, and the prior art is difficult to effectively solve this problem.
Use insertion points to determine the track position in the cache list, maintain the time integrity of the track through the insertion points, delay moving the track to the MRU end, ensure that tracks with similar access time are degraded together, and improve the cache hit rate.
Reduces lock contention and delay, improves the efficiency of processing I/O requests, and enhances the processing capability of caches.
Smart Images

Figure CN112347006B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to computer program products, systems and methods for employing insertion points to determine the location of tracks processed by a move in a cache list. Background Art
[0002] The cache management system buffers tracks in a storage device that are recently accessed due to read and write operations in a storage device (such as memory) that is accessed faster than the storage device storing the requested track. Subsequent read requests for tracks in the faster access cache memory are returned at a faster rate than the requested tracks are returned from the slower access storage device, thereby reducing read latency. The cache management system may also return completion to a write request when a modified track pointing to a storage device is written to the cache memory and before the modified track is written out to a storage device (such as a hard drive). Write latency to a storage device is typically significantly longer than write latency to a cache memory. Thus, using a cache also reduces write latency.
[0003] The cache management system may maintain a linked list having an entry for each track stored in the cache, which may include write data or read data buffered in the cache prior to writing to the storage device. In a commonly used least recently used (LRU) cache technique, if a track in the cache is accessed, i.e., a cache "hit," the entry in the LRU cache list for the accessed track is moved to the most recently used (MRU) end of the list. If the requested track is not in the cache, i.e., a cache miss, the track in the cache whose entry is at the LRU end of the list may be removed and demoted, and an entry for the track data being fed into the cache from the storage device is added to the MRU end of the LRU list. Using this LRU cache technique, more frequently accessed tracks are likely to remain in the cache, while less frequently accessed data will be more likely to be removed from the LRU end of the list to make room in the cache for newly accessed tracks.
[0004] In order to move tracks to the MRU end as they are accessed, the process managing the cache needs to acquire a lock on the LRU cache list. Since this lock is highly sought by many processes, there can be a lot of lock contention in order to obtain the lock.
[0005] One technique to resolve lock contention is to batch tracks that need to be moved to the MRU end in the MRU array. When the MRU array is full, all tracks in the MRU array are moved to the MRU end of the cache list. Another technique to resolve lock contention is cache partitioning, where multiple LRU lists are maintained for different partitions of tracks, where each partition has its own LRU lock.
[0006] There is a need in the art for improved techniques for moving tracks toward the MRU end of a cache when accessed. Summary of the invention
[0007] A computer program product, system, and method for using insertion points to determine the position of a track processed by a move in a cache list is provided herein. There are multiple insertion points for a cache list having a least recently used (LRU) end and a most recently used (MRU) end for caching, wherein each of the insertion points identifies a track in the cache list. In response to determining that a processed track is indicated to be moved to the MRU end, an insertion point of one of the insertion points at which the processed track is moved is determined. The processed track is indicated at a position in the cache list relative to the determined insertion point. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 One embodiment of a computing environment is shown.
[0009] Figure 2 One embodiment of displaying a least recently used (LRU) list.
[0010] Figure 3 One embodiment of a cache control block is shown.
[0011] Figure 4 One embodiment of an insertion point is shown.
[0012] Figure 5 An embodiment of operations for processing a read request for a track is shown.
[0013] Figure 6 An embodiment of operations for initiating a de-stage scan to demote tracks from the LRU end of a cache list is shown.
[0014] Figure 7 An embodiment of operations for handling tracks maintained in an MRU array that are added to the cache but not added to the cache list is shown.
[0015] Figure 8 An embodiment of operations for moving a track to an insertion point in a cache list is shown.
[0016] Fig. 9 An embodiment of an operation for adjusting an insertion point after a track has been moved over the insertion point is shown.
[0017] Fig.10 An embodiment of an operation for adjusting an insertion point after a track has been moved below the insertion point is shown.
[0018] Fig.11 An embodiment of an operation for adjusting an insertion point after moving a plurality of tracks to the insertion point is shown.
[0019] Fig.12 Display can be achieved Figure 1 The computing environment of the components. DETAILED DESCRIPTION
[0020] In the prior art, accessed tracks may be processed in batches, and then the batch of tracks is relocated to the MRU end of the cache list. However, since some time has passed since the accessed tracks in the batch were processed, their proper position in the LRU list based on the time they were last accessed may not be at the MRU end, which may be a more recently accessed track.
[0021] The embodiments described herein provide improvements to computer cache technology so that insertion points are used to determine where to locate the accessed track in the LRU list when the movement of the accessed track to the MRU end is delayed for batch processing. Through the described embodiments, there are multiple insertion points for the cache list, each of which identifies a track in the cache list at a different track interval. When a track is ready to be moved to the MRU end, one of these insertion points is determined at which the processed track is moved, which can be an insertion point with a timestamp closest to the time when the track was last accessed. The track is then indicated in the cache list at a position relative to the determined insertion point.
[0022] The described embodiment places the accessed track that is delayed moved to the MRU end in a position in the cache list that includes other entries with a last access time that is closest to the time the track was last accessed. The use of insertion points maintains the temporal integrity of the cache list to ensure that tracks with similar last access times are demoted together, which improves cache hit rates.
[0023] Figure 1 An embodiment of a computing environment is shown. A plurality of hosts 1021, 1022, ... 102 n An input / output (I / O) request may be submitted to the storage controller 104 via the network 106 to access data at a volume 108 (e.g., a logical unit number, a logical device, a logical subsystem, etc.) in the storage 110. The storage controller 104 includes one or more processors 112 and a memory 114, including a cache 116 for caching data for the storage 110. The processor 112 may include a single central processing unit (CPU), one or a group of multiple cores on a single CPU, or a group of processing resources on one or more CPUs. The cache 116 is used to cache data between hosts 1021, 1022, ... 102n Data transferred between volume 108 in storage 110 is cached.
[0024] The memory 114 further includes a memory for managing the host 1021, 1022...102 n and a storage manager 118 for managing the transfer of tracks transferred between the host 1021, 1022 ... 102 n and a cache manager 120 for transferring data between the storage 110 and the cache 116. A track may include any unit of data configured in the storage 110, such as a track, a logical block address (LBA), a storage cell, a cell group (e.g., a column, row, or cell array), a block, a segment, etc., which may be part of a larger track group, such as a volume, a logical device, etc.
[0025] The cache manager 120 maintains cache management information 122 in the memory 114 to manage read (unmodified) and written (modified) tracks in the cache 116. The cache management information 122 may include a least recently used (LRU) cache list 200 to indicate tracks in the cache 116, a track index 124 to provide an index of the tracks in the cache 116 to a cache control block in a control block directory 300, wherein there is one cache control block for each track in the cache 116, and provides metadata of the tracks in the cache 116. The cache list 200 may indicate the cache control block 300 in the directory 300. i ; an insertion point 400, which points to a track in the cache list 200, for example, every Nth track; a most recently used (MRU) array 126, also referred to as an MRU list, which has tracks added to the cache 116 that are not yet indicated in the cache list 200 to allow batches of tracks to be added to the cache list 200 at one time to improve the processing efficiency of the cache, because a single lock request can be used to add multiple newly added tracks to the cache 116 in the cache list 200; and, a demotion preparation list 128, which indicates tracks that are ready to be demoted from the cache 116 and removed from the LRU end of the cache list 200.
[0026] The processor 112 executes the destage scan task 130 to scan the cache list 200 to determine unmodified tracks to add to the destage preparation list 128 .
[0027] The storage manager 118, cache manager 120 and downstage scan task 130 are Figure 1104 as program code that is loaded into memory 114 and executed by one or more processors 112. Alternatively, some or all of the functionality may be implemented as microcode or firmware in a hardware device in storage controller 104, such as in an application specific integrated circuit (ASIC).
[0028] The memory 110 may include one or more storage devices known in the art, such as a solid-state storage device (SSD), which includes solid-state electronics, NAND memory cells, EEPROM (electrically erasable programmable read-only memory), flash memory, flash disks, random access memory (RAM) drives, storage class memory (SCM), phase change memory (PCM), resistive random access memory (RRAM), spin-transfer torque memory (STM-RAM), conductive bridge RAM (CBRAM), magnetic hard disk drives, optical disks, magnetic tapes, etc. The storage devices may also be configured as device arrays, such as a bunch of disks (JBOD), direct access storage devices (DASD), redundant array of independent disks (RAID) arrays, virtualization devices, etc. Further, the storage devices may include heterogeneous storage devices from different vendors or from the same vendor.
[0029] Memory 114 may include suitable volatile or non-volatile memory devices, including those described above.
[0030] The network 106 may include a storage area network (SAN), a local area network (LAN), a wide area network (WAN), the Internet, an intranet, etc. Alternatively, the hosts 1021, 1022, . . . 102 n Connection to storage controller 104 may be through a bus interface, such as a Peripheral Component Interconnect (PCI) bus interface and other interfaces known in the art.
[0031] Figure 2 An embodiment of a cache list 200 is shown as a least recently used (LRU) list 200 having a most recently used (MRU) end 202 identifying a track that was most recently added to or accessed in the cache 116 and a least recently used (LRU) end 204, the MRU end 202 identifying a track that was most recently added to or accessed in the cache 116, the track identified at the LRU end 204 being selected for removal from the cache 116. The MRU end 202 is also associated with a first insertion point 4001. As tracks are added to the cache 116, the cache list 200 is populated, with subsequent insertion points 4002, 4003, ... 4004 being added. n-1 ,400 n Added. You can add an insert point every N tracks 400 i , so that when the next Nth track is added / indicated to the cache list 200, a new insertion point 400 is added iFor example, when the (i*N)th track is added, an insertion point (i+1) is added to point to the (i*N)th track in the cache list 200 .
[0032] As tracks are added to the MRU end 202 / first insertion point 4001, other tracks move downward toward the LRU end 204. If there is not enough room for a track to be added to the MRU end 202, a track can be demoted from the LRU end 204 to make room for a new track to be added to the cache list 200.
[0033] Figure 3 Cache control block 300 is shown for one track in cache 116 i An example embodiment of the present invention includes, but is not limited to, a cache control block identifier 302, such as a cache control block 300. i cache list 304, which indicates the cache control block 300 i associated tracks; a position 306 in the LRU cache list where the track is indicated; a last access timestamp 308 indicating the time the track was last accessed, e.g., read, in the cache 116; a re-MRU flag 310 indicating whether the track needs to be added toward the MRU end 202 of the cache list 200, e.g., whether the track was accessed while indicated in the cache list 200; a last MRU timestamp 312 indicating the time the track was last MRUed or moved to an insertion point 400 in the cache list 200 i and, the degraded state 314, indicating that the cache control block 300 i The identified track is to be demoted from cache 116 and indicated in the demote preparation list 128. In cache control block 300 i Additional information not mentioned here for managing tracks in cache 116 may be included.
[0034] In some embodiments, the timestamps 308, 312 may be set as serial numbers that increment periodically, for example, every clock cycle or a few milliseconds.
[0035] Figure 4 Show insertion point 400 i An embodiment in which there is an insertion point 4001 pointing to the MRU end 202 of the cache list 200 and further insertion points 4000 added pointing to every Nth track in the cache list 200 i , so that at any two insertion points 400 i and 400 i+1 There are N tracks indicated in the cache list 200. Each insertion point 400i The insertion point number 402 may include an insertion point number, such that the i-th number may point to the (i-1)*Nth track in the cache list 200; an entry number 404 in the cache list 200 to which the insertion point points, such as the (i-1)*Nth entry or other entries adjusted; and a cache control block 406, identifying the cache entry indicated by the insertion point 400. i The track being addressed / pointed to.
[0036] Figure 5 An embodiment of the operations performed by the cache manager 120 to process a read request for a track is shown. Upon receiving a read request (at block 500), if (at block 502) the track is in the cache 116, the cache control block 300 is i The last access timestamp 308 for the track being read in is set (at block 504) to the current system timestamp, and the re-MRU flag 310 is set (at block 506) to indicate that the track needs to be moved towards the MRU end 202, or to the appropriate insertion point 400. i If (at block 502) the track to be read is not in cache 116, then (at block 508) the track is brought from volume 108 into cache 116. The cache control block 300 for the brought track is then (at block 510) i The MRU array 126 is added, the timestamp of the last re-MRU 312 and the last access timestamp 308 are set as the current timestamps, and the re-MRU flag 310 is set to indicate that no re-MRU is to be performed.
[0037] pass Figure 5 In an embodiment, the requested track indicated in the cache list 200 is not moved immediately to the MRU end 202, but the movement of the track to the MRU end 202 is delayed until a later time when multiple tracks can be moved to the appropriate insertion point 400 in the cache list 200. i This avoids the delay and lock contention required to move the accessed tracks to the MRU end 202 immediately after access. Instead, the accessed tracks are indicated as needing re-MRU by a flag 310 and can be moved in batches to a higher insertion point in the cache list 200, at which point the lock of the cache list 200 can be accessed once for re-MRUing multiple tracks to a higher insertion point 400 in the cache list 200 toward the MRU end 202. iThis reduces lock contention and latency in processing cache list 200, thereby reducing latency in processing I / O requests. Further, new tracks fed into cache 116 are added to MRU array 126 so that they can be inserted into cache list 200 at insertion points 400 that have timestamps close to the time the new tracks were added to cache 116. i These new tracks are indicated in batches.
[0038] Figure 6 An embodiment of the operations performed by the de-stage scan task is shown, which is periodically called to process tracks from the LRU end 204 of the cache list 200 for de-stage from the cache. When processing (at block 600) a track for de-stage at the LRU end 204, if (at block 602) the re-MRU flag 310 indicates re-MRU or moving the track toward the MRU end 202, control passes (at block 604) to Figure 8 If (at block 602) the re-MRU flag 310 is not set, indicating that the track has been re-MRUed since it was last added to the cache 116 or re-MRUed to the insertion point 400, i If it has not been recently accessed, the processed track is removed (at block 606 ) from the cache list 200 and demoted, such as added to a demote preparation list 128 , from which the track is removed from the cache 116 .
[0039] pass Figure 6 In the embodiment, only those tracks that do not have a re-MRU flag 310 set are removed from the LRU end 204, indicating that the track has been inserted into the cache list 200 since it was added or re-MRU into the cache list 200. i If the track is in the cache list 200 and is indicated as needing to be re-MRU, i.e. upwards towards the insertion point 400 i If the track is accessed while moving, the track is not Figure 8 Destage and re-MRU. Since the destage scan task 130 holds the lock to the cache list 200, the track can be re-MRU to the insertion point 400. i Instead of incurring delays from lock contention for obtaining a lock for accessing the cache list 200 for each track, the lock is obtained at one time to perform re-MRU for multiple tracks.
[0040] Figure 7An embodiment of operations performed by the cache manager 120 and / or the destage scan task 130 to process the MRU array 126 to add tracks to the insertion point 400 based on when those tracks were added to the cache 116 but not yet added to the cache list 200 is shown. i When the number of tracks equals a threshold or the array 126 is full, the MRU array 126 may be processed. After initiating processing of tracks in the MRU array 126 (at block 700), control proceeds to process Figure 6 The operation is continued until the number of tracks demoted by the destage scan task 130 is equal to the number of tracks in the MRU array 126 to be added to the cache list 200. Control then passes (at block 704) to Figure 8 , re-MRU is performed on each track in the MRU array 126.
[0041] use Figure 7 In the embodiment of the present invention, tracks added to the cache 116 are not immediately indicated to the MRU end 202, which would cause a delay in obtaining a lock on the cache list 200. Instead, tracks added to the cache 116 are indicated in the MRU array 136 and moved to the insertion point 400 in batches. i , i.e., re-MRU is performed while the lock is held for the cache list 200 to avoid lock contention by immediately moving the track to the MRU end 202 when the track is added to the cache 116.
[0042] Figure 8 An embodiment of operations performed by the cache manager 120 and / or the destage scan task 130 to re-MRU a track to an insertion point 400 in the cache list 200 is shown. i When processing a track (at block 800), a variable i is set to n for the first insertion point above the LRU end of cache list 200 (at block 802). For the first insertion point above the LRU end of cache list 200, a variable i is set to n (at block 804). i The track / entry in the cache list 200 pointed to will be inserted at point 400 i The timestamp is determined to be the last re-MRU timestamp 312. If (at block 806) the last access timestamp 308 of the track being processed is less than the insertion point 400 i The timestamp is then (at block 808) relative to the insertion point 400. i The entry 404 pointed to indicates the track being processed in the cache list 200. The track may be inserted at the insertion point 400 determined by i The entry 404 pointed to is above or below. For the track cache control block 300 being processed i, (at block 810) the last re-MRU timestamp 312 is set to the last access timestamp 308 of the track being processed, and the re-MRU flag 310 is reset to indicate that the track is not to be re-MRUed.
[0043] If (at block 806) the last access timestamp 308 of the track being processed is greater than the insertion point 400 i timestamp, then if (at block 812) i is equal to 1, i.e., pointing to the first insertion point 4001 at the MRU end 202, then (at block 814) the track is indicated above the first insertion point 4001 at the MRU end 202. From block 814, control passes to block 810 to update the last re-MRU timestamp 312 and the re-MRU flag. If i is not the first insertion point or 1, then (at block 816) i is decremented and control passes to block 804 to process the next insertion point 400 in the cache list 200 toward the MRU end 202. i-1 .
[0044] At blocks 808 and 814, when processing tracks in the processor array (e.g. Figure 7 ), when indicating a track relative to the insertion point, if the track is not indicated in cache list 200, a new indication for the track is made in cache list 200. Otherwise, if the track to be indicated in cache list 200 at blocks 808 and 814 is already in cache list 200, the indication of the track is moved to a position relative to insertion point 400. i The associated location.
[0045] pass Figure 8 In an embodiment, a track is added to the cache list 200 relative to the insertion point 400. i A position where the insertion point is 400 iThe track is added to the cache list 200 at a position toward the MRU end 202 based on its last access time, so that the track is added to a position relative to other tracks with similar last access times, so that it remains in the cache list 200 for a time comparable to the last access timestamps of the other tracks. This allows the tracks to be moved toward the MRU end 202 in batches, ensuring that the tracks are added to the cache list 200 at a position adjacent to temporally adjacent tracks with similar last access times. This improves cache hit rates because tracks are added to a position in the cache list 200 based on the length of time the track was last accessed, so a track that was accessed relatively longer ago is added to a position closer to the LRU end 204, while a track that was accessed relatively more recently is added to a position closer to the MRU end 202. This enables delayed adjustments to accessed tracks in the cache list 200 to allow tracks to be moved in batches toward the MRU end 202 so that tracks with similar last access times are demoted at the same time to maintain cache hit rates.
[0046] Fig. 9 4 shows the operations performed by the downstage scan task 130 and / or the cache manager 120 for adjusting an insertion point 400 immediately after adding a track above the insertion point k. k . At the start (at block 900) of adding a track to the insertion point 400 k When adjusting immediately after the above, (at block 902) the insertion point 400 n to 400 k Each of the above moves one entry upward toward the MRU end 202, and for each moved insertion point 400 i , entry 404 and cache control block 406 are adjusted to point to the new entry and cache control block for the new track.
[0047] Fig.10 An embodiment showing operations performed by the destage scan task 130 and / or the cache manager 120 for adjusting an insertion point 400 immediately after adding a track below the insertion point k k (at block 1000) upon starting at insertion point 400 k When adjusting immediately after adding the track below, (at block 1002) each insertion point 400 n to 400 k+1The entry is moved upward toward the MRU end 202 by one, and, for each insertion point moved, the entry 404 and cache control block 406 are adjusted to point to the new entry and cache control block 300 for the newly added track. i .
[0048] Fig.11 An embodiment of operations performed by the downstage scan task 130 and / or the cache manager 120 is shown for Figure 8 Adjusting one or more insertion points after moving multiple tracks to the insertion points. When starting (at block 1100) to adjust the insertion points after moving multiple tracks, adjusting one or more insertion points (at block 1102) to ensure that there are only N entries, such as a fixed number of entries, between each pair of insertion points, between the first insertion point 4001 to the MRU end 202 of the cache list 200, between the LRU end 204 and the last insertion point 400 n There are N entries between them. The insertion point 400 can be moved upward toward the MRU end 202 i to make adjustments.
[0049] use Fig.11 In an embodiment, the delay insertion point 400 i until multiple tracks are moved to the insertion point, i.e., re-MRU, so that the adjustment of the insertion point can be batch processed. Fig.11 The insertion point adjustment operation is optimized and performance is improved by moving multiple items at once for batch processing.
[0050] The present invention may be implemented as a system, method and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions thereon, the computer-readable program instructions being used to cause a processor to perform various aspects of the present invention.
[0051] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory, and a plurality of other storage devices.
[0052] (EPROM or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as punch card or raised structure in groove with instructions stored thereon, and any suitable combination of the above. Computer readable storage medium as used herein is not to be interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagated through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0053] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0054] The computer program instructions for performing the operation of the present invention may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state 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 Java, Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of 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., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.
[0055] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.
[0056] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0057] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are 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 implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0058] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0059] The host 100 and the storage system 102 are included Figure 1 The computing components of can be implemented in one or more computer systems, such as Figure 8Computer system 802 is shown. Computer system / server 802 may be described in the general context of computer system executable instructions, such as program modules, executed by the computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform specific tasks or implement specific abstract data types. Computer system / server 802 may be practiced in a distributed cloud computing environment, where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in local and remote computer system storage media including memory storage devices.
[0060] like Figure 8 As shown, computer system / server 802 is shown in the form of a general-purpose computing device. The components of computer system / server 802 may include, but are not limited to, one or more processors or processing units 804, system memory 806, and a bus 808 that couples various system components including system memory 806 to processor 804. Bus 808 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example and not limitation, these architectures include an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0061] Computer system / server 802 typically includes a variety of computer system readable media. Such media can be any available media that can be accessed by computer system / server 802, and it includes volatile and nonvolatile media, removable and non-removable media.
[0062] System memory 806 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 810 and / or cache memory 812. Computer system / server 802 may also include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 813 may be provided for reading from and writing to a non-removable, non-volatile magnetic medium (not shown, and commonly referred to as a "hard drive"). Although not shown, a disk drive for reading from and writing to a removable, non-volatile disk (e.g., a "floppy disk") may be provided, as well as an optical drive for reading from or writing to a removable, non-volatile optical disk such as a CD-ROM, DVD-ROM or other optical media. In such an instance, each may be connected to bus 808 via one or more data media interfaces. As will be further described and described below, memory 806 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of an embodiment of the present invention.
[0063] By way of example and not limitation, a program / utility 814 having a set (at least one) of program modules 816, as well as an operating system, one or more application programs, other program modules, and program data, may be stored in memory 806. Each of the operating system, one or more application programs, other program modules, and program data, or some combination thereof, may include an implementation of a network environment. The components of computer 802 may be implemented as program modules 816, which generally perform the functions and / or methods of embodiments of the present invention as described herein. Figure 1 The systems may be implemented in one or more computer systems 802, wherein if they are implemented in multiple computer systems 802, the computer systems may communicate via a network.
[0064] The computer system / server 802 may also communicate with one or more external devices 818, such as a keyboard, a pointing device, a display 820, etc.; one or more devices that enable a user to interact with the computer system / server 802; and / or any device that enables the computer system / server 802 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may occur via an input / output (I / O) interface 822. In addition, the computer system / server 802 may communicate with one or more networks such as a local area network (LAN), a general wide area network (WAN), and / or a public network (e.g., the Internet) via a network adapter 824. As depicted, the network adapter 824 communicates with other components of the computer system / server 802 via a bus 808. It should be understood that, although not shown, other hardware and / or software components may be used in conjunction with the computer system / server 802. Examples include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
[0065] The terms "embodiment," "embodiments," "the embodiment," "these embodiments," "one or more embodiments," "some embodiments," and "one embodiment" mean "one or more (but not all) embodiments of the invention," unless expressly stated otherwise.
[0066] The terms "including," "comprising," "having" and variations thereof mean "including but not limited to," unless expressly stated otherwise.
[0067] Unless expressly stated otherwise, the enumerated listing of items does not imply that any or all of the items are mutually exclusive.
[0068] The terms "a", "an" and "the" mean "one or more" unless expressly stated otherwise.
[0069] Unless expressly stated otherwise, devices that are in communication with each other need not be in continuous communication with each other. In addition, devices that are in communication with each other may communicate directly or indirectly through one or more intermediaries.
[0070] The description of an embodiment with several components in communication with each other does not imply that all such components are required. Rather, various optional components are described to illustrate various possible embodiments of the invention.
[0071] When a single device or article is described herein, it will be readily apparent that more than one device / article (whether or not they cooperate) may be used in place of a single device / article. Similarly, where more than one device or product is described herein (whether or not they cooperate), it will be readily apparent that a single device / product may be used in place of more than one device or product, or a different number of devices / products may be used in place of the number of devices or procedures shown. The functions and / or features of a device may alternatively be embodied by one or more other devices that are not explicitly described as having such functions / features. Therefore, other embodiments of the present invention need not include the device itself.
[0072] For the purpose of illustration and description, the above description of various embodiments of the present invention has been given. It is not exhaustive, nor is it intended to limit the present invention to the precise form disclosed. In accordance with the above teachings, many modifications and variations are possible. The scope of the present invention is not limited by this detailed description, but by the appended claims. The above description, examples and data provide a complete description of the manufacture and use of the composition of the present invention. Since many embodiments of the present invention can be made without departing from the spirit and scope of the present invention, the present invention lies in the appended claims.
Claims
1. A method for managing tracks in storage in a cache, comprising: maintaining a plurality of insertion points into a cache list for caching, the cache list having a least recently used (LRU) end and a most recently used (MRU) end, wherein each of the insertion points identifies a track in the cache list; determining, based on the timestamps of the insertion points and the timestamps of the processed tracks, an insertion point of the processed track among the insertion points at which the processed track is to be located; and The processed track is indicated at a position in the cache list relative to the determined insertion point.
2. The method according to claim 1, wherein: Each track includes a re-MRU flag indicating whether the track should be moved to the MRU end of the cache list, wherein the method further comprises: In response to a track being accessed while indicated in the cache list, setting a re-MRU flag indicating moving the track to the MRU end; and determining whether a re-MRU flag of the processed track is indicated as being moved to the MRU end of the cache list, wherein determining the insertion point and indicating the processed track at the position of the cache list is performed in response to determining that the re-MRU flag of the processed track is indicated as being moved to the MRU end.
3. The method according to claim 1, wherein: The timestamps of the insertion points include an insertion point timestamp associated with each insertion point, wherein determining the insertion points includes: Determine a first insertion point, the first insertion point starting from the LRU end and having an insertion point timestamp greater than a last access timestamp of the processed track, the last access timestamp being the time when the processed track was last accessed when indicated in the cache list, wherein the determined insertion points include the determined first insertion point.
4. The method according to claim 1, wherein: maintaining a last re-MRU timestamp for each track indicated in the cache list, wherein the method further comprises: setting the determined insertion point to point to the processed track indicated in the cache list at a position relative to the determined insertion point; and A last re-MRU timestamp of the processed track is set to a last access timestamp of the processed track, wherein the insertion point timestamp of the determined insertion point comprises the last re-MRU timestamp of the processed track.
5. The method according to claim 1, wherein: Further including: A plurality of said insertion points pointing to tracks in said cache list are adjusted so as to maintain a fixed number of tracks between said each insertion point.
6. The method according to claim 1, wherein: indicating that the position in the cache list of the processed track is immediately below the track indicated by the determined insertion point towards the LRU end, wherein the method further comprises: Insertion points from an insertion point closest to the LRU end to an insertion point immediately below the determined insertion point are adjusted to point to a track above the track pointed to by the insertion point to adjust toward the MRU end.
7. The method according to claim 1, wherein: indicating that the position in the cache list of the processed track is immediately above the track indicated by the determined insertion point towards the MRU end, wherein the method further comprises: An insertion point from an insertion point closest to the LRU end to the determined insertion point is adjusted to point to a track above the track pointed to by the insertion point to adjust toward the MRU end.
8. The method according to claim 1, wherein: The processed track is at the LRU end of the cache list.
9. A computer program product for managing tracks in storage in a cache, the computer program product comprising a computer readable storage medium having computer readable program code thereon for performing operations when executed, the operations comprising the steps of any of the methods of claims 1-8.
10. A system for managing tracks in storage in a cache, comprising: processor; Cache; as well as A computer readable storage medium having computer readable program code therein for performing operations when executed by a processor, the operations comprising the steps in any one of the methods of claims 1-8.
11. An apparatus for managing tracks in storage in a cache, comprising modules configured to perform the steps of any one of the methods of claims 1-8.
Citation Information
Patent Citations
Using cache lists for multiple processors to cache and demote tracks in a storage system
US20170052897A1
Using cache lists for processors to determine tracks to demote from a cache
US20170052898A1
Assigning cache control blocks and cache lists to multiple processors to cache and demote tracks in a storage system
US20170052902A1
Distributing a plurality of tracks to add to cache to lists assigned to processors
US20170052903A1
Method and apparatus for providing efficient management of least recently used (LRU) algorithm insertion points corresponding to defined times-in-cache
US6842826B1
