From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkxVW-0008AA-M7 for qemu-devel@nongnu.org; Mon, 25 Nov 2013 09:51:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VkxVQ-0005rL-EZ for qemu-devel@nongnu.org; Mon, 25 Nov 2013 09:51:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkxVQ-0005rH-4h for qemu-devel@nongnu.org; Mon, 25 Nov 2013 09:51:20 -0500 Message-ID: <529363DD.8010304@redhat.com> Date: Mon, 25 Nov 2013 15:51:09 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1385387840-17307-1-git-send-email-pl@kamp.de> <1385387840-17307-5-git-send-email-pl@kamp.de> In-Reply-To: <1385387840-17307-5-git-send-email-pl@kamp.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1.8 4/6] block/iscsi: set bdi->cluster_size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com Il 25/11/2013 14:57, Peter Lieven ha scritto: > + /* Guess the internal cluster (page) size of the iscsi target by the means > + * of opt_unmap_gran. Transfer the unmap granularity only if it has a > + * reasonable size for bdi->cluster_size */ > + if (iscsilun->bl.opt_unmap_gran * iscsilun->block_size >= 64 * 1024 && > + iscsilun->bl.opt_unmap_gran * iscsilun->block_size <= 16 * 1024 * 1024) { > + bdi->cluster_size = iscsilun->bl.opt_unmap_gran * iscsilun->block_size; > + } I think you are mixing many different concepts: * The optimal unmap granularity is good as a suggestion for the cluster size of higher-level formats. * The optimal transfer granularity (block limits page, bytes 6-7, min_io_size in Linux) could be used to adjust the length of transfers in "qemu-img convert". I have not really thought much about *how* to do it. * The optimal transfer (block limits page, bytes 12-15, opt_io_size in Linux) should not be used in "qemu-img convert", I think, unless you can actually report performance improvements. This is because in "qemu-img convert" we need to write the data anyway to the target. We cannot schedule other commands between two transfers. So I don't think any delays incurred by a very large write should matter. The maximum transfer length (block limits page, bytes 8-11) should be handled instead in the iSCSI driver, but I do not see the need to do this unless we have reports of something not working. Paolo