From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czxdt-0000wP-E1 for qemu-devel@nongnu.org; Sun, 16 Apr 2017 23:47:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1czxds-000545-NU for qemu-devel@nongnu.org; Sun, 16 Apr 2017 23:47:57 -0400 Date: Mon, 17 Apr 2017 11:47:44 +0800 From: Fam Zheng Message-ID: <20170417034744.GB6717@lemon.lan> References: <1492050868-16200-1-git-send-email-lidongchen@tencent.com> <20170414060015.GA12191@lemon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v6] migration/block: use blk_pwrite_zeroes for each zero cluster List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 858585 jemmy Cc: Stefan Hajnoczi , qemu block , Juan Quintela , Dave Gilbert , qemu-devel , Stefan Hajnoczi , Lidong Chen On Fri, 04/14 14:48, 858585 jemmy wrote: > >> Effectively, if no cluster is zero, this patch still splits a big write into > >> small ones, which is the opposition of usual performance optimizations (i.e. > >> trying to coalesce requests). > > > > Good point! > > > > Another patch can modify the loop to perform the largest writes > > possible. In other words, do not perform the write immediately and > > keep a cluster counter instead. When the zero/non-zero state changes, > > perform the write for the accumulated cluster count. > > if the zero/non-zero state changes very frequently, it will not work. It will work, but just not improving anything. I think this is a worthwhile optimzation to do. Fam