IP Library › Granted Patent US 12,259,820
Granted Patent B2
US 12,259,820 · App. 18/624,301 · Granted Mar 25, 2025

Processor-based system for allocating cache lines to a higher-level cache memory

Inventor: Ramkumar Srinivasan (Bangalore, IN)
Assignee: QUALCOMM Incorporated
G06F12/0897G06F12/0891G06F12/126
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,259,820
App. No.
18/624,301
Granted
Mar 25, 2025
Kind
B2
Abstract

A processor-based system for allocating a higher-level cache line in a higher-level cache memory in response to an eviction request of a lower-level cache line is disclosed. The processor-based system determines whether the cache line is opportunistic, sets an opportunistic indicator to indicate that the lower-level cache line is opportunistic, and communicates the lower-level cache line and the opportunistic indicator. The processor-based system determines, based on the opportunistic indicator of the lower-level cache line, whether a higher-level cache line of a plurality of higher-level cache lines in the higher-level cache memory has less or equal importance than the lower-level cache line. In response, the processor-based system replaces the higher-level cache line in the higher-level cache memory with the lower-level cache line and associates the opportunistic indicator with the lower-level cache line in the higher-level cache memory.

Claims (99)

1. A method for allocating a cache line to a higher-level cache memory in response to an eviction request of a lower-level cache line in a lower-level cache memory, comprising:

determining whether the lower-level cache line is opportunistic;

determining, based on whether the lower-level cache line is opportunistic, whether a higher-level cache line of a plurality of higher-level cache lines in the higher-level cache memory has less or equal importance than the lower-level cache line; and

in response to the determining the higher-level cache line has less or equal importance than the lower-level cache line:

replacing the higher-level cache line in the higher-level cache memory with the lower-level cache line; and

associating whether the lower-level cache line is opportunistic with the higher-level cache line in the higher-level cache memory.

2. The method of claim 1 , wherein determining whether the higher-level cache line of the plurality of higher-level cache lines in the higher-level cache memory has less or equal importance than the lower-level cache line comprises:

determining whether the higher-level cache line in the higher-level cache memory is invalid; and

in response to determining the higher-level cache line in the higher-level cache memory is invalid:

replacing the higher-level cache line in the higher-level cache memory with the lower-level cache line; and

associating whether the lower-level cache line is opportunistic with the higher-level cache line in the higher-level cache memory.

3. The method of claim 1 , further comprising, in response to determining whether the higher-level cache line in the higher-level cache memory is not invalid:

determining whether the higher-level cache line in the higher-level cache memory is opportunistic; and

in response to determining the higher-level cache line is opportunistic:

replacing the higher-level cache line in the higher-level cache memory with the lower-level cache line; and

associating whether the lower-level cache line is opportunistic with the higher-level cache line in the higher-level cache memory.

4. The method of claim 3 , comprising, in response to determining whether the higher-level cache line in the higher-level cache memory is not opportunistic:

determining whether the lower-level cache line is dirty; and

in response to determining the lower-level cache line is dirty:

writing the lower-level cache line to a system memory.

5. The method of claim 1 , wherein determining whether the higher-level cache line in the higher-level cache memory has less or equal importance than the lower-level cache line further comprises:

determining if a first higher-level cache line has less or equal importance than the lower-level cache line;

determining if a second higher-level cache line has less or equal importance than the lower-level cache line; and

in response to determining the first higher-level cache line has less or equal importance than the lower-level cache line and the second higher-level cache line has less or equal importance than the lower-level cache line:

determining if the first higher-level cache line has less or equal importance than the second higher-level cache line; and

in response to determining that the first higher-level cache line has less or equal importance than the second higher-level cache line:

replacing the first higher-level cache line in the higher-level cache memory with the lower-level cache line; and

associating whether the lower-level cache line is opportunistic with the first higher-level cache line in the higher-level cache memory.

6. The method of claim 5 , wherein determining if the first higher-level cache line has less or equal importance than the second higher-level cache line further comprises:

determining if the first higher-level cache line is invalid;

determining if the second higher-level cache line is invalid; and

in response to determining that the first higher-level cache line is invalid and the second higher-level cache line is not invalid:

replacing the first higher-level cache line in the higher-level cache memory with the lower-level cache line; and

associating whether the lower-level cache line is opportunistic with the first higher-level cache line in the higher-level cache memory.

7. The method of claim 6 , further comprising, in response to determining that the first higher-level cache line is not invalid and the second higher-level cache line is not invalid:

determining a first priority indicator of the first higher-level cache line and a second priority indicator of the second higher-level cache line; and

in response to determining that the first priority indicator of the first higher-level cache line is less recently used than the second priority indicator of the second higher-level cache line:

replacing the first higher-level cache line in the higher-level cache memory with the lower-level cache line; and

associating whether the lower-level cache line is opportunistic with the first higher-level cache line in the higher-level cache memory.

8. The method of claim 6 , comprising, in response to determining that the first higher-level cache line is not invalid and the second higher-level cache line is not invalid:

determining a least recently used (LRU) indicator tracking an order of a plurality of least recently used cache lines, including the first higher-level cache line and the second higher-level cache line; and

in response to determining that the LRU indicator indicates the first higher-level cache line is less recently used than the second higher-level cache line:

replacing the first higher-level cache line in the higher-level cache memory with the lower-level cache line; and

associating whether the lower-level cache line is opportunistic with the first higher-level cache line in the higher-level cache memory.

9. A processor-based system for allocating a cache line to a higher-level cache memory in response to an eviction request of a lower-level cache line in a lower-level cache memory, comprising:

means for determining whether the lower-level cache line is opportunistic;

means for determining, based on whether the lower-level cache line is opportunistic, whether a higher-level cache line of a plurality of higher-level cache lines in the higher-level cache memory has less or equal importance than the lower-level cache line; and

in response to the determining the higher-level cache line has less or equal importance than the lower-level cache line:

means for replacing the higher-level cache line in the higher-level cache memory with the lower-level cache line; and

means for associating whether the lower-level cache line is opportunistic with the higher-level cache line in the higher-level cache memory.

10. A processor-based system for allocating a cache line to a higher-level cache memory, comprising:

a lower-level cache memory configured to store data;

the processor-based system configured to, in response to an eviction request of a lower-level cache line in the lower-level cache memory:

determine whether the lower-level cache line is opportunistic;

determine, based on whether the lower-level cache line is opportunistic, whether a higher-level cache line of a plurality of higher-level cache lines in the higher-level cache memory has less or equal importance than the lower-level cache line; and

in response to determining the higher-level cache line has less or equal importance than the lower-level cache line:

replace the higher-level cache line in the higher-level cache memory with the lower-level cache line; and

associate whether the lower-level cache line is opportunistic with the higher-level cache line.

11. The processor-based system of claim 10 , configured to determine whether the higher-level cache line of the plurality of higher-level cache lines in the higher-level cache memory has less or equal importance than the lower-level cache line by being configured to:

determine whether the higher-level cache line in the higher-level cache memory is invalid; and

in response to determining the higher-level cache line in the higher-level cache memory is invalid:

replace the higher-level cache line in the higher-level cache memory with the lower-level cache line; and

associate whether the lower-level cache line is opportunistic with the higher-level cache line in the higher-level cache memory.

12. The processor-based system of claim 11 , further configured, in response to determining the higher-level cache line in the higher-level cache memory is not invalid, to:

determine whether the higher-level cache line in the higher-level cache memory is opportunistic; and

in response to the determining the higher-level cache line is opportunistic:

replace the higher-level cache line in the higher-level cache memory with the lower-level cache line; and

associate whether the lower-level cache line is opportunistic with the higher-level cache line in the higher-level cache memory.

13. The processor-based system of claim 12 , further configured, in response to determining the higher-level cache line in the higher-level cache memory is not opportunistic, to:

determine whether the lower-level cache line is dirty; and

in response to determining that the lower-level cache line is dirty:

write the lower-level cache line to a system memory.

14. The processor-based system of claim 10 , wherein the lower-level cache line is opportunistic.

15. The processor-based system of claim 10 , configured to determine whether the higher-level cache line in the higher-level cache memory has less or equal importance than the lower-level cache line by being configured to:

determine if a first higher-level cache line has less or equal importance than the lower-level cache line;

determine if a second higher-level cache line has less or equal importance than the lower-level cache line; and

in response to determining the first higher-level cache line has less or equal importance than the lower-level cache line and the second higher-level cache line has less or equal importance than the lower-level cache line:

determine if the first higher-level cache line has less or equal importance than the second higher-level cache line; and

in response to determining that the first higher-level cache line has less or equal importance than the second higher-level cache line:

replace the first higher-level cache line in the higher-level cache memory with the lower-level cache line; and

associate whether the lower-level cache line is opportunistic with the first higher-level cache line in the higher-level cache memory.

16. The processor-based system of claim 15 , configured to determine if the first higher-level cache line has less or equal importance than the second higher-level cache line by being configured to:

determine if the first higher-level cache line is invalid;

determine if the second higher-level cache line is not invalid; and

in response to determining that the first higher-level cache line is invalid and the second higher-level cache line is not invalid:

replace the first higher-level cache line in the higher-level cache memory with the lower-level cache line; and

associate whether the lower-level cache line is opportunistic with the first higher-level cache line in the higher-level cache memory.

17. The processor-based system of claim 16 , further configured, in response to determining that the first higher-level cache line is not invalid and the second higher-level cache line is not invalid, to:

determine a first priority indicator of the first higher-level cache line and a second priority indicator of the second higher-level cache line; and

in response to determining that the first priority indicator of the first higher-level cache line is less recently used than the second priority indicator of the second higher-level cache line:

replace the first higher-level cache line in the higher-level cache memory with the lower-level cache line; and

associate whether the lower-level cache line is opportunistic with the first higher-level cache line in the higher-level cache memory.

18. The processor-based system of claim 16 , further configured, in response to determining that the first higher-level cache line is not invalid and the second higher-level cache line is not invalid, to:

determine a least recently used (LRU) indicator tracking an order of a plurality of least recently used cache lines, including the first higher-level cache line and the second higher-level cache line; and

in response to determining that the LRU indicator indicates the first higher-level cache line is less recently used than the second higher-level cache line:

replace the first higher-level cache line in the higher-level cache memory with the lower-level cache line; and

associate whether the lower-level cache line is opportunistic with the first higher-level cache line in the higher-level cache memory.

19. The processor-based system of claim 10 integrated into an integrated circuit (IC).

20. The processor-based system of claim 10 integrated into a device selected from a group consisting of: a set-top box; an entertainment unit; a navigation device; a communications device; a fixed location data unit; a mobile location data unit; a global positioning system (GPS) device; a mobile phone; a cellular phone; a smartphone; a session initiation protocol (SIP) phone; a tablet; a phablet; a server; a computer; a portable computer; a mobile computing device; a wearable computing device; a desktop computer; a personal digital assistant (PDA); a monitor; a computer monitor; a television; a tuner; a radio; a satellite radio; a music player; a digital music player; a portable music player; a digital video player; a video player; a digital video disc (DVD) player; a portable digital video player; an automobile; a vehicle component; an avionics system; a drone; and a multicopter.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 2, 2024
From: SRINIVASAN, RAMKUMAR
To: QUALCOMM INCORPORATED
Reel/Frame 066975/0337 →
Continuity (3)
Continuation 18169852 · Feb 15, 2023
Provisional Application 63387519 · Dec 15, 2022
Related Publication 20240248851A1 · Jul 25, 2024
References Cited (29)
US 8782348B2 · Eddy et al. · 2014 [cited by applicant]
US 9606935B2 · Rao et al. · 2017 [cited by applicant]
US 10223278B2 · Priyadarshi et al. · 2019 [cited by applicant]
US 10671539B2 · Thompto et al. · 2020 [cited by applicant]
US 10754784B1 · Jakkula · 2020 [cited by examiner]
US 20070067578A1 · Kurichiyath · 2007 [cited by examiner]
US 20090094418A1 · Warner et al. · 2009 [cited by applicant]
US 20100235576A1 · Guthrie et al. · 2010 [cited by applicant]
US 20100312970A1 · Bell · 2010 [cited by examiner]
US 20110161589A1 · Guthrie et al. · 2011 [cited by applicant]
US 20140168244A1 · Akenine-Moller et al. · 2014 [cited by applicant]
US 20140189240A1 · Keppel et al. · 2014 [cited by applicant]
US 20140281131A1 · Joshi · 2014 [cited by examiner]
US 20160182351A1 · Wang et al. · 2016 [cited by applicant]
US 20160378651A1 · Dulloor et al. · 2016 [cited by applicant]
US 20190155733A1 · Hagersten · 2019 [cited by examiner]
US 20220350751A1 · Koker et al. · 2022 [cited by applicant]
US 20240160570A1 · Tkachuk et al. · 2024 [cited by applicant]
US 20240202131A1 · Srinivasan · 2024 [cited by applicant]
GB 2540761A · 2017 [cited by examiner]
WO WO2007096572A1 · 2007 [cited by examiner]
WO WO2020190796A1 · 2020 [cited by examiner]
J. Gaur, A. R. Alameldeen and S. Subramoney, “Base-Victim Compression: An Opportunistic Cache Compression Architecture,” 2016 ACM/IEEE 43rd Annual International Symposium on Computer Architecture (ISCA), Seoul, Korea (S… [cited by examiner]
E. Speight, H. Shafi, Lixin Zhang and R. Rajamony, “Adaptive mechanisms and policies for managing cache hierarchies in chip multiprocessors,” 32nd International Symposium on Computer Architecture (ISCA'05), Madison, WI,… [cited by examiner]
Zhenlin Wang, K. S. McKinley, A. L. Rosenberg and C. C. Weems, “Using the compiler to improve cache replacement decisions,” Proceedings. International Conference on Parallel Architectures and Compilation Techniques, Cha… [cited by examiner]
T. Sondag and H. Rajan, “A More Precise Abstract Domain for Multi-level Caches for Tighter WCET Analysis,” 2010 31st IEEE Real-Time Systems Symposium, San Diego, CA, USA, 2010, pp. 395-404. [cited by examiner]
Gaur J., et al., “Base-Victim Compression: An Opportunistic Cache Compression Architecture”, 2016 ACM/IEEE 43rd Annual International Symposium on Computer Architecture (ISCA), Seoul, Korea (South), 2016, pp. 317-328. [cited by applicant]
Ghosh M., et al., “Virtual Exclusion: An Architectural Approach to Reducing Leakage Energy in Caches for Multiprocessor Systems”, 2007 International Conference on Parallel and Distributed Systems, Hsinchu, Taiwan, 2007,… [cited by applicant]
International Search Report and Written Opinion for International Patent Application No. PCT/US2023/081158, mailed Mar. 14, 2024, 13 pages. [cited by applicant]