Claims
- 1. A method in a data processing system for managing cache lines in a cache, the method comprising:
receiving data on validity of cache lines when a selection of a current victim to be discarded is made in response to a cache miss; and responsive to detecting an invalid cache line, selecting the invalid cache line as a subsequent victim such that the subsequent victim is discarded when a subsequent cache miss occurs.
- 2. The method of claim 1, wherein the invalid cache line is selected as a subsequent victim by designating the invalid cache line as a least recently used cache line.
- 3. The method of claim 1, wherein the selection of the current victim is made using a least recently used policy.
- 4. The method of claim 1, wherein the method is used to manage cache lines in at least one of a level 1 cache and a level 2 cache.
- 5. The method of claim 1, wherein the subsequent victim is not the current victim.
- 6. The method of claim 1, wherein the receiving step is performed in an anti-most recently used vector generation logic.
- 7. The method of claim 1 further comprising:
receiving data on validity of cache lines in response to a cache hit; and responsive to detecting an invalid cache line, selecting the invalid cache line as a subsequent victim such that the subsequent victim is discarded when a subsequent cache miss occurs.
- 8. A cache management apparatus, the apparatus comprising:
an invalid cache line selection unit having a first input and an output; a cache directory having an output connected to the input of the invalid cache line selection unit, wherein the cache directory includes data used to determine validity of cache lines in a cache; least recently used victim selection unit having an output connected to a most recently used update logic; and most recently used update logic having a first input connected to an output of the cache directory, a second input connected to the output of invalid cache line selection unit, and a third input connected to the least recently used victim selection unit, wherein the cache directory sends validity information on cache lines to the vector generation logic, invalid cache line selection unit sends an indicator to the most recently used update logic to bias an invalid cache line as a least recently used cache line, the most recently used update logic updates the invalid cache line in a least recently used state as the recently used cache line causing the invalid cache line to be selected as a victim to be discarded in when a miss occurs.
- 9. The cache management apparatus of claim 8, wherein the cache directory is connected to the most recently used update logic by a compare and decode logic, which generates an indication of a hit or a miss.
- 10. The cache management apparatus of claim 8, wherein least recently used victim selection logic includes an output connected to the invalid cache line selection unit, in which a selection of a victim cache line as a cache line to be discarded results in an inability of the invalid cache line selection unit to bias the victim cache line as a least recently used cache line.
- 11. A data processing system for managing cache lines in a cache, the data processing system comprising:
receiving means for receiving data on validity of cache lines when a selection of a current victim to be discarded is made in response to a cache miss; and selecting means, responsive to detecting an invalid cache line, for selecting the invalid cache line as a subsequent victim such that the subsequent victim is discarded when a subsequent cache miss occurs.
- 12. The data processing system of claim 11, wherein the invalid cache line is selected as a subsequent victim by designating the invalid cache line as a least recently used cache line.
- 13. The data processing system of claim 11, wherein the selection of the current victim is made using a least recently used policy.
- 14. The data processing system of claim 11, wherein the method is used to manage cache lines in at least one of a level 1 cache and a level 2 cache.
- 15. The data processing system of claim 11, wherein the subsequent victim is not the current victim.
- 16. The data processing system of claim 11, wherein the receiving step is performed in an anti-most recently used vector generation logic.
- 17. The data processing system of claim 11, wherein the receiving means is a first receiving means and the selecting means is a first selecting means and further comprising:
first receiving means for receiving data on validity of cache lines in response to a cache hit; and second selecting means, responsive to detecting an invalid cache line, for selecting the invalid cache line as a subsequent victim such that the subsequent victim is discarded when a subsequent cache miss occurs.
CROSS REFERENCE TO RELATED APPLICATIONS
[0001] The present invention is related to the following applications entitled: “Cache Allocation Mechanism for Saving Elected Unworthy Member via Substitute Victimization and Imputed Worthiness of Substitute Victim Member”, Ser. No. ______, attorney docket no. AUS920030197US1; “Cache Allocation Mechanism for Saving Multiple Elected Unworthy Members via Substitute Victimization and Imputed Worthiness of Multiple Substitute Victim Members”, Ser. No. ______, attorney docket no. AUS920030198US1; and “Programming Means for Dynamic Specification of Cache Management Preferences”, Ser. No. ______, attorney docket no. AUS920030199US1; all filed even date hereof, assigned to the same assignee, and incorporated herein by reference.