Data prefetching method and terminal device

US11586544B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11586544-B2
Application numberUS-201917263197-A
CountryUS
Kind codeB2
Filing dateJul 23, 2019
Priority dateJul 27, 2018
Publication dateFeb 21, 2023
Grant dateFeb 21, 2023

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 prefetching method and a terminal device are provided. The CPU core cluster is configured to deliver a data access request to a first cache of the at least one level of cache, where the data access request carries a first address, and the first address is an address of data that the CPU core cluster currently needs to access in the memory. The prefetcher in the terminal device provided in embodiments of this application may generate a prefetch-from address, and load data corresponding to the generated prefetch-from address to the first cache. When needing to access the data, the CPU core cluster can read from the first cache, without a need to read from the memory. This helps increase an operating rate of the CPU core cluster.

First claim

Opening claim text (preview).

What is claimed is: 1. A terminal device, comprising: a CPU core cluster; at least one level of cache; a prefetcher; and a memory, wherein the CPU core cluster is configured to deliver a data access request to a first cache of the at least one level of cache, wherein the data access request carries a first address, and the first address is an address of data that the CPU core cluster currently needs to access in the memory; and the prefetcher is configured to: generate a first address offset based on a first prefetching algorithm and an address carried in a historical data access request; generate a first prefetch-from address based on the first address offset and the first address; and load, from the memory to the first cache based on the first prefetch-from address, data corresponding to the first prefetch-from address. 2. The terminal device according to claim 1 , wherein the first cache is a last level cache of the at least one level of cache. 3. The terminal device according to claim 1 , wherein the at least one level of cache comprises two levels of cache, and the first cache is a level 2 cache of the two levels of cache; and the CPU core cluster being configured to deliver the data access request to the first cache comprises: the CPU core cluster being configured to deliver the data access request to a level 1 cache of the two levels of cache, wherein a cache controller of the level 1 cache is configured to send the data access request to the level 2 cache when determining that the data corresponding to the first address does not exist in the level 1 cache; or the CPU core cluster being configured to deliver the data access request to the first cache comprises: the CPU core cluster being configured to deliver the data access request to a level 1 cache of the two levels of cache, wherein the cache controller of the level 1 cacheb is configured to feed back response information to the CPU core cluster when determining that the data corresponding to the first address does not exist in the level 1 cache; and the CPU core cluster delivers the data access request to the level 2 cache of the two levels of cache after receiving the response information. 4. The terminal device according to claim 1 , wherein the prefetcher is configured to store a plurality of prefetching algorithms, and the prefetcher is configured to determine the first prefetching algorithm from the plurality of prefetching algorithms based on an application program currently running on the terminal device. 5. The terminal device according to claim 1 , wherein the prefetcher is configured to determine the first prefetching algorithm based on a hit rate or a miss rate during data prefetching, wherein the hit rate is a ratio of data that is of prefetched data and that is accessed by the CPU core cluster to the prefetched data, and the miss rate is a ratio of data that is of the prefetched data and that is not accessed by the CPU core cluster to the prefetched data. 6. The terminal device according to claim 1 , wherein the prefetcher includes N prefetching algorithms, each prefetching algorithm takes effect in one period, and the prefetcher is further configured to: perform data prefetching in each of N periods based on a prefetching algorithm that takes effect in the period; determine a first hit rate of data prefetching performed based on the prefetching algorithm that takes effect in each of the N periods, to obtain N first hit rates; and determine a highest first hit rate of the N first hit rates, and determine that a prefetching algorithm corresponding to the highest first hit rate is the first prefetching algorithm, wherein the first hit rate is a ratio, to the prefetched data, of data that is of the prefetched data and that is accessed by the CPU core cluster after the prefetched data is stored to the first cache by the prefetcher based on the prefetching algorithm that takes effect in the period. 7. The terminal device according to claim 1 , wherein the memory is a double data rate synchronous dynamic random access memory (DDR SDRAM). 8. The terminal device according to claim 1 , wherein the at least one level of cache comprises three levels of cache; and the CPU core cluster being configured to deliver the data access request to the first cache comprises: the CPU core cluster being configured to deliver the data access request to a level 1 cache of the three levels of cache, wherein a cache controller of the level 1 cache is configured to send the data access request to the level 2 cache when determining that the data corresponding to the first address does not exist in the level 1 cache; and a cache controller of the level 2 cache being configured to send the data access request to the level 3 cache when determining that the data corresponding to the first address does not exist in the level 2 cache; or the CPU core cluster being configured to deliver the data access request to the first cache comprises: the CPU core cluster being configured to deliver the data access request to a level 1 cache of the three levels of cache, wherein the cache controller of the level 1 cache is configured to send the data access request to the level 2 cache when determining that the data corresponding to the first address does not exist in the level 1 cache; the cache controller of the level 2 cache being configured to feedback response information to the CPU core cluster when determining that the data corresponding to the first address does not exist in the level 2 cache; and the CPU core cluster being further configured to deliver the data access request to the level 3 cache of the three levels of cache after receiving the response information. 9. A data prefetching method, comprising: delivering a data access request to a first cache of at least one level of cache, wherein the data access request carries a first address, and the first address is an address of data that a CPU core cluster currently needs to access in a memory; generating a first address offset based on a first prefetching algorithm and an address carried in a historical data access request generating a first prefetch-from address based on the first address offset and the first address; and loading, from the memory to the first cache based on the first prefetch-from address, data corresponding to the first prefetch-from address. 10. The method according to claim 9 , wherein the first cache is a last level cache of the at least one level of cache. 11. The method according to claim 9 , wherein if the at least one level of cache comprises two levels of cache, the first cache is a level 2 cache in the two levels of cache; and the delivering the data access request to the first cache comprises: delivering the data access request to a level 1 cache of the two levels of cache, wherein a cache controller of the level 1 cache is configured to send the data access request to the level 2 cache when determining that the data corresponding to the first address does not exist in the level 1 cache; or the delivering the data access request to the first cache comprises: delivering the data access request to the level 1 cache of the two levels of cache, wherein the cache controller of the level 1 cache is configured to generate response information when determining that the data corresponding to the first address does not exist in the level 1 cache; and delivering the data access request to the level 2 cache of the two levels of cache based on the response information. 12. The method according to claim 9 , wherein before generating the first prefetch-from address, the method further comprises: determining the f

Assignees

Inventors

Classifications

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 US11586544B2 cover?
A data prefetching method and a terminal device are provided. The CPU core cluster is configured to deliver a data access request to a first cache of the at least one level of cache, where the data access request carries a first address, and the first address is an address of data that the CPU core cluster currently needs to access in the memory. The prefetcher in the terminal device provided i…
Who is the assignee on this patent?
Huawei Tech Co Ltd
What technology area does this patent fall under?
Primary CPC classification G06F12/0877. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Feb 21 2023 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).