|
From: Nicholas N. <nj...@cs...> - 2005-10-13 12:53:13
|
On Thu, 13 Oct 2005, Josef Weidendorfer wrote: > On Thursday 13 October 2005 03:21, Paul Mackerras wrote: >> The multi-way set associative caches that I have seen actually use a >> pseudo-LRU scheme that uses a binary tree, with 1 bit per node, where >> [...] > > So you wouldn't shuffle around the tags in the set, but update > a bit field? I suppose these needs an additional indirection for > the most common case (checking MRU), but it could be worth it as > only the bitfield has to be updated. > Another problem is how to do this bit shuffling with a variable > associativity. If this part of the simulation is taking a lot of time (and I'd like to see profiling evidence) I'd suggest keeping the current algorithm and having several specialised versions, for associativities of 1, 2, 4, and 8. It should be ugly but doable with some macro magic. Nick |