qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/3] qcow2: add option to clean unused cache ent


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time
Date: Tue, 26 May 2015 12:52:41 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

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 <address@hidden>
> ---
>  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

[Prev in Thread] Current Thread [Next in Thread]