From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzk03-0000ah-LD for qemu-devel@nongnu.org; Tue, 02 Jun 2015 07:04:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yzk02-0005qQ-O3 for qemu-devel@nongnu.org; Tue, 02 Jun 2015 07:04:51 -0400 Date: Tue, 2 Jun 2015 13:04:42 +0200 From: Kevin Wolf Message-ID: <20150602110442.GK3765@noname.str.redhat.com> References: <7a6512906476a36bc7c88f92d4e5eb882309f5f3.1432891306.git.berto@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7a6512906476a36bc7c88f92d4e5eb882309f5f3.1432891306.git.berto@igalia.com> 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 Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, Stefan Hajnoczi , Max Reitz Am 29.05.2015 um 11:24 hat Alberto Garcia geschrieben: > 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 > Reviewed-by: Max Reitz > diff --git a/qapi/block-core.json b/qapi/block-core.json > index 863ffea..f42338d 100644 > --- a/qapi/block-core.json > +++ 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) Should add that 0 means disabling the cleaning, and 0 is the default. Kevin