Data caching method and computer system

US10241919B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10241919-B2
Application numberUS-201615347776-A
CountryUS
Kind codeB2
Filing dateNov 9, 2016
Priority dateMay 9, 2014
Publication dateMar 26, 2019
Grant dateMar 26, 2019

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A data caching method and a computer system are provided. In the method, when a miss of an access request occurs and a cache needs to determine a to-be-replaced cache line, not only a historical access frequency of the cache line but also a type of a memory corresponding to the cache line needs to be considered. A cache line corresponding to a DRAM type may be preferably replaced, which reduces a caching amount in the cache for data stored in a DRAM and relatively increase a caching amount for data stored in an NVM. For an access request for accessing the data stored in the NVM, corresponding data can be found in the cache whenever possible, thereby reducing cases of reading data from the NVM. Thus, a delay in reading data from the NVM is reduced, and access efficiency is effectively improved.

First claim

Opening claim text (preview).

What is claimed is: 1. A data caching method performed by a cache processor, comprising: receiving a data access request for accessing a first data from a processor in a computer system, wherein the computer system comprises a hybrid memory comprising a dynamic random access memory (DRAM) and a nonvolatile memory (NVM); determining, according to a historical access frequency of a cache line in the cache and a type of a memory corresponding to the cache line, that a plurality of cache lines in the cache meet a first preset condition and the first data is not cached in the cache, wherein the cache lines that meet the first preset condition correspond to the DRAM and each has a historical access frequency that is lower than a preset frequency; selecting a first cache line from the cache lines that meet the first preset condition; reading the first data from the hybrid memory according to an access address in the access request; and replacing the first cache line with a second cache line, the second cache line comprising the first data. 2. The method of claim 1 , wherein: the determining that a plurality of cache lines in the cache meet the first preset condition comprises determining that the cache lines corresponding to the DRAM are in first M cache lines in a least recently used (LRU) linked list of the cache, each of the first M cache lines being cache lines having a historical access frequency that is lower than the preset frequency, and M being an integer value that is greater than or equal to 2; and the selecting the first cache line from the cache lines that meet the first preset condition comprises selecting, as the first cache line, a determined cache line corresponding to the DRAM from the first M cache lines when the cache lines corresponding to the DRAM are in the first M cache lines. 3. The method of claim 2 , wherein the determining that the cache lines corresponding to the DRAM are in the first M cache lines comprises determining, according to a location flag bit of each of the first M cache lines in the cache, whether the cache lines corresponding to the DRAM are in the first M cache lines, the location flag bit of the each of the first M cache lines indicating whether a memory corresponding to the each cache line is the DRAM or the NVM. 4. The method of claim 1 , further comprising recording, according to a memory corresponding to the access address, a type of the memory corresponding to the second cache line in a location flag bit of the second cache line. 5. A data caching method performed by a cache processor, comprising: receiving a data access request for accessing a first data from a processor in a computer system including a hybrid memory, the data access request comprising an access address, and the hybrid memory comprising a dynamic random access memory (DRAM) and a nonvolatile memory (NVM); determining, according to a historical access frequency of a cache line in the cache and a type of a memory corresponding to the cache line, that a plurality of cache lines that meet a first preset condition are not in the cache and the first data is not cached in the cache, the cache lines that meet the first preset condition corresponding to the DRAM and each having a historical access frequency that is lower than a preset frequency; determining a plurality of cache lines that meet a second preset condition are in the cache, the cache lines that meet the second preset condition comprising a plurality of unmodified cache lines corresponding to the NVM and each having a historical access frequency that is lower than the preset frequency; selecting a first cache line from the cache lines that meet the second preset condition; reading the first data from the hybrid memory according to the access address; and replacing the first cache line with a second cache line, the second cache line comprising the first data. 6. The method of claim 5 , wherein the determining the cache lines that meet a first preset condition are not in the cache comprises: determining the cache lines corresponding to the DRAM are not in first M cache lines in a least recently used (LRU) linked list of the cache, each of the first M cache lines being cache lines having a historical access frequency that is lower than the preset frequency, and M being an integer value that is greater than or equal to 2. 7. The method of claim 6 , wherein the determining the cache lines corresponding to the DRAM are not in the first M cache lines comprises determining, according to a location flag bit of each of the first M cache lines in the cache, the cache lines corresponding to the DRAM are not in the first M cache lines, the location flag bit of the each of the first M cache lines indicating whether a memory corresponding to the each cache line is the DRAM or the NVM. 8. The method of claim 7 , wherein the determining the plurality of cache lines that meet the second preset condition are in the cache comprises determining the cache lines that correspond to the NVM and comprise a modify flag bit indicating that the cache lines are unmodified are in first N cache lines in the LRU linked list of the cache, the first N cache lines being cache lines that each have a historical access frequency that is lower than the preset frequency, N being an integer value that is greater than 0 and less than M; wherein the selecting the first cache line from the cache lines that meet the second preset condition comprises selecting, as the first cache line, a determined cache line corresponding to the NVM and comprising the modify flag bit indicating that the cache line is unmodified from the first N cache lines. 9. The method of claim 5 , further comprising determining that a cache line at the most front end of the LRU linked list is the first cache line when the cache lines that meet the second preset condition are not in the cache. 10. The method of claim 5 , further comprising recording, according to a memory corresponding to the access address, a type of the memory corresponding to the second cache line in a location flag bit of the second cache line. 11. A computer system, comprising: a processor, a hybrid memory comprising a dynamic random access memory (DRAM) and a nonvolatile memory (NVM); a cache comprising a cache processor coupled to the processor in the computer system and the hybrid memory, the cache processor configured to: receive a data access request for accessing a first data from the processor, the data access request comprising an access address; determine, according to a historical access frequency of a cache line in the cache and a type of a memory corresponding to the cache line, whether cache lines in the cache meet a first preset condition when the first data is not cached in the cache, the cache lines that meet the first preset condition corresponding to the DRAM and each having a historical access frequency that is lower than a preset frequency and; select a first cache line from the cache lines that meet the first preset condition when the cache lines that meet the first preset condition are in the cache; read the first data from the hybrid memory according to the access address; and replace the first cache line with a second cache line, the second cache line comprising the first data. 12. The computer system of claim 11 , wherein the cache processor is configured to: determine whether the cache lines corresponding to the DRAM are in first M cache lines in a least recently used (LRU) linked list of the cache, each of the first M cache lines being cache lines having a historical access frequency that is lower than the preset frequency, and M being an integer value that is greater than

Assignees

Inventors

Classifications

  • Replication mechanisms · CPC title

  • in relation to data integrity, e.g. data losses, bit errors · CPC title

  • G06F3/061Primary

    Improving I/O performance · CPC title

  • of the least frequently used [LFU] type, e.g. with individual count value · CPC title

  • by allocating resources to storage systems · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10241919B2 cover?
A data caching method and a computer system are provided. In the method, when a miss of an access request occurs and a cache needs to determine a to-be-replaced cache line, not only a historical access frequency of the cache line but also a type of a memory corresponding to the cache line needs to be considered. A cache line corresponding to a DRAM type may be preferably replaced, which reduces…
Who is the assignee on this patent?
Huawei Tech Co Ltd
What technology area does this patent fall under?
Primary CPC classification G06F3/061. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Mar 26 2019 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 1 related publication on this page (citations in our corpus or others sharing the same primary CPC).