sid-20110801 Patch to fix cache lru updating during expell
Currently when the SID cache lru component replaces a line it just sets
the age of that line to zero without updating the age of any of the other
lines. This means that if there are a series of cache misses, then there
will be a series of new lines having the same age preventing the lru policy
from being able to work correctly.
The enclosed patch has been tested on FreeBSD with sid configured for
tomi Borealis (a processor under development by Venray Technology).
- lru[index] = 0;
+ // update state by hand since the tag may not be set properly
+ for (unsigned i = 0; i < cset.num_lines (); i++)
+ if (i == index)
+ lru[i] = 0;
return &cset.get_line (index);