IP Library Granted Patent US 8,543,766
Granted Patent B2
US 8,543,766 · App. 13/157,549 · Granted Sep 24, 2013

Writing data to system memory in a data processing system in which cache line states are tracked

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 8,543,766
App. No.
13/157,549
Granted
Sep 24, 2013
Kind
B2
Abstract

A state indicator associated with a cache line is stored, wherein the cache line is one of a plurality of cache lines each associated with a corresponding unique section of a region of system memory. The state indicator comprises a dirty indication indicating that the cache line is a candidate for writing data stored in the cache line to the associated section of the region of system memory. The state indicator is one of a plurality of state indicators each associated with a corresponding cache line. For the region of system memory, a number of the plurality of state indicators that comprises the dirty indication is determined, and if a threshold is exceeded, data stored in a selected cache line is written to the associated section of the region of system memory, and a clean indication is stored in the state indicator corresponding to the cache line.

Claims (82)

1. A method comprising:

storing a state indicator associated with a cache line wherein the state indicator is stored in a tracking entry associated with a region of system memory, wherein

the cache line is one of a plurality of cache lines each associated with a corresponding unique section of the region of system memory, wherein the plurality of cache lines includes N cache lines in which N is a number of cache lines needed to store all of the region of system memory,

the state indicator is one of a plurality of state indicators each associated with a corresponding cache line of the plurality of cache lines such that every cache line of the plurality of cache lines has an associated state indicator of the plurality of state indicators; and

the tracking entry comprises each of the plurality of state indicators, wherein each state indicator comprises:

a dirty indication when the associated cache line is a candidate for writing data stored in the cache line to the associated section of the region of system memory, and

a clean indication when the associated cache line is not a candidate for writing data stored in the cache line to the associated section of the region of system memory,

determining, for the region of system memory, a number of the plurality of state indicators that comprise the dirty indication; and

if the determined number of dirty indications exceeds a threshold, then selecting a cache line,

writing the data stored in the cache line to the associated section of the region of system memory, and

storing a clean indication in the state indicator corresponding to the cache line, wherein the clean indication identifies that the cache line is not a candidate for writing data stored in the cache line to the associated section of the region of system memory.

2. The method of claim 1 further comprising:

performing said selecting the cache line, said writing the data stored in the cache line, and said storing a clean indication for a selected number of cache lines associated with the region of system memory, each of the selected number of cache lines having an associated state indicator comprising the dirty indication, if the determined number of dirty indications exceeds the threshold.

3. The method of claim 1 further comprising:

storing the tracking entry in a tracking array, wherein

the tracking array comprises a plurality of tracking entries, and

each of the plurality of tracking entries is associated with a unique region of system memory.

4. The method of claim 3 further comprising:

performing said determining and said selecting using a cache cleaning control circuitry coupled to a memory storing the tracking array.

5. The method of claim 3 further comprising:

storing the number of state indicators that comprise the dirty indication in a counter associated with the tracking entry, wherein

said storing is performed for each of the plurality of tracking entries.

6. The method of claim 3 further comprising:

receiving a memory access message comprising an access address and one or more attributes associated with the memory access;

if no tracking entry matches a region of system memory referred to in the access address, then allocating a new entry in the tracking array, wherein the new entry corresponds to the region of system memory referred to in the access address, if the one or more attributes provide that the memory access message causes a cache line to become a candidate for writing data stored in the cache line to the associated section of the region of system memory; and

performing said storing the state indicator associated with the cache line, if the one or more attributes provide that the memory access message causes the cache line to become a candidate for writing data stored in the cache line to the associated section of the region of system memory, wherein

the state indicator is stored in one of the new entry in the tracking array or a tracking entry that matches the region of system memory referred to in the access address.

7. The method of claim 6 further comprising:

storing a clean indication in the state indicator corresponding to the cache line, if the one or more attributes provide that the memory access message indicates an intent to make the cache line become a candidate for writing data stored in the cache line as a result of a subsequent access.

8. The method of claim 7 further comprising

incrementing the number of the plurality of state indicators that comprise the dirty indication for the associated tracking entry, if the one or more attributes provide that the memory access message causes the cache line to become a candidate for writing data stored in the cache line to the associated section of the region of system memory; and

decrementing the number of the plurality of state indicators that comprise the dirty indication for the associated tracking entry, if the one or more attributes provide that the memory access message indicates an intent to make the cache line become a candidate for writing data stored in the cache line as a result of a subsequent access.

9. The method of claim 1 wherein one or more of a system cache memory and processor cache memories, each corresponding to a processor, comprise the plurality of cache lines.

10. A system comprising:

one or more masters, each master comprising one of a processor or a peripheral device;

a system memory comprising a plurality of system memory banks, wherein

each system memory bank comprises a plurality of unique rows, and

each row corresponds to a region of the system memory;

one or more cache memories, coupled to the one or more masters, and storing a plurality of cache lines, wherein

each cache line is associated with a corresponding unique section of a row of the plurality of rows,

each cache line is configured to store data associated with the corresponding unique section of a row for access by the one or more processors, and

the one or more cache memories comprise one or more of a system cache and a dedicated cache associated with a corresponding processor; and

a cache cleaning circuitry, coupled to the one or more cache memories, and configured to

store a plurality of state indicators each associated with a corresponding cache line of the plurality of cache lines, wherein each state indicator comprises one of a dirty indication that the corresponding cache line is a candidate for writing data stored in the cache line to the corresponding unique section of the row or a clean indication that the corresponding cache line is not a candidate for writing data stored in the cache line,

select a row having a number of state indicators comprising the dirty indication exceeding a threshold, and

for the selected row, select one or more cache lines each having a corresponding state indicator comprising the dirty indication, write the data stored in the selected cache lines to the corresponding sections of the row, and store a clean indication in the state indicator,

wherein the state indicator is stored in a tracking entry associated with the row, wherein the tracking entry comprises N state indicators of the plurality of state indicators associated with the cache lines associated with the row, in which N represents a number of cache lines needed to store all of the row.

11. The system of claim 10 wherein the cache cleaning circuitry further comprises:

a tracking array memory storing a tracking array, wherein

the tracking array comprises a plurality of tracking entries, and

each of the plurality of tracking entries is associated with a unique row.

12. The system of claim 11 wherein the cache cleaning circuitry is further configured to:

store a number of dirty indications for a tracking entry in a counter associated with the tracking entry.

13. The system of claim 11 wherein the cache cleaning circuitry is further configured to:

receive a memory access message from a master of the one or more masters, wherein the memory access message comprises an access address and one or more attributes associated with the memory access;

determine if a tracking entry matches a row referred to in the access address;

allocate a new entry in the tracking array corresponding to the row referred to in the access address,

if no tracking entry matches the row referred to in the access address, and

if the one or more attributes provide that the memory access message causes a cache line to become a candidate for writing data stored in the cache line to the associated section of the row;

perform said storing the state indicator associated with the cache line, if the one or more attributes provide that the memory access message causes the cache line to become a candidate for writing data stored in the cache line to the associated section of the row, wherein

the state indicator is stored in one of the new entry in the tracking array or a tracking entry that matches the row referred to in the access address; and

increment the number of state indicators comprising the dirty indication for the associated tracking entry, if the one or more attributes provide that the memory access message causes the cache line to become a candidate for writing data stored in the cache line to the associated section of the row.

14. The system of claim 13 wherein the cache cleaning circuitry is further configured to:

store a clean indication in the state indicator associated with the cache line, if the one or more attributes provide that the memory access message indicates an intent to make the cache line become a candidate for writing data stored in the cache line as a result of a subsequent access; and

decrement the number of state indicators comprising the dirty indication for the associated tracking entry, if the one or more attributes provide that the memory access message indicates an intent to make the cache line become a candidate for writing data stored in the cache line as a result of a subsequent access.

15. The system of claim 10 wherein the tracking entry comprises a bit field wherein one or more bits in the bit field stores one of the N state indicators.

16. The system of claim 10 , wherein

each of the plurality of state indicators comprises an identifier of a cache memory storing the associated cache line and the write indication for the associated cache line.

17. The system of claim 10 , wherein the cache cleaning circuitry is further configured to:

store a number of dirty indications for a tracking entry in a counter associated with the tracking entry.

18. A method comprising:

determining whether one or more tracking entries comprise a number of dirty indications that exceeds a predetermined threshold, wherein

each tracking entry comprises a plurality of cache line fields each having a corresponding cache line associated with a unique section of the same region of system memory, wherein the plurality of cache line fields includes N cache line fields in which N represents a number of cache lines needed to store all of the same region of system memory, and wherein each cache line field comprises:

a dirty indication when the corresponding cache line is a candidate for writing data stored in the cache line to the associated unique section; and

a clean indication when the corresponding cache line is not a candidate for writing data stored in the cache line to the associated unique section;

selecting a tracking entry of the one or more tracking entries having a number of dirty indications exceeding the predetermined threshold;

selecting a dirty cache line associated with the selected tracking entry;

transmitting a transaction to a cache storing the selected cache line, wherein the transaction is configured to cause the cache to write the dirty data to a system memory;

storing a clean indication in the state indicator corresponding to the selected tracking entry to indicate that the cache line is no longer a candidate for writing data to system memory;

performing said selecting the cache line, transmitting, and storing for a predetermined number of cache lines;.

storing a count of dirty indications for each tracking entry, wherein the dirty indications correspond to cache lines storing dirty data; and

storing a new count of dirty indications for the associated tracking entry subsequent to said transmitting the transaction.

Assignments (17)
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 11759915 AND REPLACE IT WITH APPLICATION 11759935 PREVIOUSLY RECORDED ON REEL 040925 FRAME 0001. ASSIGNOR(S) HEREBY CONFIRMS THE RELEASE OF SECURITY INTEREST. Recorded Feb 17, 2020
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP, B.V. F/K/A FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 052917/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 11759915 AND REPLACE IT WITH APPLICATION 11759935 PREVIOUSLY RECORDED ON REEL 040928 FRAME 0001. ASSIGNOR(S) HEREBY CONFIRMS THE RELEASE OF SECURITY INTEREST. Recorded Jan 17, 2020
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP B.V.
Reel/Frame 052915/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 11759915 AND REPLACE IT WITH APPLICATION 11759935 PREVIOUSLY RECORDED ON REEL 037486 FRAME 0517. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS. Recorded Dec 10, 2019
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 053547/0421 →
RELEASE OF SECURITY INTEREST Recorded Sep 10, 2019
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP B.V.
Reel/Frame 050744/0097 →
CORRECTIVE ASSIGNMENT TO CORRECT THE TO CORRECT THE APPLICATION NO. FROM 13,883,290 TO 13,833,290 PREVIOUSLY RECORDED ON REEL 041703 FRAME 0536. ASSIGNOR(S) HEREBY CONFIRMS THE THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS.. Recorded Feb 20, 2019
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: SHENZHEN XINGUODU TECHNOLOGY CO., LTD.
Reel/Frame 048734/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE PATENTS 8108266 AND 8062324 AND REPLACE THEM WITH 6108266 AND 8060324 PREVIOUSLY RECORDED ON REEL 037518 FRAME 0292. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS. Recorded Feb 1, 2017
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 041703/0536 →
CORRECTIVE ASSIGNMENT TO CORRECT THE NATURE OF CONVEYANCE PREVIOUSLY RECORDED AT REEL: 040652 FRAME: 0241. ASSIGNOR(S) HEREBY CONFIRMS THE MERGER AND CHANGE OF NAME. Recorded Jan 5, 2017
From: FREESCALE SEMICONDUCTOR, INC.
To: NXP USA, INC.
Reel/Frame 041260/0850 →
MERGER Recorded Nov 8, 2016
From: FREESCALE SEMICONDUCTOR, INC.
To: NXP USA, INC.
Reel/Frame 040652/0241 →
RELEASE OF SECURITY INTEREST Recorded Nov 7, 2016
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP B.V.
Reel/Frame 040928/0001 →
RELEASE OF SECURITY INTEREST Recorded Sep 21, 2016
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP, B.V., F/K/A FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 040925/0001 →
SUPPLEMENT TO THE SECURITY AGREEMENT Recorded Jun 16, 2016
From: FREESCALE SEMICONDUCTOR, INC.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 039138/0001 →
ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS Recorded Jan 13, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037518/0292 →
ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS Recorded Jan 12, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037486/0517 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037357/0387 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037357/0334 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037357/0285 →
SECURITY AGREEMENT Recorded Nov 6, 2013
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 031591/0266 →