From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ad2cP-00045C-PL for qemu-devel@nongnu.org; Mon, 07 Mar 2016 16:23:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ad2cO-00046z-Tw for qemu-devel@nongnu.org; Mon, 07 Mar 2016 16:23:09 -0500 Sender: Paolo Bonzini References: <1455638000-18051-1-git-send-email-pbonzini@redhat.com> <20160217025722.GC30207@ad.usersys.redhat.com> <56C4595D.1020206@redhat.com> <20160223055704.GC19080@ad.usersys.redhat.com> <56CC37EB.7050901@redhat.com> <20160223124956.GA26812@ad.usersys.redhat.com> <56CC647A.6020803@redhat.com> <20160307165741.GB6464@noname.redhat.com> <20160307205654.GB31890@stefanha-x1.localdomain> From: Paolo Bonzini Message-ID: <56DDF132.8030908@redhat.com> Date: Mon, 7 Mar 2016 22:22:58 +0100 MIME-Version: 1.0 In-Reply-To: <20160307205654.GB31890@stefanha-x1.localdomain> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qed: fix bdrv_qed_drain List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , Kevin Wolf Cc: Fam Zheng , qemu-devel@nongnu.org, qemu-block@nongnu.org, qemu-stable@nongnu.org On 07/03/2016 21:56, Stefan Hajnoczi wrote: > I think the timer concept itself is troublesome. A radical approach but > limited to changing QED itself is to drop the timer and instead keep a > timestamp for the last allocating write request. Next time a write > request (allocating or rewriting) is about to complete, do the flush and > clear the need check flag as part of the write request (if 5 seconds > have passed since the timestamp). bdrv_qed_drain should be easy to fix in my new drain implementation, which is based on draining the parent before the BdrvChild-ren. It's just troublesome in the current one which alternates flushing and draining. I would just revert the patch that introduced bdrv_qed_drain for now, and reintroduce it later (note however that something was messed up in commit df9a681, "qed: Implement .bdrv_drain", 2015-11-12, because it includes some dirty bitmap stuff). Or perhaps the idea of making QED read-only has some merit... Paolo