Method and apparatus for enabling a compiler to reduce cache misses by performing pre-fetches in the event of context switch
First Claim
1. An apparatus for reducing cache memory misses in a computer that performs context switches between at least a first context and a second context, the apparatus comprising:
- a first logic, the first logic being configured to identify at least a first prefetch region in a first memory element during compilation of a computer program by the computer;
a second logic, the second logic being configured to identify critical memory references within the first prefetch region during compilation, the critical memory references within the first prefetch region corresponding to data that may be needed in cache memory if a context switch occurs from a process or thread associated with the second context to a process or thread associated with the first context during program execution by the computer; and
a third logic, the third logic being configured to prefetch data associated with the identified critical memory references and to store the prefetched data in cache memory prior to a process or thread associated with the first context is resumed when a switch from the second context to the first context occurs during program execution.
3 Assignments
0 Petitions
Accused Products
Abstract
A method for reducing cache memory misses in a computer that performs context switches between at least a first context and a second context. A First logic identifies a first prefetch region in a first memory element and a second logic identifies critical memory references within the first prefetch region during compilation of a computer program. The critical memory references within the first prefetch region correspond to data in cache memory if a context switch occurs from a process or thread associated with the second context to a process or thread associated with the first context during program execution. Third logic prefetches data associated with the identified critical memory references and stores the prefetched data in cache memory prior to a process or thread associated with the first context being resumed when a switch from the second context to the first context occurs during program execution.
-
Citations
20 Claims
-
1. An apparatus for reducing cache memory misses in a computer that performs context switches between at least a first context and a second context, the apparatus comprising:
-
a first logic, the first logic being configured to identify at least a first prefetch region in a first memory element during compilation of a computer program by the computer;
a second logic, the second logic being configured to identify critical memory references within the first prefetch region during compilation, the critical memory references within the first prefetch region corresponding to data that may be needed in cache memory if a context switch occurs from a process or thread associated with the second context to a process or thread associated with the first context during program execution by the computer; and
a third logic, the third logic being configured to prefetch data associated with the identified critical memory references and to store the prefetched data in cache memory prior to a process or thread associated with the first context is resumed when a switch from the second context to the first context occurs during program execution. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method for reducing cache memory misses in a computer that performs context switches between at least a first context and a second context, the method comprising the steps of:
-
identifying at least a first prefetch region in a first memory element during compilation of a computer program by the computer;
identifying critical memory references within the first prefetch region during the compilation, the critical memory references within the first prefetch region corresponding to data that may be needed in cache memory if a context switch occurs from a process or thread associated with the second context to a process or thread associated with the first context during program execution by the computer; and
during program execution, prefetching data associated with the identified critical memory references and storing the prefetched data in cache memory prior to the process or thread associated with the first context being resumed when a switch from the second context to the first context occurs. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer program for reducing cache memory misses in a computer that performs context switches between at least a first context and a second context, the computer program being embodied on a computer readable medium, the computer program comprising:
-
a first code segment for identifying at least a first prefetch region in a first memory element during compilation of a computer program by the computer;
a second code segment for identifying critical memory references within the first prefetch region during the compilation, the critical memory references within the first prefetch region corresponding to data that may be needed in cache memory if a context switch occurs from a process or thread associated with the second context to a process or thread associated with the first context during program execution by the computer; and
a third code segment for prefetching data associated with the identified critical memory references and storing the prefetched data in cache memory prior to the process or thread associated with the first context being resumed when a switch from the second context to the first context occurs. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification