[libre-riscv-dev] [Bug 71] replace SetAssocCache PLRU with random selection (LFSR)
bugzilla-daemon at libre-riscv.org
bugzilla-daemon at libre-riscv.org
Mon Apr 22 06:35:00 BST 2019
http://bugs.libre-riscv.org/show_bug.cgi?id=71
Jacob Lifshay <programmerjake at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |programmerjake at gmail.com
--- Comment #3 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #2)
> so... what you are saying, jacob, is that a random selection of which bank
> to use is fine, no need to check if any of the banks are full or not.
Yeah, when you get a miss, then picking a bank to replace/fill randomly works
fine.
>
> i have seen on google searches that both algorithms are sometimes used.
> am curious as to why.
Random replacement is used for the simplicity (hence why ARM picked it for some
of their processors) and because it's generally good enough.
LRU is used because it is a conceptually simple deterministic algorithm that
was historically one of the few algorithms initially proposed. It's also
closely related to the optimal algorithm (load what will be used next), in that
it's a time-mirrored version.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-riscv-dev
mailing list