On 26.05.2015 19:14, Alberto Garcia wrote:
This adds a new 'cache-clean-interval' option that cleans all qcow2
cache entries that haven't been used in a certain interval, given in
seconds.
This allows setting a large L2 cache size so it can handle scenarios
with lots of I/O and at the same time use little memory during periods
of inactivity.
This feature currently relies on MADV_DONTNEED to free that memory, so
it is not useful in systems that don't follow that behavior.
Signed-off-by: Alberto Garcia <be...@igalia.com>
---
block/qcow2-cache.c | 35 ++++++++++++++++++++++++++++
block/qcow2.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++
block/qcow2.h | 4 ++++
qapi/block-core.json | 6 ++++-
4 files changed, 108 insertions(+), 1 deletion(-)
Reviewed-by: Max Reitz <mre...@redhat.com>