From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QW3Cp-0000AZ-T1 for qemu-devel@nongnu.org; Mon, 13 Jun 2011 05:13:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QW3Co-000544-Bn for qemu-devel@nongnu.org; Mon, 13 Jun 2011 05:13:11 -0400 Received: from mail-bw0-f45.google.com ([209.85.214.45]:35221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QW3Cn-00053M-RB for qemu-devel@nongnu.org; Mon, 13 Jun 2011 05:13:10 -0400 Received: by bwz16 with SMTP id 16so3944750bwz.4 for ; Mon, 13 Jun 2011 02:13:07 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110613082608.GA25582@stefanha-thinkpad.localdomain> References: <1307544625-22907-1-git-send-email-konishchev@gmail.com> <20110613082608.GA25582@stefanha-thinkpad.localdomain> Date: Mon, 13 Jun 2011 13:13:06 +0400 Message-ID: From: Dmitry Konishchev Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , qemu-devel@nongnu.org On Mon, Jun 13, 2011 at 12:26 PM, Stefan Hajnoczi wrot= e: > The optimization is to check allocation metadata instead of > unconditionally reading and then checking for all zeroes? Yeah, exactly. On Mon, Jun 13, 2011 at 12:26 PM, Stefan Hajnoczi wrot= e: > Why introduce a new constant instead of using BDRV_SECTOR_SIZE? OK, I'll fix this. On Mon, Jun 13, 2011 at 12:26 PM, Stefan Hajnoczi wrot= e: > "iff" is not a typo. =A0It means "if and only if". Sorry, I don't know English so good. :) Will revert this. On Mon, Jun 13, 2011 at 12:26 PM, Stefan Hajnoczi wrot= e: > I think the recursive is_allocated() needs its own function. =A0This > function is already long/complex enough :). I haven't done this because in this case I have to pass too lot of local variables to this function. Just not sure that it'll look better. But if you mind I surely can do this. --=20 Dmitry Konishchev mailto:konishchev@gmail.com