From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0trL-0007IA-GG for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:48:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0trK-0005QO-Kd for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:48:39 -0400 Message-ID: <5571C4CE.1050803@redhat.com> Date: Fri, 05 Jun 2015 17:48:30 +0200 From: Max Reitz MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/4] 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 02.06.2015 14:22, 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 > Cc: Max Reitz > --- > block/qcow2-cache.c | 35 ++++++++++++++++++++++++++++ > block/qcow2.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > block/qcow2.h | 4 ++++ > qapi/block-core.json | 7 +++++- > 4 files changed, 109 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz