Received: from eggs.gnu.org ([2001:4830:134:3::10]:37159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsSpc-0003Yv-Ex for qemu-devel@nongnu.org; Fri, 07 Oct 2016 06:56:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsSpb-0000dT-AG for qemu-devel@nongnu.org; Fri, 07 Oct 2016 06:56:48 -0400 From: Alberto Garcia In-Reply-To: <20161007081432.GA4589@noname.redhat.com> References: <70fbc326-29b6-ca3c-54ed-201b46d71cf0@larkmoor.net> <20161007081432.GA4589@noname.redhat.com> Date: Fri, 07 Oct 2016 12:56:01 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] qcow2: Optimize L2 table cache size based on image and cluster sizes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , Frank Myhr Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, mreitz@redhat.com, eblake@redhat.com, eswierk@skyportsystems.com On Fri 07 Oct 2016 10:14:32 AM CEST, Kevin Wolf wrote: >> Maybe pass a negative integer to indicate percentage, so string is not required?: >> l2-cache-size=-100 (l2-cache-size=max, covers entire drive) >> l2-cache-size=-50 (l2-cache-size=50% of max, covers half of drive) >> l2-cache-size=2097152 (l2-cache-size=2M) > > No, this is the kind of magic that is best to avoid. > > If you want to have two different ways to configure the cache, make it > two different options. I agree. Still, I would like to know what's the use case you (Frank, Ed) are thinking about: - Are we talking about command-line options, QMP, or both? - Do you know the size of the disk image or you want to be able to set the cache size without having access to that information? In other words, what's preventing you from calculating the cache size that you need? Berto