Lazy flushing of translation lookaside buffers
First Claim
1. A method of clearing obsolete entries from a first one of a plurality of mapping caches, each of the plurality of mapping caches being associated with a corresponding one of a plurality of processing units of a computing device, each of the caches being used to translate virtual addresses to physical addresses and storing mappings based on an address translation map, the method comprising:
- maintaining a counter;
updating said counter each time the first one of the plurality of mapping caches is flushed;
recording said counter'"'"'s value in response to a change in the address translation map, whereby a recorded counter value is stored;
determining, based on a comparison of said counter'"'"'s value with the recorded counter value, that the first one of the plurality of mapping caches has not definitely been flushed since said change in the address translation map occurred; and
flushing the first one of the plurality of mapping caches.
1 Assignment
0 Petitions
Accused Products
Abstract
Address translation control (ATC) limits the mappings between virtual and physical addresses in order to implement a memory access policy. Each processor in a multi-processor system maintains a translation lookaside buffer (TLB) that caches mappings to speed translation of virtual addresses. Each processor also maintains a counter. Each time a processor'"'"'s TLB is flushed, the processor'"'"'s counter is incremented. When a link to a page is removed from an address translation map, the counter values for all of the processors are recorded. When that page is accessed by a processor, the recorded counter values are compared with the processor'"'"'s current counter value to determine whether the processor'"'"'s TLB has been flushed since the link to the page was removed from the map. An expensive TLB flush operation is delayed until needed, but still occurs early enough to prevent an invalid TLB entry from being used to violate the access policy.
33 Citations
28 Claims
-
1. A method of clearing obsolete entries from a first one of a plurality of mapping caches, each of the plurality of mapping caches being associated with a corresponding one of a plurality of processing units of a computing device, each of the caches being used to translate virtual addresses to physical addresses and storing mappings based on an address translation map, the method comprising:
-
maintaining a counter;
updating said counter each time the first one of the plurality of mapping caches is flushed;
recording said counter'"'"'s value in response to a change in the address translation map, whereby a recorded counter value is stored;
determining, based on a comparison of said counter'"'"'s value with the recorded counter value, that the first one of the plurality of mapping caches has not definitely been flushed since said change in the address translation map occurred; and
flushing the first one of the plurality of mapping caches. - View Dependent Claims (2, 3, 4, 5, 6, 9, 10)
-
-
7-8. -8. (canceled)
-
11-17. -17. (canceled)
-
18. A computer-readable medium having encoded thereon computer-executable instructions to perform a method of managing the flushing of a translation lookaside buffer that caches address mappings, the method comprising:
-
receiving an access request that indicates a target location by virtual address;
translating said virtual address to obtain a physical address of said target location;
comparing (1) a stored counter value associated with a page that comprises said target address with (2) a current counter value;
determining based on the comparison between said stored counter value and said current counter value that the translation lookaside buffer has not been flushed since an event affecting a mapping of said page; and
flushing the translation lookaside buffer. - View Dependent Claims (19, 22)
-
-
20-21. -21. (canceled)
-
23. A method of clearing obsolete entries from a first one of a plurality of mapping caches, each of the plurality of mapping caches being associated with a corresponding one of a plurality of processing units of a computing device, each of the caches being used to translate virtual addresses to physical addresses and storing mappings based on an address translation map, the method comprising:
-
maintaining an object based on which the sequential progression of events can be determined;
recording said object'"'"'s value in response to a change to the address translation map that removes one or more of, (1) read access, or (2) read/write access, from a page, whereby a recorded value is created;
in response to a request to access said page, determining based on a comparison of said object'"'"'s current value with the recorded value that the first one of the plurality of mapping caches has been flushed since said change occurred; and
if it cannot be determined with certainty based on said comparison that the first one of the plurality of mapping caches has been flushed since said change occurred, then flushing the first one of the plurality of mapping caches. - View Dependent Claims (24, 25, 26, 27, 28)
-
Specification