US 12,277,071 B2
Cache replacement policy optimization for producer-consumer flows
Ramakrishna Huggahalli, Scottsdale, AZ (US); and Shachar Raindel, Redmond, WA (US)
Assigned to Microsoft Technology Licensing, LLC, Redmond, WA (US)
Filed by Microsoft Technology Licensing, LLC, Redmond, WA (US)
Filed on Mar. 28, 2022, as Appl. No. 17/706,044.
Prior Publication US 2023/0305968 A1, Sep. 28, 2023
Int. Cl. G06F 12/128 (2016.01); G06F 9/30 (2018.01); G06F 12/0804 (2016.01); G06F 12/0811 (2016.01)
CPC G06F 12/128 (2013.01) [G06F 9/30047 (2013.01); G06F 9/30101 (2013.01); G06F 12/0804 (2013.01); G06F 12/0811 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A processing unit comprising:
cache memory including a plurality of cache lines; and
a controller coupled to the cache memory and configured to:
store, for a plurality of cache lines, retention statuses that designate different respective retention levels, the different respective retention levels including at least:
a first retention level that is assigned to cache lines managed according to a first cache replacement policy based on frequency of access; and
a second retention level that provides increased protection against data displacement relative to the first retention level;
detect, at a first time, a first data production operation to store first data to a first cache line of the plurality of cache lines;
set, based on storing the first data to the first cache line, a retention status of the first cache line to the second retention level;
detect, at a second time after the first time, a first data consumption operation retrieving the first data from the first cache line; and
update, based on retrieving the first data from the first cache line, the retention status of the first cache line to the first retention level.