From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxJyk-0001Zc-Mj for qemu-devel@nongnu.org; Tue, 26 May 2015 14:53:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxJyj-0002HV-EK for qemu-devel@nongnu.org; Tue, 26 May 2015 14:53:30 -0400 Message-ID: <5564C0F9.3000208@redhat.com> Date: Tue, 26 May 2015 12:52:41 -0600 From: Eric Blake MIME-Version: 1.0 References: <1ef4a987b5f35c70a1bb5f16039d1ddc36e68a99.1432660103.git.berto@igalia.com> In-Reply-To: <1ef4a987b5f35c70a1bb5f16039d1ddc36e68a99.1432660103.git.berto@igalia.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KVeLMeT6kiWkBFtqu70NQfLHk0LnlFl13" Subject: Re: [Qemu-devel] [PATCH 2/3] qcow2: add option to clean unused cache entries after some time List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Stefan Hajnoczi , Max Reitz This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KVeLMeT6kiWkBFtqu70NQfLHk0LnlFl13 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > This feature currently relies on MADV_DONTNEED to free that memory, so > it is not useful in systems that don't follow that behavior. >=20 > Signed-off-by: Alberto Garcia > --- > 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(-) >=20 > +++ b/qapi/block-core.json > @@ -1538,6 +1538,9 @@ > # @refcount-cache-size: #optional the maximum size of the refcount b= lock 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --KVeLMeT6kiWkBFtqu70NQfLHk0LnlFl13 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVZMD5AAoJEKeha0olJ0NqPgUH/iwzJhzq/TxgOMOpTmUGIEGI yx0jhDiaGIMl0svHvJmVg/4hv1bUuoslPFqRJDteKAH9RW+dEnHX6RfrGgNY53RC LF0zdgecINp8ATUu1QfZ9LSztXoWoS1lIh59K9YCKGIDjxC8WaRNabN1kLroKQaA zAWlQrzaBNw0aGe/JpuUC7859rcWUiZbMVSQcDbMnDjhtcjY5VS2ik9nsxUy3+R5 x+foBGm6iELiSL+q6F7eKHuB7uaU5mRkJukTKd2W0HOC3J/F5WWEMOiXQ/unfo9i 2xGS25pGOyeXrE77SR5oDmFVewWaRa28roJkGMep5cxe4tFYVzSegwLx8TbUlds= =icS2 -----END PGP SIGNATURE----- --KVeLMeT6kiWkBFtqu70NQfLHk0LnlFl13--