From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxIdL-0002OO-JI for qemu-devel@nongnu.org; Tue, 26 May 2015 13:27:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxIdK-0001D0-Re for qemu-devel@nongnu.org; Tue, 26 May 2015 13:27:19 -0400 Message-ID: <5564ACBF.3090403@redhat.com> Date: Tue, 26 May 2015 19:26:23 +0200 From: Max Reitz MIME-Version: 1.0 References: <1ef4a987b5f35c70a1bb5f16039d1ddc36e68a99.1432660103.git.berto@igalia.com> In-Reply-To: <1ef4a987b5f35c70a1bb5f16039d1ddc36e68a99.1432660103.git.berto@igalia.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit 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 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 > --- > 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