Claims
- 1. An information caching method comprising:
buffering cache lines in a cache set, the cache lines having a parameter indicating data selection characteristics associated with each buffered cache line; and determining which buffered cache lines to cast out and/or invalidate based upon the parameter indicating data selection characteristics.
- 2. The method of claim 1, wherein the parameter indicating data selection characteristics further comprises a bit for indicating whether the cache line has been prefetched.
- 3. The method of claim 2, wherein the parameter indicating data selection characteristics further comprises an LRU indicator for use in ranking cache lines according when last used.
- 4. The method of claim 1, wherein the parameter indicating data selection characteristics further comprises an LRU indicator for use in ranking cache lines according when last used.
- 5. The method of claim 1, wherein determining buffered cache lines to cast out and/or invalidate further comprises:
determining whether information contained in the buffered cache line is prefetch information; invalidating the buffered cache line contained therein; casting out the information contained therein when necessary; and replacing the information cast out of the buffered cache line or invalidated with valid prefetch information.
- 6. The method of claim 5, wherein determining whether information contained in the buffered cache line is prefetch information further comprises, when the buffered cache line contains information that is prefetch information, inspecting the buffered cache line to determine knowledge of additional data selection characteristics associated therewith.
- 7. The method of claim 1, wherein determining buffered cache lines to cast out and/or invalidate based upon the parameter indicating data selection characteristics further comprises:
determining whether information contained in the buffered cache line is invalid information; and replacing the invalid information in the buffered cache line with valid prefetch information.
- 8. The method of claim 7, wherein determining whether information contained in the buffered cache line is valid information further comprises, when the buffered cache line contains information that is valid information, inspecting the buffered cache line to determine knowledge of additional data selection characteristics associated therewith.
- 9. The method of claim 1, wherein determining buffered cache lines to cast out and/or invalidate based upon the parameter indicating data selection characteristics further comprises:
determining a least recently used ranking for information contained in the buffered cache line; invalidating the buffered cache line and casting out the information contained therein when the information contained in the buffered cache line according to the least recently used ranking; and replacing the information invalidated or cast out of the buffered cache line with valid prefetch information.
- 10. The method of claim 9, wherein determining whether the least recently used ranking for information contained in the buffered cache line further comprises inspecting each buffered cache line to determine knowledge of data selection characteristics associated therewith.
- 11. The method of claim 1, wherein the parameter indicating data selection characteristics associated with each buffered cache line comprises a prefetch flag bit and a valid flag bit associated therewith.
- 12. The method of claim 1, wherein the parameter indicating data selection characteristics associated with each buffered cache line comprises a timestamp register associated therewith.
- 13. The method of claim 11, wherein the parameter indicating data selection characteristics associated with each buffered cache line comprises LRU flags, and wherein the prefetch flag bit, the valid flag bit and LRU flags are used to determine a buffered cache line to cast out of the cache set.
- 14. The method of claim 1 further comprising holding information in a prefetch buffer until a cache set having requested information is identified and processed to determine which way to replace with another prefetched line.
- 15. The method of claim 14, wherein determining whether information contained in the buffered cache line of the prefetch buffer has been fetched by a processor further comprises, when the buffered cache line contains information that has not been fetched, inspecting the buffered cache line to determine additional data selection characteristics associated therewith.
- 16. The method of claim 1, wherein the parameter indicating data selection characteristics further comprises a bit for indicating whether the cache line has been prefetched and an LRU indicator for use in ranking cache lines according when last used, and wherein the determining which buffered cache lines to cast out and/or invalidate based upon the parameter indicating data selection characteristics further comprises:
reordering the LRU bits by setting the LRU flags to indicate that prefetched data is least recently used; and invalidating the prefetched data before elements which were used previously.
- 17. The method of claim 1 further comprising changing the LRU flags to most recently used when prefetched data is accessed before being invalidated or cast out.
- 18. The method of claim 1 further comprising:
determining when all cache set elements are used and there is a miss; and making one element empty for retrieving of the requested data by casting out and/or invalidating an element with that has only been prefetched first to make room for the new information.
- 19. The method of claim 18 further comprising only casting out and/or invalidating a least recently used element that has not been prefetched when no element that has been prefetched remains.
- 20. A processing apparatus comprising:
at least one processor; a memory; and a non-L1 cache, the non-L1 cache comprising;
a cache set, the cache set buffering cache lines having a bit per cache line associativity; and a prefetch buffer, the prefetch buffer buffering cache lines having a bit per cache line associativity, the prefetch buffer is operatively connected to the cache set; wherein the processor uses the bit per cache line associativity of cache lines buffered in the cache set to determine which cache lines to cast out of the cache set and uses the bit per cache line associativity of cache lines buffered in the prefetch buffer to determine which cache lines to cast out of the prefetch buffer.
- 21. The processing apparatus of claim 20 wherein the processor determines which buffered cache lines to cast out of the cache set based upon the bit per cache line associativity by inspecting each buffered cache line in the cache set to determine knowledge of data selection characteristics associated with each buffered cache line.
- 22. The processing apparatus of claim 20, wherein the processor determines knowledge of data selection characteristics by determining whether information contained in the buffered cache line is prefetch information, invalidates the buffered cache line, casts out the information contained therein when the information contained in the buffered cache line is not prefetch information and replaces the information cast out of the buffered cache line with valid prefetch information.
- 23. The processing apparatus of claim 22, wherein the processor inspects the buffered cache line to determine knowledge of additional data selection characteristics associated therewith when the buffered cache line contains information that is prefetch information.
- 24. The processing apparatus of claim 20, wherein the processor determines knowledge of data selection characteristics by determining whether information contained in the buffered cache line is invalid information and replaces the invalid information in the buffered cache line with valid prefetch information.
- 25. The processing apparatus of claim 24, wherein the processor inspects the buffered cache line to determine knowledge of additional data selection characteristics associated therewith when the buffered cache line contains information that is valid information.
- 26. The processing apparatus of claim 20, wherein the processor determines knowledge of data selection characteristics by determining a least recently used ranking for information contained in the buffered cache line, invalidates the buffered cache line, casts out the information contained therein according to the least recently used ranking when the information contained in the buffered cache line is least recently used information and replaces the information invalidated or cast out of the buffered cache line with valid prefetch information.
- 27. The processing apparatus of claim 26, wherein when the least recently used flag is not set for the information in the buffered cache line and the processor inspects another buffered cache line to determine knowledge of data selection characteristics associated therewith.
- 28. The processing apparatus of claim 20, wherein each cache line buffered in the cache set has a timestamp register associated therewith.
- 29. The processing apparatus of claim 20, wherein each cache line buffered in the cache set has a prefetch flag bit and a valid flag bit associated therewith.
- 30. The processing apparatus of claim 29, wherein the prefetch flag bit, the valid flag bit and least recently used flags are used by the processor to determine a buffered cache line to cast out of the cache set.
- 31. The processing apparatus of claim 30, wherein the processor determines whether information contained in the buffered cache line of the prefetch buffer has been fetched by a processor by determining when the buffered cache line contains information that has not been fetched and inspecting the buffered cache line to determine knowledge of additional data selection characteristics associated therewith.
- 32. The processing apparatus of claim 20, wherein the parameter indicating data selection characteristics further comprises a bit for indicating whether the cache line has been prefetched and an LRU indicator for use in ranking cache lines according when last used, wherein the processor determines which buffered cache lines to cast out and/or invalidate based upon the parameter indicating data selection characteristics by reordering the LRU bits by setting the LRU flags to indicate that prefetched data is least recently used and invalidating the prefetched data before elements which were used previously.
- 33. The processing apparatus of claim 20, wherein the processor changes the LRU flags to most recently used when prefetched data is accessed before being invalidated or cast out.
- 34. The processing apparatus of claim 20, wherein the processor determines which buffered cache lines to cast out and/or invalidate based upon the parameter indicating data selection characteristics by determining when all cache set elements are used and there is a miss and making one element empty for retrieving of the requested data by casting out and/or invalidating an element with that has only been prefetched first to make room for the new information.
- 35. The processing apparatus of claim 20, wherein the processor only casts out and/or invalidates a least recently used element that has not been prefetched when no element that has been prefetched remains.
- 36. An information caching system comprising:
means for storing information in cache lines, the cache lines having a bit per cache line associativity; means for storing prefetch information in cache lines, the cache lines having a bit per cache line associativity, the means for storing prefetch information is operatively connected with the means for storing information; and means for determining which cache lines to cast out of the means for storing information and the means for storing prefetch information based upon the bit per cache line associativity of cache line stored respectively therein.
- 37. An article of manufacture comprising a program storage medium readable by a computer, the medium tangibly embodying one or more programs of instructions executable by the computer to perform an instruction caching method, the method comprising:
buffering cache lines in a cache set, the cache lines having a bit per cache line associativity; and determining which buffered cache lines to cast out based upon the bit per cache line associativity.
CROSS-REFERENCE TO RELATED APPLICATION
[0001] This application is related to the following co-pending and commonly-assigned U.S. patent application, which is hereby incorporated herein by reference in their respective entirety:
[0002] “A METHOD AND APPARATUS FOR INCREASING PROCESSOR PERFORMANCE IN A COMPUTING SYSTEM” to Walls et al., having U.S. patent application Ser. No. ______.