WO2013189186A1 - 非易失性存储设备的缓存管理方法及装置 - Google Patents
非易失性存储设备的缓存管理方法及装置 Download PDFInfo
- Publication number
- WO2013189186A1 WO2013189186A1 PCT/CN2013/071688 CN2013071688W WO2013189186A1 WO 2013189186 A1 WO2013189186 A1 WO 2013189186A1 CN 2013071688 W CN2013071688 W CN 2013071688W WO 2013189186 A1 WO2013189186 A1 WO 2013189186A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- page
- pool
- clean
- sub
- capacity
- Prior art date
Links
- 238000003860 storage Methods 0.000 title claims abstract description 95
- 238000007726 management method Methods 0.000 title claims abstract description 79
- 230000003139 buffering effect Effects 0.000 title abstract 3
- 238000000034 method Methods 0.000 claims abstract description 48
- 238000012423 maintenance Methods 0.000 claims description 11
- 238000013508 migration Methods 0.000 claims description 5
- 230000005012 migration Effects 0.000 claims description 5
- 238000012545 processing Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 239000004065 semiconductor Substances 0.000 description 3
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012432 intermediate storage Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0616—Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/12—Replacement control
- G06F12/121—Replacement control using replacement algorithms
- G06F12/123—Replacement control using replacement algorithms with age lists, e.g. queue, most recently used [MRU] list or least recently used [LRU] list
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0238—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
- G06F12/0246—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0866—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
- G06F12/0871—Allocation or management of cache space
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/12—Replacement control
- G06F12/121—Replacement control using replacement algorithms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0656—Data buffering arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/21—Employing a record carrier using a specific recording technology
- G06F2212/214—Solid state disk
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/22—Employing cache memory using specific memory technology
- G06F2212/222—Non-volatile memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/50—Control mechanisms for virtual memory, cache or TLB
- G06F2212/502—Control mechanisms for virtual memory, cache or TLB using adaptive policy
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/60—Details of cache memory
- G06F2212/604—Details relating to cache allocation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/72—Details relating to flash memory management
- G06F2212/7204—Capacity control, e.g. partitioning, end-of-life degradation
Definitions
- Embodiments of the present invention relate to the field of data processing technologies, and in particular, to a cache management method and apparatus for a nonvolatile storage device.
- Embodiments of the present invention provide a cache management method and apparatus for a non-volatile storage device, which avoid frequent replacement of dirty pages, improve the working life of the storage device, reduce implementation cost, and improve execution efficiency.
- a cache management method for a non-volatile storage device is applied to a cache system based on a non-volatile storage device, the cache system comprising: a cache, a non-volatile storage device, and a cache management device; Saving page data read from the non-volatile storage device and page data to be written into the non-volatile storage device, including a clean page sub-pool and a dirty page sub-pool; the non-volatile The storage device is configured to save all page data; the cache management device manages the cache by using the following information, including clean subpool capacity threshold, page information of a clean page subpool, clean page history list, dirty page subpool Page information and a dirty page history list, wherein the page information includes a subpool capacity, and the clean page history list is used to store identification information of a historical clean page that has been recently replaced by a cache, the dirty page history list is used for Storing identification information of a historical dirty page that has been recently replaced by the cache;
- the method includes:
- the clean sub-pool capacity threshold is increased by a first adjustment value
- the clean sub-pool capacity threshold is decreased by a second adjustment value.
- a cache management device for a non-volatile storage device is applied to a cache system based on a non-volatile storage device, the cache system comprising: a cache, a non-volatile storage device, and a cache tube
- the cache is configured to save page data read from the non-volatile storage device and page data to be written into the non-volatile storage device, including a clean page pool and a dirty page
- the non-volatile storage device is configured to save all page data;
- the cache management device manages the cache by using the following information, where the information includes a clean sub-pool capacity threshold, a page page of a clean page sub-pool, and a clean
- the dirty page history list is used to store identification information of a historical dirty page that has
- the device includes:
- a determining unit configured to determine, when the page to be accessed is not in the clean page subpool, and not in the dirty page subpool, determine a size relationship between a sum of the capacity of the clean page subpool and the dirty page subpool and a cache capacity ;
- the determining unit is further configured to: determine, when the sum of the capacity of the clean page subpool and the dirty page subpool is greater than or equal to the cache capacity, whether the identifier information of the to-be-accessed page is in a clean page history list. Or in the dirty page history list;
- an adjusting unit configured to: when the determining unit determines that the identifier information of the to-be-accessed page is in the dry page history list, increase the clean sub-pool capacity threshold by a first adjustment value;
- the adjusting unit is further configured to: when the determining unit determines that the identification information of the to-be-accessed page is in the dirty page history list, reduce the clean sub-pool capacity threshold by a second adjustment value.
- the method and device for adjusting the cache of the non-volatile storage device adjusts the capacity of the clean sub-pool according to the write operation delay and the read operation delay when the clean sub-pool capacity exceeds the capacity threshold. , to achieve control of the clean sub-pool and dirty page sub-pool capacity. Due to the read-write asymmetry of the non-volatile storage device, the capacity of the dirty page pool can be preferentially increased when the capacity of the clean sub-pool and the dirty page sub-pool is controlled, thereby avoiding frequent replacement of dirty pages and improving storage. Equipment working life. Moreover, the calculation method of the adjustment value is simple, the related parameters are easily acquired, the implementation cost is reduced, and the execution efficiency is improved.
- FIG. 1 is a block diagram showing the composition of a cache system based on a nonvolatile storage device in Embodiment 1 of the present invention
- FIG. 2 is a flowchart of a method for adjusting a cache based on a non-volatile storage device according to Embodiment 1 of the present invention
- FIG. 3 is a flowchart of a method for adjusting a cache based on a non-volatile storage device according to Embodiment 2 of the present invention
- FIG. 4 is a flowchart of another method for buffer adjustment based on a non-volatile storage device according to Embodiment 2 of the present invention.
- FIG. 5 is a flowchart of another method for buffer adjustment based on a non-volatile storage device according to Embodiment 2 of the present invention.
- FIG. 6 is a block diagram showing the composition of a cache adjusting device based on a nonvolatile storage device in Embodiment 3 of the present invention.
- FIG. 7 is a block diagram showing the composition of another cache adjusting device based on a nonvolatile storage device in Embodiment 3 of the present invention.
- FIG. 8 is a block diagram showing the composition of another cache adjusting device based on a nonvolatile storage device in Embodiment 3 of the present invention.
- FIG. 9 is a block diagram showing the composition of another cache adjusting device based on a nonvolatile storage device in Embodiment 3 of the present invention.
- FIG. 10 is a structural block diagram of another cache adjusting apparatus based on a nonvolatile storage device in Embodiment 3 of the present invention.
- FIG. 11 is a block diagram showing the composition of another cache adjusting device based on a nonvolatile storage device in Embodiment 3 of the present invention.
- the embodiment of the present invention provides a cache management method for a non-volatile storage device, which can be applied to a cache system based on a non-volatile storage device.
- the cache system includes: a cache, a non-volatile Storage device and cache management device.
- the cache may be configured to save page data read from the non-volatile storage device and page data to be written into the non-volatile storage device, including a clean page sub-pool and a dirty page sub-pool .
- the clean page subpool is a collection of unmodified pages in the cache
- the dirty page subpool is a collection of pages that have been modified in the cache.
- the clean page pool and the dirty page pool may be implemented by a combination of one or more of a data structure such as a linked list or an array a r ray.
- the non-volatile storage device such as a flash memory, a PCM (Ph s e Change Memory) storage device, can be used to save all page data.
- PCM Ph s e Change Memory
- the cache management device may manage the cache by using the following information: the clean subpool capacity threshold, the page information of the clean page subpool, the clean page history list, the page information of the dirty page subpool, and the dirty page history.
- a list where the page information includes a sub-pool capacity, the clean page history list is used to store identification information of a historical clean page that has been recently replaced by a cache, and the dirty page history list is used to store a cache that has been recently replaced. Identification information of historical dirty pages.
- a clean page management unit and a dirty page management unit can be set in the cache management device.
- the name of the list is a Chinese interpretation corresponding to the 1 i s t-word in the protocol and standard in the technical field of the embodiment of the present invention.
- the implementation of the list 1 i s t is various, and can be implemented by a data structure such as l nked l i s t or a r ray, which is not limited by the embodiment of the present invention.
- these settings specifically include: The sum of the capacity of the clean page sub-pool and the dirty page sub-pool does not exceed the cached physical capacity. The sum of the capacity of the clean page subpool and the capacity of the clean page history list does not exceed the physical capacity of the cache. In addition, the sum of the page information of the clean page subpool, the clean page history list, the page information of the dirty page subpool, and the dirty page history list does not exceed twice the physical capacity of the cache. Both the clean page history list and the dirty page history list are LRU (Least Recently Used) lists.
- Clean page subpools and dirty page subpools use separate page replacement strategies, such as LRU, LFU (least frequently used, least frequently used page replacement algorithm), etc., and the format and maintenance of their page information matches their chosen page replacement strategy. .
- LRU low-reliable resource unit
- LFU least frequently used, least frequently used page replacement algorithm
- the format and maintenance of their page information matches their chosen page replacement strategy. .
- the foregoing setting is only a setting method for implementing a cache system based on a non-volatile storage device, and the specific setting method may be selected according to actual conditions, and is not limited thereto.
- the cache management method of the non-volatile storage device provided by the embodiment of the present invention, as shown in FIG. 2, specifically includes:
- the cache management device determines a size relationship between the sum of the clean page sub-pool and the dirty page sub-pool capacity and the cache capacity. .
- the cache management device determines whether the identifier information of the to-be-viewed page is in a clean page history list or Dirty page history list.
- the identification information of the to-be-accessed page may be set to the information with the identification function, such as the ID number, which is not enumerated herein.
- the cache management device increases the clean sub-pool capacity threshold by a first adjustment value.
- the first adjustment value may be set to a larger value between a quotient value obtained by dividing the read operation delay by the write operation delay and 1. Moreover, the clean page sub-pool capacity threshold cannot be adjusted beyond the cache capacity.
- the read operation delay and the write operation delay are fixed for the same non-volatile storage device. It does not change, and there may be differences for different non-volatile storage devices.
- the cache management device reduces the clean sub-pool capacity threshold by a second adjustment value.
- the second adjustment value may be set to a larger value between the quotient value obtained by dividing the write operation delay by the read operation delay and 1. Moreover, the dirty page sub-pool capacity threshold cannot be adjusted beyond the cache capacity.
- the cache adjustment method of the non-volatile storage device adjusts the capacity of the clean sub-pool according to the write operation delay and the read operation delay when the clean sub-pool capacity exceeds the capacity threshold. Control of the capacity of clean subpools and dirty page subpools. Due to the read-write asymmetry of the non-volatile storage device, the capacity of the dirty page pool can be preferentially increased when the capacity of the clean sub-pool and the dirty page sub-pool is controlled, thereby avoiding frequent replacement of dirty pages and improving storage. Equipment working life. Moreover, the calculation method of the adjustment value is simple, the related parameters are easily acquired, the implementation cost is reduced, and the execution efficiency is improved.
- the embodiment of the invention provides a cache adjustment method for a non-volatile storage device, which can also be applied to a cache system based on a non-volatile storage device as shown in FIG. 1 , and a method for setting the cache system is also The same as in Embodiment 1, as shown in FIG. 2, the method specifically includes:
- the cache management device determines the size between the sum of the clean page sub-pool and the dirty page sub-pool capacity and the cache capacity. relationship.
- the sum of the capacity of the clean page subpool and the dirty page subpool is greater than or equal to the cache capacity, performing step 202; when the sum of the clean page subpool and the dirty page subpool capacity is less than When the cache capacity is described, step 2 09 is performed.
- the cache management device selects, from the clean page subpool and the dirty page subpool, a subpool for selecting a page to be replaced.
- the implementation method of the step 022 is specifically as follows. As shown in FIG. 3, the method includes:
- the cache management device determines a size relationship between the clean page subpool capacity and the clean subpool capacity threshold. When the capacity of the clean page sub-pool is larger than the capacity of the clean sub-pool If the value of the clean page subpool is less than the clean subpool capacity threshold, step 2023 is performed; when the clean page subpool capacity is equal to the clean subpool capacity threshold Then, step 2024 is performed.
- the cache management device selects a clean page subpool as a subpool for selecting a page to be replaced.
- the cache management device selects a dirty page subpool as a subpool for selecting a page to be replaced.
- the cache management device determines whether the condition is satisfied. If the condition is that the to-be-established, the step 2022 is performed; otherwise, the step 2023 is performed.
- the cache management device selects a page to be replaced from the selected subpools according to the page replacement policy corresponding to the selected subpool.
- the page replacement policy corresponding to the clean page sub-pool and the dirty page sub-pool may be LRU, ACR, etc., and the page replacement policies corresponding to the clean page sub-pool and the dirty page sub-pool may be set to be the same, or may be set to be different.
- the invention is not limited herein.
- the method for selecting a page to be replaced according to the set page replacement policy is a technique well known to those skilled in the art, and the embodiment of the present invention is not limited herein.
- the cache management device maintains information currently required by the page replacement policy corresponding to the selected subpool.
- the information currently required by the page replacement policy differs according to the page replacement policy.
- the information currently required to maintain the page replacement policy is a technique well known to those skilled in the art, and the embodiments of the present invention are not described in detail herein.
- the cache management device migrates the identifier information of the page to be replaced to the most recently used location of the history list corresponding to the selected subpool.
- the step 205 is specifically implemented as follows, and includes:
- the cache management device migrates the identification information of the page to be replaced to the most recently used location of the clean page history list.
- the cache management device migrates the identification information of the page to be replaced to the most recently used location of the dirty page history list.
- the cache management device determines whether the identifier information of the to-be-accessed page is in a clean page history list or in a dirty page history list. When it is determined that the identification information of the to-be-accessed page is in the clean page history list, step 207 is performed; when the identification information of the to-be-accessed page is in the dirty page history list, step 208 is performed.
- the cache management device adds a clean subpool capacity threshold to a first adjustment value, where the first adjustment value is a larger value between a quotient value obtained by dividing a read operation delay by a write operation delay and 1 And step 210 is performed.
- the cache management device reduces the clean subpool capacity threshold by a second adjustment value, where the second adjustment value is a comparison between a write operation delay divided by a read operation delay and a quotient value between 1 and 1. Large value, and step 210 is performed.
- the cache management device reads the to-be-accessed page from the non-volatile storage device, and performs step 210.
- the cache management device determines an operation type corresponding to an operation of requesting the to-be-accessed page. When it is determined that the operation type is a read operation, step 211 is performed; when it is determined that the operation type is a write operation, step 215 is performed.
- the cache management device reads the to-be-accessed page into the clean page sub-pool, and maintains information currently required by the page replacement policy corresponding to the clean page sub-pool.
- the cache management device determines whether a sum of a clean page subpool capacity and a clean page history list capacity is greater than the cache capacity. If it is determined that the sum of the clean page subpool capacity and the clean page history list capacity is greater than the cache capacity, step 213 is performed; if it is determined that the sum of the clean page subpool capacity and the clean page history list capacity is less than Or equal to the cache capacity, step 214 is performed.
- the cache management device removes page identification information of a least recently used location of the clean page history list, and ends the cache management process.
- the cache management device keeps the clean page history list unchanged, and ends the cache management. Process.
- the cache management device reads the to-be-accessed page into the dirty page sub-pool, and maintains information currently required by the page replacement policy corresponding to the dirty page sub-pool.
- the cache management device determines whether the sum of the clean page subpool capacity, the dirty page subpool capacity, the clean page history list capacity, and the dirty page history list capacity is greater than twice the cache capacity. If it is determined that the sum of the clean page subpool capacity, the dirty page subpool capacity, the clean page history list capacity, and the dirty page history list capacity is greater than twice the cache capacity, perform step 2 1 7; if the clean page subpool capacity is determined The sum of the dirty page pool capacity, the clean page history list capacity, and the dirty page history list capacity is less than or equal to twice the buffer capacity, and step 2 18 is performed.
- the cache management device removes the page identification information of the least recently used location of the dirty page history list, and ends the cache management process.
- the cache management device keeps the dirty page history list unchanged, and ends the cache management process.
- the control of the clean sub-pool and the dirty page sub-pool capacity is realized.
- the capacity of the dirty page sub-pool can be preferentially increased when the capacity of the clean sub-pool and the dirty page sub-pool is controlled, thereby avoiding frequent replacement of dirty pages and improving storage. Equipment working life.
- the calculation method of the adjustment value is simple, the related parameters are easily acquired, the implementation cost is reduced, and the execution efficiency is improved.
- the capacity of the history list is also controlled, which reduces the information that the cache management device needs to manage, and ensures the performance of the cache management device.
- the process of requesting access to the page by the processor may be divided into two partial processes, where one part of the process is to read the to-be-visited page directly from the cache when the to-be-accessed page is in the cache; When the page to be accessed is not in the cache, a page missing process is required. The above steps 2 01 to 2 1 8 belong to the page missing process.
- the cache management process corresponding to the process of requesting access to the page by the processor is as shown in FIG. 4, and specifically includes:
- the cache management apparatus determines whether the to-be-accessed page is in a clean page subpool. If it is determined that the to-be-accessed page is in a clean page sub-pool, step 302 is performed; otherwise, step 305 is performed.
- the cache management device determines an operation type corresponding to an operation of requesting the to-be-accessed page. When it is determined that the operation type is a read operation, step 303 is performed; when it is determined that the operation type is a write operation, step 304 is performed.
- the cache management device maintains information currently required by the page replacement policy corresponding to the clean page subpool.
- the cache management device migrates the to-be-accessed page to a dirty page sub-pool, and maintains information currently required by the page replacement policy corresponding to the clean page sub-pool and page replacement corresponding to the dirty page sub-pool The information currently required by the policy and ends the cache management process.
- the cache management apparatus determines whether the to-be-accessed page is in a dirty page subpool. If it is determined that the to-be-accessed page is in the dirty page subpool, step 306 is performed; otherwise, step 307 is performed.
- the cache management device maintains information currently required by the page replacement policy corresponding to the dirty page subpool, and ends the cache management process.
- steps 301 to 307 implement a cache management process corresponding to the process of the processor requesting access to the page.
- the cache management method of the non-volatile storage device adjusts the capacity of the clean sub-pool according to the write operation delay and the read operation delay when the clean sub-pool capacity exceeds the capacity threshold. Control of the capacity of clean subpools and dirty page subpools. Due to the read-write asymmetry of the non-volatile storage device, the capacity of the dirty page pool can be preferentially increased when the capacity of the clean sub-pool and the dirty page sub-pool is controlled, thereby avoiding frequent replacement of dirty pages and improving storage. Assume Preparation working life.
- the calculation method of the adjustment value is simple, the related parameters are easily acquired, the implementation cost is reduced, and the execution efficiency is improved.
- the capacity of the history list is also controlled, which reduces the information that the cache management device needs to manage, and ensures the performance of the cache management device.
- the embodiment of the invention provides a cache management device for a non-volatile storage device. As shown in FIG. 6, the device includes: a determining unit 41 and an adjusting unit 42.
- the determining unit 41 is configured to determine, when the page to be accessed is not in the clean page subpool, and not in the dirty page subpool, determine the size between the sum of the clean page subpool and the dirty page subpool capacity and the cache capacity relationship.
- the determining unit 41 is further configured to: when determining that the sum of the capacity of the clean page subpool and the dirty page subpool is greater than or equal to the buffer capacity, determining that the identifier information of the to-be-accessed page is the adjusting unit 42, When the determining unit 41 determines that the identification information of the to-be-accessed page is in the clean page history list, the clean sub-pool capacity threshold is increased by a first adjustment value, and the first adjustment value is a read operation delay. Divided by the larger value between the quotient value obtained by the write operation delay and 1.
- the adjusting unit 42 is further configured to: when the determining unit 41 determines that the identifier information of the page to be accessed is in the dirty page history list, reduce the clean subpool capacity threshold by a second adjustment value,
- the second adjustment value is the larger of the quotient between the write operation delay divided by the read operation delay and one.
- the apparatus further includes: a selecting unit 43, a maintenance unit 44, and a migration unit 45.
- the selecting unit 43 is configured to determine, at the determining unit 41, that the sum of the clean page subpool and the dirty page subpool capacity is greater than or equal to the cache capacity, from the clean page subpool and the dirty page Select a subpool in the pool to select the page to be replaced;
- the selecting unit 43 is configured to select a page to be replaced from the selected subpool according to the page replacement policy corresponding to the selected subpool;
- the maintenance unit 44 is configured to maintain information currently required by the page replacement policy corresponding to the sub-pool selected by the selecting unit 44;
- the migration unit 45 is configured to migrate the identification information of the page to be replaced to the most recently used location of the history list corresponding to the selected subpool.
- the selecting unit 43 further includes: a determining module 431 and a subpool selecting module 432.
- the determining module 431 is configured to determine a size relationship between the clean page subpool capacity and the clean subpool capacity threshold.
- the sub-pool selection module 432 is configured to select a clean page sub-pool as the sub-pool for selecting the page to be replaced when the determining module 431 determines that the clean page sub-pool capacity is greater than the clean sub-pool capacity threshold.
- the selecting module 432 is configured to: when the determining module 431 determines that the clean page subpool capacity is less than the clean subpool capacity threshold, select the dirty page subpool as the subpool for selecting the page to be replaced.
- the determining module 431 is configured to determine, when the clean page subpool capacity is equal to the clean subpool capacity threshold, whether the condition is that the to-be-accessed page is in the clean page history list. And the dirty page subpool capacity is greater than zero.
- the subpool selection module 432 is configured to select a dirty page subpool as a subpool for selecting a page to be replaced when the determining module 431 determines that the condition is met.
- the subpool selection module 432 is configured to select a clean page subpool as a subpool for selecting a page to be replaced when the determining module 431 determines that the condition is not established.
- the device further includes: a reading unit 46.
- the reading unit 46 is configured to read from the non-volatile storage device when the determining unit 41 determines that the sum of the capacity of the clean page subpool and the dirty page subpool is less than the buffer capacity. Tell the access page.
- the determining unit 41 is further configured to determine an operation type corresponding to an operation for requesting the page to be accessed.
- the reading unit 46 is configured to read the to-be-accessed page into the clean page sub-pool when the determining unit 41 determines that the operation type is a read operation.
- the maintenance unit 44 is configured to maintain information required by the page replacement policy corresponding to the clean page subpool.
- the reading unit 46 is configured to: when the determining unit determines that the operation type is a write operation, the page to be accessed is read into the dirty page subpool.
- the maintenance unit is configured to maintain information currently required by the page replacement policy corresponding to the dirty page subpool.
- the device further includes: a first removing unit 47.
- the determining unit 41 is configured to determine whether a sum of a clean page subpool capacity and a clean page history list capacity is greater than the cache capacity.
- the first removing unit 47 is configured to remove the least recent use of the clean page history list when the determining unit 41 determines that the sum of the clean page subpool capacity and the clean page history list capacity is greater than the cache capacity.
- the page identification information for the location is configured to remove the least recent use of the clean page history list when the determining unit 41 determines that the sum of the clean page subpool capacity and the clean page history list capacity is greater than the cache capacity.
- the first removing unit 47 is further configured to: when the determining unit 41 determines that the sum of the clean page subpool capacity and the clean page history list capacity is less than or equal to the cache capacity, maintain a clean page history list. constant.
- the device further includes: a second removing unit 48.
- the determining unit 41 is configured to determine whether the sum of the clean page subpool capacity, the dirty page subpool capacity, the clean page history list capacity, and the dirty page history list capacity is greater than twice the cache capacity.
- a second removing unit 48 configured to: when the determining unit 41 determines that the sum of the clean page subpool capacity, the dirty page subpool capacity, the clean page history list capacity, and the dirty page history list capacity is greater than twice the buffer capacity , remove the page identification letter of the least recently used location of the dirty page history list Interest.
- the second removing unit 48 is configured to determine, by the determining unit 41, that the sum of the clean page pool capacity, the dirty page subpool capacity, the clean page history list capacity, and the dirty page history list capacity is less than or equal to the cache. When the capacity is doubled, keep the dirty page history list unchanged.
- the determining unit 4 1 is configured to determine whether the to-be-accessed page is in a clean page sub-pool;
- the determining unit 4 1 is further configured to: when determining that the to-be-accessed page is not in the clean page sub-pool, determine whether the to-be-accessed page is in a dirty page sub-pool;
- the maintenance unit 44 is configured to: when the determining unit 41 determines that the to-be-accessed page is in the dirty page sub-pool, maintain the information currently required by the page replacement policy corresponding to the dirty page sub-pool;
- the determining unit 4 1 is configured to determine, when the page to be accessed is not in the dirty page subpool, the size relationship between the sum of the capacity of the clean page subpool and the dirty page subpool and the cache capacity.
- the determining unit 4 1 is further configured to: when determining that the to-be-accessed page is in a clean page sub-pool, obtain an operation type corresponding to an operation of requesting the to-be-accessed page.
- the maintenance unit 44 is further configured to: when the determining unit 41 determines that the operation type is a read operation, maintain information currently required by the page replacement policy corresponding to the clean page subpool.
- the migration unit 45 is configured to migrate the to-be-accessed page into the dirty page sub-pool when the determining unit 41 determines that the operation type is a write operation.
- the maintenance unit 44 is further configured to maintain information currently required by the page replacement policy corresponding to the clean page subpool and information currently required by the page replacement policy corresponding to the dirty page subpool.
- the cache management device of the non-volatile storage device adjusts the capacity of the clean sub-pool according to the write operation delay and the read operation delay when the clean sub-pool capacity exceeds the capacity threshold. Control of the capacity of clean subpools and dirty page subpools. Due to the read-write asymmetry of the non-volatile storage device, the capacity of the dirty page pool can be preferentially increased when the capacity of the clean sub-pool and the dirty page sub-pool is controlled, thereby avoiding frequent replacement of dirty pages and improving storage. Equipment working life. Moreover, it is only necessary to adjust the capacity of the clean sub-pool according to the write operation delay and the read operation delay. The calculation method of the adjustment value is simple, the related parameters are easily acquired, the implementation cost is reduced, and the execution efficiency is improved.
- the capacity of the history list is also controlled, which reduces the information that the cache management device needs to manage, and ensures the performance of the cache management device.
- the present invention can be implemented by means of software plus necessary general hardware, and of course, by hardware, but in many cases, the former is a better implementation. .
- the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer.
- a hard disk or optical disk or the like includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Memory System Of A Hierarchy Structure (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明实施例公开了一种非易失性存储设备的缓存管理方法及装置,涉及数据处理技术领域,避免脏页频繁替换,提高存储设备工作寿命,降低实现成本,提高执行效率。本发明实施例包括:判断所述干净页子池与所述脏页子池容量之和与缓存容量之间的大小关系;当所述干净页子池与所述脏页子池容量之和大于或者等于所述缓存容量时,判断所述待访问页面的标识信息是否在干净页历史列表或者在脏页历史列表中;当确定所述待访问页面的标识信息在干净页历史列表中时,将干净子池容量阈值增加一个第一调整值;当所述待访问页面的标识信息在脏页历史列表中时,将所述干净子池容量阈值减少一个第二调整值。本发明实施例主要应用于非易失性存储设备的缓存管理过程中。
Description
非易失性存储设备的緩存管理方法及装置 本申请要求于 2 01 2 年 06 月 2 0 日提交中国专利局、 申请号为 2 01 2 1 02 05 36 0. 6 , 发明名称为 "非易失性存储设备的緩存管理方法 及装置" 的中国专利申请的优先权, 其全部内容通过引用结合在本 申请中。
技术领域
本发明实施例涉及数据处理技术领域,尤其涉及一种非易失性存储设 备的緩存管理方法及装置。
背景技术
随着半导体技术的高速发展, 使用磁性介质记录信息的存储设备(如 硬盘等) 的访问带宽的增长已远远跟不上处理器处理速度的增长。 同时, 基于半导体技术的各种非易失性存储技术, 如闪存等存储设备高速发展, 容量不断增大, 成本不断降低, 性价比不断提高。 在这样的发展趋势下, 基于半导体的非易失性存储设备正逐渐取代基于磁性介质的传统存储设 备, 成为主要存储设备。 目前的非易失性存储设备都具有读写不对称的特 性, 实际上, 使用非易失性存储设备时, 读操作的延时远小于写操作的延 时。
虽然非易失性存储设备的访问时延和实际带宽均优于传统存储设备, 但仍比不上内存, 更比不上处理器的片内緩存。 因此, 在处理器与非易失 性存储设备之间, 需要有中间的存储层次(主存或处理器片内緩存)作为 緩存来提升非易失性存储设备的实际访问带宽。
针对于传统存储设备的緩存设计方案都围绕着提升緩存命中率的核 心目标而优化, 直接应用到釆用非易失性存储设备的存储架构中, 会造成 因脏页的频繁替换而导致读写平均时延增大, 设备工作寿命降低等问题。 而将复杂的代价模型应用到釆用非易失性存储设备的存储架构,实现成本 高, 执行效率低。
发明内容
本发明的实施例提供一种非易失性存储设备的緩存管理方法及装置, 避免脏页频繁替换, 提高存储设备工作寿命, 降低实现成本, 提高执行效 率。
本发明的实施例釆用如下技术方案:
一种非易失性存储设备的緩存管理方法,应用于基于非易失性存储设 备的緩存系统, 所述緩存系统包括: 緩存、 非易失性存储设备以及緩存管 理装置;所述緩存用于保存从所述非易失性存储设备中读取的页面数据以 及准备写入所述非易失性存储设备中的页面数据,包括干净页子池和脏页 子池; 所述非易失性存储设备用于保存所有页面数据; 所述緩存管理装置 使用以下信息管理所述緩存, 所述信息包括干净子池容量阔值、 干净页子 池的页面信息, 干净页历史列表, 脏页子池的页面信息和脏页历史列表, 其中, 所述页面信息包括子池容量, 所述干净页历史列表用于存储最近被 替换出緩存的历史干净页的标识信息,所述脏页历史列表用于存储最近被 替换出緩存的历史脏页的标识信息;
该方法包括:
当确定待访问页面不在干净页子池, 并且也不在脏页子池时, 判断所 述干净页子池与所述脏页子池容量之和与緩存容量之间的大小关系;
当所述干净页子池与所述脏页子池容量之和大于或者等于所述緩存 容量时,判断所述待访问页面的标识信息是否在干净页历史列表或者在脏 页历史列表中;
当确定所述待访问页面的标识信息在干净页历史列表中时,将干净子 池容量阈值增加一个第一调整值;
当所述待访问页面的标识信息在脏页历史列表中时,将所述干净子池 容量阈值减少一个第二调整值。
一种非易失性存储设备的緩存管理装置,应用于基于非易失性存储设 备的緩存系统, 所述緩存系统包括: 緩存、 非易失性存储设备以及緩存管
理装置;所述緩存用于保存从所述非易失性存储设备中读取的页面数据以 及准备写入所述非易失性存储设备中的页面数据,包括干净页子池和脏页 子池; 所述非易失性存储设备用于保存所有页面数据; 所述緩存管理装置 使用以下信息管理所述緩存, 所述信息包括干净子池容量阔值、 干净页子 池的页面信息, 干净页历史列表, 脏页子池的页面信息和脏页历史列表, 其中, 所述页面信息包括子池容量, 所述干净页历史列表用于存储最近被 替换出緩存的历史干净页的标识信息,所述脏页历史列表用于存储最近被 替换出緩存的历史脏页的标识信息;
该装置包括:
判断单元, 用于在确定待访问页面不在干净页子池, 并且也不在脏页 子池时,判断所述干净页子池与所述脏页子池容量之和与緩存容量之间的 大小关系;
所述判断单元,还用于在确定所述干净页子池与所述脏页子池容量之 和大于或者等于所述緩存容量时,判断所述待访问页面的标识信息是否在 干净页历史列表或者在脏页历史列表中;
调整单元,用于在所述判断单元确定所述待访问页面的标识信息在干 净页历史列表中时, 将干净子池容量阔值增加一个第一调整值;
所述调整单元,还用于在所述判断单元确定所述待访问页面的标识信 息在脏页历史列表中时, 将所述干净子池容量阔值减少一个第二调整值。
本发明实施例提供的一种非易失性存储设备的緩存调整方法及装置, 通过在干净子池容量超过容量阈值时,依据写操作延时和读操作延时对干 净子池的容量进行调整, 实现了对干净子池和脏页子池容量的控制。 由于 非易失性存储设备的读写不对称特性,使得在对干净子池和脏页子池容量 的控制时, 可以优先加大脏页子池的容量, 从而避免脏页频繁替换, 提高 存储设备工作寿命。 并且, 调整值的计算方法简单, 相关参数获取容易, 降低实现成本, 提高执行效率。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对 实施例中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附 图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造 性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例 1中的一种基于非易失性存储设备的緩存系统的 组成框图;
图 2为本发明实施例 1中的一种基于非易失性存储设备的緩存调整方 法流程图;
图 3为本发明实施例 2中的一种基于非易失性存储设备的緩存调整方 法流程图;
图 4为本发明实施例 2中的另一种基于非易失性存储设备的緩存调整 方法流程图;
图 5为本发明实施例 2中的另一种基于非易失性存储设备的緩存调整 方法流程图;
图 6为本发明实施例 3中的一种基于非易失性存储设备的緩存调整装 置的组成框图;
图 7为本发明实施例 3中的另一种基于非易失性存储设备的緩存调整 装置的组成框图;
图 8为本发明实施例 3中的另一种基于非易失性存储设备的緩存调整 装置的组成框图;
图 9为本发明实施例 3中的另一种基于非易失性存储设备的緩存调整 装置的组成框图;
图 1 0为本发明实施例 3中的另一种基于非易失性存储设备的緩存调 整装置的组成框图;
图 1 1为本发明实施例 3中的另一种基于非易失性存储设备的緩存调 整装置的组成框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进 行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而 不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有 作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范 围。
实施例 1
本发明实施例提供了一种非易失性存储设备的緩存管理方法,可以应 用在基于非易失性存储设备的緩存系统,如图 1所示,所述緩存系统包括: 緩存、 非易失性存储设备以及緩存管理装置。
所述緩存,可以用于保存从所述非易失性存储设备中读取的页面数据 以及准备写入所述非易失性存储设备中的页面数据,包括干净页子池和脏 页子池。 所述干净页子池为緩存中未被修改的页面的集合, 所述脏页子池 为緩存中已被修改的页面的集合。所述干净页子池和脏页子池可以由链表 l inked l i s t或数组 a r ray等数据结构中的一种或多种的组合来实现。
所述非易失性存储设备, 例如, 闪存, PCM ( Pha s e Change Memory , 相变化存储器) 等存储设备, 可以用于保存所有页面数据。
所述緩存管理装置, 可以使用以下信息管理所述緩存, 所述信息包括 干净子池容量阔值、 干净页子池的页面信息, 干净页历史列表, 脏页子池 的页面信息和脏页历史列表, 其中, 所述页面信息包括子池容量, 所述干 净页历史列表用于存储最近被替换出緩存的历史干净页的标识信息,所述 脏页历史列表用于存储最近被替换出緩存的历史脏页的标识信息。为实现 对干净页和脏页的独立管理,可以将緩存管理装置中设置干净页管理单元 和脏页管理单元。 其中, 在本发明实施例中, 列表这一名称是对应于本发 明实施例所处技术领域内协议和标准中 1 i s t—词的中文解释。 列表 1 i s t 的实现形式是多样的,可以由 l i nked l i s t或者 a r ray等数据结构来实现, 本发明实施例对此不进行限制。
进一步的, 在实现基于非易失性存储设备的緩存系统的过程中, 需要
进行预先设置, 以保证该緩存系统的正常运行, 这些设置具体包括: 干净页子池与脏页子池的容量之和不超过緩存的物理容量。干净页子 池的容量与干净页历史列表的容量之和不超过緩存的物理容量。 此外, 干 净页子池的页面信息, 干净页历史列表, 脏页子池的页面信息和脏页历史 列表四者的容量之和不超过緩存的物理容量的 2倍。干净页历史列表和脏 页历史列表均为 LRU ( Least Recently Used, 最近最少使用) 列表。 干 净页子池和脏页子池使用独立的页面替换策略, 如 LRU, LFU ( least frequently used, 最不经常使用页置换算法) 等, 其页面信息的格式和 维护与其选择的页面替换策略相匹配。 当然, 上述设置仅仅是实现基于非 易失性存储设备的緩存系统的一种设置方法,具体的设置方法可以根据实 际情况进行选择, 并不局限于此。
在上述基于非易失性存储设备的緩存系统中,本发明实施例提供的一 种非易失性存储设备的緩存管理方法, 如图 2所示, 具体包括:
101、 当确定待访问页面不在干净页子池, 并且也不在脏页子池时, 緩存管理装置判断所述干净页子池与所述脏页子池容量之和与緩存容量 之间的大小关系。
102、 当所述干净页子池与所述脏页子池容量之和大于或者等于所述 緩存容量时,所述緩存管理装置判断所述待访问页面的标识信息是否在干 净页历史列表或者在脏页历史列表中。
其中, 所述待访问页面的标识信息可以设置为 ID编号等具有标识功 能的信息, 本发明实施例在此不——列举。
103、 当确定所述待访问页面的标识信息在干净页历史列表中时, 所 述緩存管理装置将干净子池容量阈值增加一个第一调整值。
其中,所述第一调整值可以设置为读操作延时除以写操作延时得到的 商值与 1之间的较大值。 并且, 所述干净页子池容量阔值经过调整后不能 超过緩存容量。
其中,读操作延时和写操作延时针对于同一个非易失性存储设备是固
定不变的, 而对于不同的非易失性存储设备可能存在不同。
1 04、 当所述待访问页面的标识信息在脏页历史列表中时, 所述緩存 管理装置将所述干净子池容量阈值减少一个第二调整值。
其中,所述第二调整值可以设置为写操作延时除以读操作延时得到的 商值与 1之间的较大值。 并且, 所述脏页子池容量阔值经过调整后不能超 过緩存容量。
本发明实施例提供的一种非易失性存储设备的緩存调整方法,通过在 干净子池容量超过容量阈值时,依据写操作延时和读操作延时对干净子池 的容量进行调整, 实现了对干净子池和脏页子池容量的控制。 由于非易失 性存储设备的读写不对称特性,使得在对干净子池和脏页子池容量的控制 时, 可以优先加大脏页子池的容量, 从而避免脏页频繁替换, 提高存储设 备工作寿命。 并且, 调整值的计算方法简单, 相关参数获取容易, 降低实 现成本, 提高执行效率。
实施例 2
本发明实施例提供了一种非易失性存储设备的緩存调整方法,也可以 应用于如图 1所示的基于非易失性存储设备的緩存系统中,并且对该緩存 系统的设置方法也可以与实施例 1 中相同,如图 2所示,该方法具体包括:
2 01、 当确定待访问页面不在干净页子池, 并且也不在脏页子池时, 緩存管理装置判断所述干净页子池与所述脏页子池容量之和与緩存容量 之间的大小关系。当所述干净页子池与所述脏页子池容量之和大于或者等 于所述緩存容量时, 执行步骤 2 02 ; 当所述干净页子池与所述脏页子池容 量之和小于所述緩存容量时, 则执行步骤 2 09。
2 02、 所述緩存管理装置从所述干净页子池和脏页子池中选取一个用 于选择待替换页面的子池。
其中, 所述步骤 2 02的实现方法具体如下, 如图 3所示, 包括:
2 01 1、所述緩存管理装置判断所述干净页子池容量与所述干净子池容 量阔值之间的大小关系。当所述干净页子池容量大于所述干净子池容量阔
值时, 则执行步骤 2022 ; 当所述干净页子池容量小于所述干净子池容量 阔值时, 则执行步骤 2023 ; 当所述干净页子池容量等于所述干净子池容 量阔值时, 则执行步骤 2024。
2022、所述緩存管理装置选取干净页子池作为用于选择待替换页面的 子池。
2023、所述緩存管理装置选取脏页子池作为用于选择待替换页面的子 池。
2024、 所述緩存管理装置判断如下条件是否成立, 所述条件为所述待 成立, 则执行所述步骤 2022 ; 否则执行所述步骤 2023。
203、 根据选取到的子池对应的页面替换策略, 所述緩存管理装置从 所述选取到的子池中选取一个待替换页面。
其中, 干净页子池和脏页子池对应的页面替换策略可以为 LRU、 ACR 等, 并且干净页子池和脏页子池对应的页面替换策略可以设置为相同的, 也可以设置为不同的, 本发明在此不进行限制。
需要说明的是,根据设置好的页面替换策略选择待替换页面的实现方 法为本领域技术人员公知的技术, 本发明实施例在此不进行限制。
204、 所述緩存管理装置维护所述选取到的子池对应的页面替换策略 当前所需的信息。
需要说明的是,所述页面替换策略当前所需的信息根据页面替换策略 的不同而不同。维护页面替换策略当前所需的信息为本领域技术人员公知 的技术, 本发明实施例在此不详细描述。
205、 所述緩存管理装置将所述待替换页面的标识信息迁移到所述选 取到的子池对应的历史列表的最近使用位置。
其中, 所述步骤 205具体实现方法如下, 包括:
当选取到的子池为干净页子池时,所述緩存管理装置将所述待替换页 面的标识信息迁移到干净页历史列表的最近使用位置。
当选取到的子池为脏页子池时,所述緩存管理装置将所述待替换页面 的标识信息迁移到脏页历史列表的最近使用位置。
206、 所述緩存管理装置判断所述待访问页面的标识信息是否在干净 页历史列表或者在脏页历史列表中。当确定所述待访问页面的标识信息在 干净页历史列表中时, 则执行步骤 207; 当所述待访问页面的标识信息在 脏页历史列表中时, 则执行步骤 208。
207、 所述緩存管理装置将干净子池容量阈值增加一个第一调整值, 所述第一调整值为读操作延时除以写操作延时得到的商值与 1 之间的较 大值, 并执行步骤 210。
208、 所述緩存管理装置将所述干净子池容量阔值减少一个第二调整 值,所述第二调整值为写操作延时除以读操作延时得到的商值与 1之间的 较大值, 并执行步骤 210。
209、 所述緩存管理装置从所述非易失性存储设备中读取所述待访问 页面, 并执行步骤 210。
210、 所述緩存管理装置判断当前请求所述待访问页面的操作对应的 操作类型。 当确定所述操作类型为读操作时, 则执行步骤 211; 当确定所 述操作类型为写操作时, 则执行步骤 215。
211、所述緩存管理装置将所述待访问页面读取到所述干净页子池中 , 并维护所述干净页子池对应的页面替换策略当前所需的信息。
212、 所述緩存管理装置判断干净页子池容量与干净页历史列表容量 之和是否大于所述緩存容量。若确定所述干净页子池容量与所述干净页历 史列表容量之和大于所述緩存容量, 则执行步骤 213; 若确定所述干净页 子池容量与所述干净页历史列表容量之和小于或者等于所述緩存容量,则 执行步骤 214。
213、 所述緩存管理装置移除干净页历史列表的最近最少使用位置的 页面标识信息, 并结束緩存管理流程。
214、 所述緩存管理装置保持干净页历史列表不变, 并结束緩存管理
流程。
2 1 5、 所述緩存管理装置将所述待访问页面读取到所述脏页子池中, 并维护所述脏页子池对应的页面替换策略当前所需的信息。
2 1 6、 所述緩存管理装置判断干净页子池容量、 脏页子池容量、 干净 页历史列表容量以及脏页历史列表容量之和是否大于所述緩存容量的两 倍。 若确定干净页子池容量、 脏页子池容量、 干净页历史列表容量以及脏 页历史列表容量之和大于所述緩存容量的两倍, 则执行步骤 2 1 7 ; 若确定 干净页子池容量、 脏页子池容量、 干净页历史列表容量以及脏页历史列表 容量之和小于或者等于所述緩存容量的两倍, 则执行步骤 2 1 8。
2 1 7、 所述緩存管理装置移除脏页历史列表的最近最少使用位置的页 面标识信息, 并结束緩存管理流程。
2 1 8、 所述緩存管理装置保持脏页历史列表不变, 并结束緩存管理流 程。
在本实施例中, 通过在干净子池容量超过容量阈值时, 依据写操作延 时和读操作延时对干净子池的容量进行调整,实现了对干净子池和脏页子 池容量的控制。 由于非易失性存储设备的读写不对称特性, 使得在对干净 子池和脏页子池容量的控制时, 可以优先加大脏页子池的容量, 从而避免 脏页频繁替换, 提高存储设备工作寿命。
并且,只需要根据写操作延时和读操作延时对干净子池的容量进行调 整, 调整值的计算方法简单, 相关参数获取容易, 降低实现成本, 提高执 行效率。
而且, 对历史列表的容量大小也进行控制, 降低了緩存管理装置需要 管理的信息, 保证緩存管理装置工作性能。
需要说明的是, 在处理器请求访问页面的过程可分为两个部分流程, 其中一个部分流程为当待访问页面在緩存中时,直接从緩存中读取待访问 页面; 另一部分流程为当待访问页面不在緩存中时, 需要进行页面缺失流 程。 上述步骤 2 01至步骤 2 1 8属于页面缺失流程。
进一步的, 处理器请求访问页面的过程对应的緩存管理流程如图 4 所示, 具体包括:
301、 所述緩存管理装置判断所述待访问页面是否在干净页子池中。 若确定所述待访问页面在干净页子池中, 则执行步骤 302 ; 否则执行步骤 305。
302、 所述緩存管理装置判断当前请求所述待访问页面的操作对应的 操作类型。 当确定所述操作类型为读操作时, 则执行步骤 303 ; 当确定所 述操作类型为写操作时, 则执行步骤 304。
303、 所述緩存管理装置维护所述干净页子池对应的页面替换策略当 前所需的信息。
304、 所述緩存管理装置将所述待访问页面迁移到脏页子池中, 并维 护所述干净页子池对应的页面替换策略当前所需的信息以及所述脏页子 池对应的页面替换策略当前所需的信息, 并结束緩存管理流程。
305、 所述緩存管理装置判断所述待访问页面是否在脏页子池中。 若 确定所述待访问页面在脏页子池中, 则执行步骤 306 ; 否则执行步骤 307。
306、 所述緩存管理装置维护所述脏页子池对应的页面替换策略当前 所需的信息, 并结束緩存管理流程。
307、 进入待访问页面缺失流程, 即所述步骤 201 至步骤 218 , 以使 得所述緩存管理装置将所述待访问页面读取到緩存中,并结束緩存管理流 程。
在本实施例中,步骤 301至步骤 307实现了处理器请求访问页面的过 程对应的緩存管理流程。
本发明实施例提供的一种非易失性存储设备的緩存管理方法,通过在 干净子池容量超过容量阈值时,依据写操作延时和读操作延时对干净子池 的容量进行调整, 实现了对干净子池和脏页子池容量的控制。 由于非易失 性存储设备的读写不对称特性,使得在对干净子池和脏页子池容量的控制 时, 可以优先加大脏页子池的容量, 从而避免脏页频繁替换, 提高存储设
备工作寿命。
并且,只需要根据写操作延时和读操作延时对干净子池的容量进行调 整, 调整值的计算方法简单, 相关参数获取容易, 降低实现成本, 提高执 行效率。
而且, 对历史列表的容量大小也进行控制, 降低了緩存管理装置需要 管理的信息, 保证緩存管理装置工作性能。
实施例 3
本发明实施例提供了一种非易失性存储设备的緩存管理装置, 如图 6 所示, 该装置包括: 判断单元 41、 调整单元 42。
判断单元 41, 用于在确定待访问页面不在干净页子池, 并且也不在 脏页子池时,判断所述干净页子池与所述脏页子池容量之和与緩存容量之 间的大小关系。
所述判断单元 41, 还用于在确定所述干净页子池与所述脏页子池容 量之和大于或者等于所述緩存容量时,判断所述待访问页面的标识信息是 调整单元 42, 用于在所述判断单元 41确定所述待访问页面的标识信 息在干净页历史列表中时, 将干净子池容量阔值增加一个第一调整值, 所 述第一调整值为读操作延时除以写操作延时得到的商值与 1 之间的较大 值。
所述调整单元 42, 还用于在所述判断单元 41确定所述待访问页面的 标识信息在脏页历史列表中时,将所述干净子池容量阔值减少一个第二调 整值,所述第二调整值为写操作延时除以读操作延时得到的商值与 1之间 的较大值。
可选的是, 如图 7所示, 该装置还包括: 选取单元 43、 维护单元 44、 迁移单元 45。
选取单元 43, 用于在所述判断单元 41确定所述干净页子池与所述脏 页子池容量之和大于或者等于所述緩存容量,从所述干净页子池和脏页子
池中选取一个用于选择待替换页面的子池;
所述选取单元 43 , 用于根据选取到的子池对应的页面替换策略, 从 所述选取到的子池中选取一个待替换页面;
维护单元 44 , 用于维护所述选取单元 44选取到的子池对应的页面替 换策略当前所需的信息;
迁移单元 45 , 用于将所述待替换页面的标识信息迁移到所述选取到 的子池对应的历史列表的最近使用位置。
可选的是, 如图 8所示, 所述选取单元 43还包括: 判断模块 431、 子池选取模块 432。
判断模块 431 , 用于判断所述干净页子池容量与所述干净子池容量阔 值之间的大小关系。
子池选取模块 432 , 用于在所述判断模块 431确定所述干净页子池容 量大于所述干净子池容量阔值时,选取干净页子池作为用于选择待替换页 面的子池。
所述选取模块 432 , 用于在所述判断模块 431确定所述干净页子池容 量小于所述干净子池容量阔值时,选取脏页子池作为用于选择待替换页面 的子池。
所述判断模块 431 , 用于在所述干净页子池容量等于所述干净子池容 量阔值时, 判断如下条件是否成立, 所述条件为所述待访问页面在所述干 净页历史列表中并且脏页子池容量大于 0。
所述子池选取模块 432 , 用于在所述判断模块 431确定所述条件成立 时, 选取脏页子池作为用于选择待替换页面的子池。
所述子池选取模块 432 , 用于在所述判断模块 431确定所述条件不成 立时, 选取干净页子池作为用于选择待替换页面的子池。
可选的是, 如图 9所示, 该装置还包括: 读取单元 46。
读取单元 46 , 用于在所述判断单元 41确定所述干净页子池与所述脏 页子池容量之和小于所述緩存容量时,从所述非易失性存储设备中读取所
述待访问页面。
可选的是, 所述判断单元 41, 还用于判断当前请求所述待访问页面 的操作对应的操作类型。
所述读取单元 46, 用于在所述判断单元 41确定所述操作类型为读操 作时, 将所述待访问页面读取到所述干净页子池中。
所述维护单元 44, 用于维护所述干净页子池对应的页面替换策略当 前所需的信息。
所述读取单元 46, 用于所述判断单元确定操作类型为写操作时, 将 所述待访问页面读到所述脏页子池中。
所述维护单元,用于维护所述脏页子池对应的页面替换策略当前所需 的信息。
可选的是, 如图 10所示, 该装置还包括: 第一移除单元 47。
所述判断单元 41, 用于判断干净页子池容量与干净页历史列表容量 之和是否大于所述緩存容量。
第一移除单元 47, 用于在所述判断单元 41确定所述干净页子池容量 与所述干净页历史列表容量之和大于所述緩存容量时,移除干净页历史列 表的最近最少使用位置的页面标识信息。
所述第一移除单元 47, 还用于在所述判断单元 41确定所述干净页子 池容量与所述干净页历史列表容量之和小于或者等于所述緩存容量时,保 持干净页历史列表不变。
可选的是, 如图 11所示, 该装置还包括: 第二移除单元 48。
所述判断单元 41, 用于判断干净页子池容量、 脏页子池容量、 干净 页历史列表容量以及脏页历史列表容量之和是否大于所述緩存容量的两 倍。
第二移除单元 48, 用于在所述判断单元 41确定干净页子池容量、 脏 页子池容量、干净页历史列表容量以及脏页历史列表容量之和大于所述緩 存容量的两倍时, 移除脏页历史列表的最近最少使用位置的页面标识信
息。
所述第二移除单元 48 ,用于在所述判断单元 4 1确定干净页子池容量、 脏页子池容量、干净页历史列表容量以及脏页历史列表容量之和小于或者 等于所述緩存容量的两倍时, 保持脏页历史列表不变。
可选的是, 所述判断单元 4 1 , 用于判断所述待访问页面是否在干净 页子池中;
所述判断单元 4 1 , 还用于在确定所述待访问页面不在干净页子池中 时, 判断所述待访问页面是否在脏页子池中;
所述维护单元 44 , 用于在所述判断单元 4 1确定所述待访问页面在脏 页子池中时, 则维护所述脏页子池对应的页面替换策略当前所需的信息; 所述判断单元 4 1 , 用于在确定所述待访问页面不在脏页子池中时, 判断所述干净页子池与所述脏页子池容量之和与緩存容量之间的大小关 系。
可选的是, 所述判断单元 4 1 , 还用于在确定所述待访问页面在干净 页子池中时, 获取当前请求所述待访问页面的操作对应的操作类型。
所述维护单元 44 , 还用于在判断单元 4 1确定所述操作类型为读操作 时, 维护所述干净页子池对应的页面替换策略当前所需的信息。
所述迁移单元 45 , 用于在所述判断单元 4 1确定所述操作类型为写操 作时, 将所述待访问页面迁移到脏页子池中。
所述维护单元 44 , 还用于维护所述干净页子池对应的页面替换策略 当前所需的信息以及所述脏页子池对应的页面替换策略当前所需的信息。
本发明实施例提供的一种非易失性存储设备的緩存管理装置,通过在 干净子池容量超过容量阈值时,依据写操作延时和读操作延时对干净子池 的容量进行调整, 实现了对干净子池和脏页子池容量的控制。 由于非易失 性存储设备的读写不对称特性,使得在对干净子池和脏页子池容量的控制 时, 可以优先加大脏页子池的容量, 从而避免脏页频繁替换, 提高存储设 备工作寿命。
并且,只需要根据写操作延时和读操作延时对干净子池的容量进行调 整, 调整值的计算方法简单, 相关参数获取容易, 降低实现成本, 提高执 行效率。
而且, 对历史列表的容量大小也进行控制, 降低了緩存管理装置需要 管理的信息, 保证緩存管理装置工作性能。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到 本发明可借助软件加必需的通用硬件的方式来实现, 当然也可以通过硬 件, 但很多情况下前者是更佳的实施方式。 基于这样的理解, 本发明的技 术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式 体现出来, 该计算机软件产品存储在可读取的存储介质中, 如计算机的软 盘, 硬盘或光盘等, 包括若干指令用以使得一台计算机设备(可以是个人 计算机, 服务器, 或者网络设备等) 执行本发明各个实施例所述的方法。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局 限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可 轻易想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明 的保护范围应以所述权利要求的保护范围为准。
Claims
1、 一种非易失性存储设备的緩存管理方法, 其特征在于, 应用于基于 非易失性存储设备的緩存系统, 所述緩存系统包括: 緩存、 非易失性存储 设备以及緩存管理装置; 所述緩存用于保存从所述非易失性存储设备中读 取的页面数据以及准备写入所述非易失性存储设备中的页面数据, 包括干 净页子池和脏页子池; 所述非易失性存储设备用于保存所有页面数据; 所 述緩存管理装置使用以下信息管理所述緩存, 所述信息包括干净子池容量 阔值、 干净页子池的页面信息, 干净页历史列表, 脏页子池的页面信息和 脏页历史列表, 其中, 所述页面信息包括子池容量, 所述干净页历史列表 用于存储最近被替换出緩存的历史干净页的标识信息, 所述脏页历史列表 用于存储最近被替换出緩存的历史脏页的标识信息;
该方法包括:
当确定待访问页面不在干净页子池, 并且也不在脏页子池时, 判断所 述干净页子池与所述脏页子池容量之和与緩存容量之间的大小关系;
当所述干净页子池与所述脏页子池容量之和大于或者等于所述緩存容 量时, 判断所述待访问页面的标识信息是否在干净页历史列表或者在脏页 历史列表中;
当确定所述待访问页面的标识信息在干净页历史列表中时, 将干净子 池容量阈值增加一个第一调整值;
当所述待访问页面的标识信息在脏页历史列表中时, 将所述干净子池 容量阈值减少一个第二调整值。
2、 根据权利要求 1所述的方法, 其特征在于, 在所述判断所述待访问 页面的标识信息是否在干净页历史列表或者在脏页历史列表中之前, 还包 括:
从所述干净页子池和脏页子池中选取一个用于选择待替换页面的子 池;
根据选取到的子池对应的页面替换策略, 从所述选取到的子池中选取
一个待替换页面;
维护所述选取到的子池对应的页面替换策略当前所需的信息; 将所述待替换页面的标识信息迁移到所述选取到的子池对应的历史列 表的最近使用位置。
3、 根据权利要求 2所述的方法, 其特征在于, 所述从所述干净页子池 和脏页子池中选取一个用于选择待替换页面的子池具体包括:
判断所述干净页子池容量与所述干净子池容量阔值之间的大小关系; 当所述干净页子池容量大于所述干净子池容量阔值时, 选取干净页子 池作为用于选择待替换页面的子池;
当所述干净页子池容量小于所述干净子池容量阔值时, 选取脏页子池 作为用于选择待替换页面的子池;
当所述干净页子池容量等于所述干净子池容量阔值时, 判断如下条件 子池容量大于 0;
若所述条件成立, 则选取脏页子池作为用于选择待替换页面的子池; 若所述条件不成立, 则选取干净页子池作为用于选择待替换页面的子 池。
4、 根据权利要求 1-3任意一项所述的方法, 其特征在于, 还包括: 当所述干净页子池与所述脏页子池容量之和小于所述緩存容量时, 所 述从所述非易失性存储设备中读取所述待访问页面。
5、 根据权利要求 4所述的方法, 其特征在于, 在将干净子池容量阔值 增加一个第一调整值之后, 或者在将所述干净子池容量阔值减少一个第二 调整值之后, 还包括:
判断当前请求所述待访问页面的操作对应的操作类型;
当确定所述操作类型为读操作时, 将所述待访问页面读取到所述干净 页子池中, 并维护所述干净页子池对应的页面替换策略当前所需的信息; 当确定所述操作类型为写操作时, 将所述待访问页面读取到所述脏页
子池中, 并维护所述脏页子池对应的页面替换策略当前所需的信息。
6、 根据权利要求 5所述的方法, 其特征在于, 在所述维护所述干净页 子池对应的页面替换策略当前所需的信息之后, 还包括:
判断干净页子池容量与干净页历史列表容量之和是否大于所述緩存容 量;
若确定所述干净页子池容量与所述干净页历史列表容量之和大于所述 緩存容量, 则移除干净页历史列表的最近最少使用位置的页面标识信息; 若确定所述干净页子池容量与所述干净页历史列表容量之和小于或者 等于所述緩存容量, 则保持干净页历史列表不变。
7、 根据权利要求 5所述的方法, 其特征在于, 在所述维护所述脏页子 池对应的页面替换策略当前所需的信息之后, 还包括:
判断干净页子池容量、 脏页子池容量、 干净页历史列表容量以及脏页 历史列表容量之和是否大于所述緩存容量的两倍;
若确定干净页子池容量、 脏页子池容量、 干净页历史列表容量以及脏 页历史列表容量之和大于所述緩存容量的两倍, 则移除脏页历史列表的最 近最少使用位置的页面标识信息;
若确定干净页子池容量、 脏页子池容量、 干净页历史列表容量以及脏 页历史列表容量之和小于或者等于所述緩存容量的两倍, 则保持脏页历史 列表不变。
8、 根据权利要求 6或 7所述的方法, 其特征在于, 在所述判断所述干 净页子池与所述脏页子池容量之和与緩存容量之间的大小关系之前, 还包 括:
判断所述待访问页面是否在干净页子池中;
若确定所述待访问页面不在干净页子池中, 则判断所述待访问页面是 否在脏页子池中;
若确定所述待访问页面在脏页子池中, 则维护所述脏页子池对应的页 面替换策略当前所需的信息;
若确定所述待访问页面不在脏页子池中, 则执行所述判断所述干净页 子池与所述脏页子池容量之和与緩存容量之间的大小关系。
9、 根据权利要求 8所述的方法, 其特征在于, 还包括:
若确定所述待访问页面在干净页子池中, 则判断当前请求所述待访问 页面的操作对应的操作类型;
当确定所述操作类型为读操作时, 维护所述干净页子池对应的页面替 换策略当前所需的信息;
当确定所述操作类型为写操作时, 将所述待访问页面迁移到脏页子池 中, 并维护所述干净页子池对应的页面替换策略当前所需的信息以及所述 脏页子池对应的页面替换策略当前所需的信息。
1 0、 一种非易失性存储设备的緩存管理装置, 其特征在于, 应用于基 于非易失性存储设备的緩存系统, 所述緩存系统包括: 緩存、 非易失性存 储设备以及緩存管理装置; 所述緩存用于保存从所述非易失性存储设备中 读取的页面数据以及准备写入所述非易失性存储设备中的页面数据, 包括 干净页子池和脏页子池; 所述非易失性存储设备用于保存所有页面数据; 所述緩存管理装置使用以下信息管理所述緩存, 所述信息包括干净子池容 量阔值、 干净页子池的页面信息, 干净页历史列表, 脏页子池的页面信息 和脏页历史列表, 其中, 所述页面信息包括子池容量, 所述干净页历史列 表用于存储最近被替换出緩存的历史干净页的标识信息, 所述脏页历史列 表用于存储最近被替换出緩存的历史脏页的标识信息;
该装置包括:
判断单元, 用于在确定待访问页面不在干净页子池, 并且也不在脏页 子池时, 判断所述干净页子池与所述脏页子池容量之和与緩存容量之间的 大小关系; 和大于或者等于所述緩存容量时, 判断所述待访问页面的标识信息是否在 干净页历史列表或者在脏页历史列表中;
调整单元, 用于在所述判断单元确定所述待访问页面的标识信息在干 净页历史列表中时, 将干净子池容量阔值增加一个第一调整值; 在所述判 断单元确定所述待访问页面的标识信息在脏页历史列表中时, 将所述干净 子池容量阈值减少一个第二调整值。
11、 根据权利要求 10所述的装置, 其特征在于, 该装置还包括: 容量之和大于或者等于所述緩存容量, 从所述干净页子池和脏页子池中选 取一个用于选择待替换页面的子池; 还用于根据选取到的子池对应的页面 替换策略, 从所述选取到的子池中选取一个待替换页面;
维护单元, 用于维护所述选取单元选取到的子池对应的页面替换策略 当前所需的信息;
迁移单元, 用于将所述待替换页面的标识信息迁移到所述选取到的子 池对应的历史列表的最近使用位置。
12、 根据权利要求 11所述的装置, 其特征在于, 所述选取单元具体包 括:
判断模块, 用于判断所述干净页子池容量与所述干净子池容量阔值之 间的大小关系; 还用于在所述干净页子池容量等于所述干净子池容量阔值 史列表中并且脏页子池容量大于 0;
子池选取模块, 用于在所述判断模块确定所述干净页子池容量大于所 述干净子池容量阔值时,选取干净页子池作为用于选择待替换页面的子池; 还用于在所述判断模块确定所述干净页子池容量小于所述干净子池容量阔 值时, 选取脏页子池作为用于选择待替换页面的子池; 还用于在所述判断 模块确定所述条件成立时,选取脏页子池作为用于选择待替换页面的子池; 还用于在所述判断模块确定所述条件不成立时, 选取干净页子池作为用于 选择待替换页面的子池。
1 3、 根据权利要求 10-12任一项所述的装置, 其特征在于, 该装置还
包括: 容量之和小于所述緩存容量时, 从所述非易失性存储设备中读取所述待访 问页面。
14、 根据权利要求 1 3所述的装置, 其特征在于, 所述判断单元, 还用 于判断当前请求所述待访问页面的操作对应的操作类型;
所述读取单元,还用于在所述判断单元确定所述操作类型为读操作时, 将所述待访问页面读取到所述干净页子池中; 还用于所述判断单元确定操 作类型为写操作时, 将所述待访问页面读到所述脏页子池中;
所述维护单元, 还用于维护所述干净页子池对应的页面替换策略当前 所需的信息; 维护所述脏页子池对应的页面替换策略当前所需的信息。
1 5、 根据权利要求 14所述的装置, 其特征在于, 该装置还包括: 所述判断单元, 用于判断干净页子池容量与干净页历史列表容量之和 是否大于所述緩存容量; 干净页历史列表容量之和大于所述緩存容量时, 移除干净页历史列表的最 近最少使用位置的页面标识信息; 还用于在所述判断单元确定所述干净页 子池容量与所述干净页历史列表容量之和小于或者等于所述緩存容量时, 保持干净页历史列表不变。
1 6、 根据权利要求 14所述的装置, 其特征在于, 该装置还包括: 所述判断单元, 用于判断干净页子池容量、 脏页子池容量、 干净页历 史列表容量以及脏页历史列表容量之和是否大于所述緩存容量的两倍; 第二移除单元, 用于在所述判断单元确定干净页子池容量、 脏页子池 容量、 干净页历史列表容量以及脏页历史列表容量之和大于所述緩存容量 的两倍时, 移除脏页历史列表的最近最少使用位置的页面标识信息; 还用 于在所述判断单元确定干净页子池容量、 脏页子池容量、 干净页历史列表 容量以及脏页历史列表容量之和小于或者等于所述緩存容量的两倍时, 保
持脏页历史列表不变。
1 7、 根据权利要求 1 6所述的装置, 其特征在于, 所述判断单元, 用于 判断所述待访问页面是否在干净页子池中; 还用于在确定所述待访问页面 不在干净页子池中时, 判断所述待访问页面是否在脏页子池中; 还用于在 确定所述待访问页面不在脏页子池中时, 判断所述干净页子池与所述脏页 子池容量之和与緩存容量之间的大小关系; 中时, 则维护所述脏页子池对应的页面替换策略当前所需的信息。
1 8、 根据权利要求 1 7所述的装置, 其特征在于, 所述判断单元, 还用 于在确定所述待访问页面在干净页子池中时, 判断当前请求所述待访问页 面的操作对应的操作类型;
所述维护单元, 还用于在判断单元确定所述操作类型为读操作时, 维 护所述干净页子池对应的页面替换策略当前所需的信息; 还用于维护所述 干净页子池对应的页面替换策略当前所需的信息以及所述脏页子池对应的 页面替换策略当前所需的信息;
所述迁移单元, 用于在所述判断单元确定所述操作类型为写操作时, 将所述待访问页面迁移到脏页子池中。
Priority Applications (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
ES13807299.6T ES2686724T3 (es) | 2012-06-20 | 2013-02-20 | Método de administración de memoria caché y aparato para dispositivo de almacenamiento no volátil |
EP13807299.6A EP2846266B1 (en) | 2012-06-20 | 2013-02-20 | Buffering management method and apparatus for non-volatile storage device |
EP17197683.0A EP3425513B1 (en) | 2012-06-20 | 2013-02-20 | Cache management method and apparatus for non-volatile storage device |
US14/546,797 US9524245B2 (en) | 2012-06-20 | 2014-11-18 | Cache management method and apparatus for non-volatile storage device |
US15/348,056 US9727487B2 (en) | 2012-06-20 | 2016-11-10 | Cache management method and apparatus for non-volatile storage device |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210205360.6 | 2012-06-20 | ||
CN201210205360.6A CN103514110B (zh) | 2012-06-20 | 2012-06-20 | 非易失性存储设备的缓存管理方法及装置 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US14/546,797 Continuation US9524245B2 (en) | 2012-06-20 | 2014-11-18 | Cache management method and apparatus for non-volatile storage device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2013189186A1 true WO2013189186A1 (zh) | 2013-12-27 |
Family
ID=49768078
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2013/071688 WO2013189186A1 (zh) | 2012-06-20 | 2013-02-20 | 非易失性存储设备的缓存管理方法及装置 |
Country Status (5)
Country | Link |
---|---|
US (2) | US9524245B2 (zh) |
EP (2) | EP3425513B1 (zh) |
CN (2) | CN103514110B (zh) |
ES (1) | ES2686724T3 (zh) |
WO (1) | WO2013189186A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117743206A (zh) * | 2024-02-21 | 2024-03-22 | 深圳市金政软件技术有限公司 | 数据的储存方法和装置 |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9996262B1 (en) * | 2015-11-09 | 2018-06-12 | Seagate Technology Llc | Method and apparatus to abort a command |
CN107179963B (zh) * | 2016-03-11 | 2021-02-23 | 华为技术有限公司 | 非易失性静态随机存储器的备份方法和装置 |
JP6711121B2 (ja) * | 2016-05-10 | 2020-06-17 | 富士通株式会社 | 情報処理装置、キャッシュメモリ制御方法、およびキャッシュメモリ制御プログラム |
CN108021514B (zh) * | 2016-10-28 | 2020-11-06 | 华为技术有限公司 | 一种缓存替换的方法和设备 |
JP6799256B2 (ja) * | 2016-11-28 | 2020-12-16 | 富士通株式会社 | ストレージ制御装置、ストレージシステム、ストレージ制御方法およびストレージ制御プログラム |
US10254961B2 (en) * | 2017-02-21 | 2019-04-09 | International Business Machines Corporation | Dynamic load based memory tag management |
CN108345546B (zh) * | 2017-05-09 | 2019-09-20 | 清华大学 | 用于确定处理器操作的方法及装置 |
CN110955486B (zh) * | 2018-09-26 | 2022-08-23 | Oppo广东移动通信有限公司 | 文件缓存效率的追踪方法、装置、存储介质及终端 |
CN111258929B (zh) * | 2018-12-03 | 2023-09-26 | 北京京东尚科信息技术有限公司 | 缓存控制方法、装置和计算机可读存储介质 |
CN113032088B (zh) * | 2019-12-25 | 2023-12-22 | 阿里巴巴集团控股有限公司 | 脏页记录方法、装置、电子设备及计算机可读介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20100006625A (ko) * | 2008-07-10 | 2010-01-21 | 한양대학교 산학협력단 | 플래시 메모리와 연동되는 페이지 버퍼 관리 장치 및 방법,그리고 플래시 메모리의 페이지 교체 장치 및 방법 |
CN102156753A (zh) * | 2011-04-29 | 2011-08-17 | 中国人民解放军国防科学技术大学 | 面向固态硬盘文件系统的数据页缓存方法 |
CN102160038A (zh) * | 2008-09-15 | 2011-08-17 | 惠普开发有限公司 | 管理非易失性磁盘高速缓存的方法和设备 |
US20110320733A1 (en) * | 2010-06-04 | 2011-12-29 | Steven Ted Sanford | Cache management and acceleration of storage media |
Family Cites Families (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6996676B2 (en) | 2002-11-14 | 2006-02-07 | International Business Machines Corporation | System and method for implementing an adaptive replacement cache policy |
US7096321B2 (en) | 2003-10-21 | 2006-08-22 | International Business Machines Corporation | Method and system for a cache replacement technique with adaptive skipping |
US7058766B2 (en) | 2003-10-21 | 2006-06-06 | International Business Machines Corporation | Method and system of adaptive replacement cache with temporal filtering |
US20060069876A1 (en) * | 2004-09-30 | 2006-03-30 | Sorav Bansal | Method and system of clock with adaptive cache replacement and temporal filtering |
US7260679B2 (en) | 2004-10-12 | 2007-08-21 | International Business Machines Corporation | Apparatus and method to manage a data cache using a first and second least recently used list |
US7487320B2 (en) | 2004-12-15 | 2009-02-03 | International Business Machines Corporation | Apparatus and system for dynamically allocating main memory among a plurality of applications |
EP1870813B1 (en) * | 2006-06-19 | 2013-01-30 | Texas Instruments France | Page processing circuits, devices, methods and systems for secure demand paging and other operations |
US8745315B2 (en) * | 2006-11-06 | 2014-06-03 | Rambus Inc. | Memory Systems and methods supporting volatile and wear-leveled nonvolatile physical memory |
WO2008056593A1 (fr) * | 2006-11-06 | 2008-05-15 | Panasonic Corporation | Dispositif d'enregistrement |
US7783839B2 (en) | 2007-01-08 | 2010-08-24 | International Business Machines Corporation | Using different algorithms to destage different types of data from cache |
JP2009075759A (ja) * | 2007-09-19 | 2009-04-09 | Hitachi Ltd | ストレージ装置及びストレージ装置におけるデータの管理方法 |
EP2225643B1 (en) * | 2007-12-28 | 2020-05-06 | Toshiba Memory Corporation | Semiconductor storage device |
JP4729062B2 (ja) * | 2008-03-07 | 2011-07-20 | 株式会社東芝 | メモリシステム |
US20110320766A1 (en) * | 2010-06-29 | 2011-12-29 | Youfeng Wu | Apparatus, method, and system for improving power, performance efficiency by coupling a first core type with a second core type |
US8504774B2 (en) * | 2010-10-13 | 2013-08-06 | Microsoft Corporation | Dynamic cache configuration using separate read and write caches |
CN102012873B (zh) * | 2010-11-24 | 2012-09-05 | 清华大学 | Nand闪存的缓存系统及缓存方法 |
US20140115241A1 (en) * | 2011-05-30 | 2014-04-24 | Qingsong Wei | Buffer management apparatus and method |
KR101824295B1 (ko) * | 2011-08-12 | 2018-01-31 | 샌디스크 테크놀로지스 엘엘씨 | 솔리드 스테이트 장치 가상화를 포함하는 캐시 관리 |
US9122631B2 (en) * | 2011-11-07 | 2015-09-01 | Peking University | Buffer management strategies for flash-based storage systems |
CN102436356B (zh) * | 2011-12-12 | 2014-12-24 | 华为数字技术(成都)有限公司 | 写页面空间分配方法和装置 |
CN104011690B (zh) * | 2011-12-29 | 2016-11-09 | 英特尔公司 | 具有直接存取的多级存储器 |
-
2012
- 2012-06-20 CN CN201210205360.6A patent/CN103514110B/zh active Active
- 2012-06-20 CN CN201610519683.0A patent/CN106201348B/zh active Active
-
2013
- 2013-02-20 EP EP17197683.0A patent/EP3425513B1/en active Active
- 2013-02-20 WO PCT/CN2013/071688 patent/WO2013189186A1/zh active Application Filing
- 2013-02-20 ES ES13807299.6T patent/ES2686724T3/es active Active
- 2013-02-20 EP EP13807299.6A patent/EP2846266B1/en active Active
-
2014
- 2014-11-18 US US14/546,797 patent/US9524245B2/en active Active
-
2016
- 2016-11-10 US US15/348,056 patent/US9727487B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20100006625A (ko) * | 2008-07-10 | 2010-01-21 | 한양대학교 산학협력단 | 플래시 메모리와 연동되는 페이지 버퍼 관리 장치 및 방법,그리고 플래시 메모리의 페이지 교체 장치 및 방법 |
CN102160038A (zh) * | 2008-09-15 | 2011-08-17 | 惠普开发有限公司 | 管理非易失性磁盘高速缓存的方法和设备 |
US20110320733A1 (en) * | 2010-06-04 | 2011-12-29 | Steven Ted Sanford | Cache management and acceleration of storage media |
CN102156753A (zh) * | 2011-04-29 | 2011-08-17 | 中国人民解放军国防科学技术大学 | 面向固态硬盘文件系统的数据页缓存方法 |
Non-Patent Citations (1)
Title |
---|
See also references of EP2846266A4 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117743206A (zh) * | 2024-02-21 | 2024-03-22 | 深圳市金政软件技术有限公司 | 数据的储存方法和装置 |
CN117743206B (zh) * | 2024-02-21 | 2024-04-26 | 深圳市金政软件技术有限公司 | 数据的储存方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
EP3425513B1 (en) | 2020-07-08 |
CN103514110A (zh) | 2014-01-15 |
EP2846266A1 (en) | 2015-03-11 |
US20170060773A1 (en) | 2017-03-02 |
EP2846266A4 (en) | 2015-07-15 |
US9727487B2 (en) | 2017-08-08 |
EP2846266B1 (en) | 2018-06-27 |
CN106201348A (zh) | 2016-12-07 |
CN103514110B (zh) | 2016-08-24 |
ES2686724T3 (es) | 2018-10-19 |
US9524245B2 (en) | 2016-12-20 |
US20150074345A1 (en) | 2015-03-12 |
EP3425513A1 (en) | 2019-01-09 |
CN106201348B (zh) | 2019-08-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2013189186A1 (zh) | 非易失性存储设备的缓存管理方法及装置 | |
US10241919B2 (en) | Data caching method and computer system | |
US11030107B2 (en) | Storage class memory queue depth threshold adjustment | |
US10776276B2 (en) | Bypass storage class memory read cache based on a queue depth threshold | |
JP5908100B2 (ja) | ストレージ・システムの二次キャッシュ内にデータをポピュレートするための方法、制御装置、プログラム | |
US8225044B2 (en) | Storage system which utilizes two kinds of memory devices as its cache memory and method of controlling the storage system | |
CN106547476B (zh) | 用于数据存储系统的方法和装置 | |
US20100312955A1 (en) | Memory system and method of managing the same | |
US8572321B2 (en) | Apparatus and method for segmented cache utilization | |
US20120317354A1 (en) | Storage device, control method for same and system management program | |
WO2017117734A1 (zh) | 一种缓存管理方法、缓存控制器以及计算机系统 | |
JP2011204060A (ja) | ディスク装置 | |
US20090094391A1 (en) | Storage device including write buffer and method for controlling the same | |
WO2015061921A1 (zh) | 用于数据存储系统的动态缓存方法和系统 | |
US10083117B2 (en) | Filtering write request sequences | |
US20120047330A1 (en) | I/o efficiency of persistent caches in a storage system | |
JPWO2018211749A1 (ja) | ストレージコントローラ、ストレージシステム、ストレージコントローラの制御方法およびプログラム | |
WO2013075627A1 (zh) | 一种数据的缓存方法、装置和服务器 | |
CN108897618B (zh) | 一种异构内存架构下基于任务感知的资源分配方法 | |
US20140068209A1 (en) | Accessing remote memory on a memory blade | |
CN115563029A (zh) | 一种基于两层缓存结构的缓存方法及装置 | |
KR101875844B1 (ko) | 하위 레벨 캐시에서 캐시 라인들의 연수를 제어함으로써 메모리에 대한 라이트백을 감소시키는 것 | |
KR102014723B1 (ko) | 하이브리드 메모리 시스템의 버퍼 효율성을 위한 페이지 병합 방법 | |
TWI512461B (zh) | 用於混合式儲存設備的固態硬碟快取系統 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 13807299 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2013807299 Country of ref document: EP |
|
NENP | Non-entry into the national phase |
Ref country code: DE |