diff options
author | Alberto Garcia <berto@igalia.com> | 2015-02-05 14:55:31 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-02-06 17:24:22 +0100 |
commit | 8e8cb375e0964b4ed099cb8563029028db26a834 (patch) | |
tree | 6a9778b60835d3f49535d634dc753a1c173f4c78 /rules.mak | |
parent | fa21e6faa6f1d7de49fd030ebdb0722b59cf9a41 (diff) |
block: Give always priority to unused entries in the qcow2 L2 cache
The current algorithm to replace entries from the L2 cache gives
priority to newer hits by dividing the hit count of all existing
entries by two everytime there is a cache miss.
However, if there are several cache misses the hit count of the
existing entries can easily go down to 0. This will result in those
entries being replaced even when there are others that have never been
used.
This problem is more noticeable with larger disk images and cache
sizes, since the chances of having several misses before the cache is
full are higher.
If we make sure that the hit count can never go down to 0 again,
unused entries will always have priority.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'rules.mak')
0 files changed, 0 insertions, 0 deletions