IP Library Granted Patent US 9,720,773
Granted Patent B2
US 9,720,773 · App. 14/638,266 · Granted Aug 1, 2017

Managing reuse information in caches

Inventor: Shubhendu Sekhar Mukherjee (Southborough, MA)
Assignee: Cavium, Inc.
G06F11/1402G06F12/0802G06F2201/805G06F2212/608
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 9,720,773
App. No.
14/638,266
Granted
Aug 1, 2017
Kind
B2
Abstract

Address translation and caching is managed using a processor that includes at least one CPU configured to run a hypervisor and at least one guest operating system. The managing includes: translating from virtual addresses to intermediate physical addresses; translating from the intermediate physical addresses to physical addresses; determining reuse information for memory pages based on estimated reuse of cache lines of data stored within the memory pages; storing the determined reuse information independently from: (1) any bits used to indicate virtual addresses, (2) any bits used to indicate intermediate physical addresses, and (3) any bits used to indicate physical addresses; and using the stored reuse information to store cache lines in a selected group of multiple groups of cache lines of a first cache.

Claims (39)

1. A method for managing address translation and caching, the method comprising:

retrieving a first memory page from a storage device in response to a page fault issued after an attempt to retrieve data in the first memory page from a physical address space of a main memory of an external memory system;

issuing the attempt to retrieve the data in the first memory page in response to a cache miss issued after an attempt to retrieve the data in the first memory page from a first cache line of a first cache of the external memory system; and

managing address translation and caching from a processor that includes (1) at least one memory management unit coupled to the external memory system, and (2) at least one central processing unit configured to run a hypervisor and at least one guest operating system, the managing including:

translating from virtual addresses in a virtual address space to intermediate physical addresses in an intermediate physical address space;

translating from the intermediate physical addresses to physical addresses in the physical address space of the main memory;

determining reuse information for memory pages based on estimated reuse of cache lines of data stored within the memory pages;

storing the determined reuse information independently from: (1) any bits used to indicate virtual addresses, (2) any bits used to indicate intermediate physical addresses, and (3) any bits used to indicate physical addresses; and

using the stored reuse information to store cache lines in a selected group of multiple groups of cache lines of the first cache.

2. The method of claim 1 , wherein the first cache comprising a set associative cache having multiple sets of cache lines, each set of cache lines having multiple ways.

3. The method of claim 2 , wherein using the stored reuse information to store cache lines in a selected group of multiple groups of cache lines of the first cache comprises using the stored reuse information to store cache lines in a selected way of the multiple ways of the multiple sets of cache lines of the first cache.

4. The method of claim 3 , wherein a first way of the multiple ways is selected to store cache lines of data stored within a memory page having a first value of the reuse information, and a second way of the multiple ways is selected to store cache lines of data stored within a memory page having a second value of the reuse information different from the first value.

5. The method of claim 1 , wherein the first cache comprises multiple independent storage regions, each independent storage region being addressed by portions of physical addresses in the physical address space.

6. The method of claim 5 , wherein using the stored reuse information to store cache lines in a selected group of multiple groups of cache lines of the first cache comprises using the stored reuse information to store cache lines in a selected storage region of the multiple independent storage regions.

7. The method of claim 1 , wherein the reuse information comprises one or more bits stored within a page table entry cached in a translation lookaside buffer.

8. The method of claim 1 , wherein the estimated reuse of cache lines of data stored within the memory pages comprises an estimated miss rate for blocks of data that are attempted to be retrieved from corresponding cache lines of the first cache.

9. The method of claim 1 , wherein determining the reuse information includes: (1) determining first reuse information by the guest operating system, and (2) determining second reuse information by the hypervisor.

10. The method of claim 9 , wherein using the stored reuse information to store cache lines in a selected group of multiple groups of cache lines of the first cache includes processing the first reuse information and the second reuse information and using a result of the processing to store cache lines in a selected group of multiple groups of cache lines of the first cache.

11. The method of claim 1 , wherein the first cache comprises a last level cache.

12. An apparatus comprising:

a storage device configured to store memory pages including a first memory page retrieved from the storage device in response to a page fault issued after an attempt to retrieve data in the first memory page from a physical address space, where the attempt to retrieve the data in the first memory page from the physical address space is issued in response to a cache miss;

an external memory system including: (1) a main memory controller coupled to main memory having the physical address space, and (2) a first cache configured to store a plurality of cache lines and to issue the cache miss after an attempt to retrieve the data in the first memory page from at least one of the cache lines; and

a processor that includes (1) at least one memory management unit coupled to the external memory system, and (2) at least one central processing unit configured to run a hypervisor and at least one guest operating system;

wherein the processor is configured to:

translate from virtual addresses in a virtual address space to intermediate physical addresses in an intermediate physical address space;

translate from the intermediate physical addresses to physical addresses in the physical address space of the main memory;

determine reuse information for memory pages based on estimated reuse of cache lines of data stored within the memory pages;

store the determined reuse information independently from: (1) any bits used to indicate virtual addresses, (2) any bits used to indicate intermediate physical addresses, and (3) any bits used to indicate physical addresses; and

use the stored reuse information to store cache lines in a selected group of multiple groups of cache lines of the first cache.

13. The apparatus of claim 12 , wherein the first cache comprising a set associative cache having multiple sets of cache lines, each set of cache lines having multiple ways.

14. The apparatus of claim 13 , wherein using the stored reuse information to store cache lines in a selected group of multiple groups of cache lines of the first cache comprises using the stored reuse information to store cache lines in a selected way of the multiple ways of the multiple sets of cache lines of the first cache.

15. The apparatus of claim 14 , wherein a first way of the multiple ways is selected to store cache lines of data stored within a memory page having a first value of the reuse information, and a second way of the multiple ways is selected to store cache lines of data stored within a memory page having a second value of the reuse information different from the first value.

16. The apparatus of claim 12 , wherein the first cache comprises multiple independent storage regions, each independent storage region being addressed by portions of physical addresses in the physical address space.

17. The apparatus of claim 16 , wherein using the stored reuse information to store cache lines in a selected group of multiple groups of cache lines of the first cache comprises using the stored reuse information to store cache lines in a selected storage region of the multiple independent storage regions.

18. The apparatus of claim 12 , wherein the reuse information comprises one or more bits stored within a page table entry cached in a translation lookaside buffer.

19. The apparatus of claim 12 , wherein the estimated reuse of cache lines of data stored within the memory pages comprises an estimated miss rate for blocks of data that are attempted to be retrieved from corresponding cache lines of the first cache.

20. The apparatus of claim 12 , wherein determining the reuse information includes: (1) determining first reuse information by the guest operating system, and (2) determining second reuse information by the hypervisor.

21. The apparatus of claim 20 , wherein using the stored reuse information to store cache lines in a selected group of multiple groups of cache lines of the first cache includes processing the first reuse information and the second reuse information and using a result of the processing to store cache lines in a selected group of multiple groups of cache lines of the first cache.

22. The apparatus of claim 12 , wherein the first cache comprises a last level cache.

Assignments (6)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 15, 2020
From: CAVIUM INTERNATIONAL
To: MARVELL ASIA PTE, LTD.
Reel/Frame 053179/0320 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 17, 2020
From: CAVIUM, LLC
To: CAVIUM INTERNATIONAL
Reel/Frame 051948/0807 →
CHANGE OF NAME Recorded Sep 27, 2018
From: CAVIUM, INC.
To: CAVIUM, LLC
Reel/Frame 047642/0935 →
RELEASE OF SECURITY INTEREST Recorded Jul 6, 2018
From: JP MORGAN CHASE BANK, N.A., AS COLLATERAL AGENT
To: CAVIUM, INC; CAVIUM NETWORKS LLC; QLOGIC CORPORATION
Reel/Frame 046496/0001 →
SECURITY AGREEMENT Recorded Aug 17, 2016
From: CAVIUM, INC.; CAVIUM NETWORKS LLC
To: JPMORGAN CHASE BANK, N.A., AS COLLATERAL AGENT
Reel/Frame 039715/0449 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 20, 2015
From: MUKHERJEE, SHUBHENDU SEKHAR
To: CAVIUM, INC.
Reel/Frame 035215/0693 →
Continuity (1)
Related Publication 20160259689A1 · Sep 8, 2016