On 05/26/2015 11:14 AM, 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(-)
> 

> +++ b/qapi/block-core.json
> @@ -1538,6 +1538,9 @@
>  # @refcount-cache-size:   #optional the maximum size of the refcount block 
> cache
>  #                         in bytes (since 2.2)
>  #
> +# @cache-clean-interval:  #optional clean unused entries in the L2 and 
> refcount
> +#                         caches. The interval is in seconds (since 2.4)
> +#
>  # Since: 1.7

Is there any QMP command that can query the current interval?  I'm not a
big fan of write-only interfaces.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to