From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52209 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OxiNF-000102-Rn for qemu-devel@nongnu.org; Mon, 20 Sep 2010 11:33:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OxiNB-0004yC-51 for qemu-devel@nongnu.org; Mon, 20 Sep 2010 11:33:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27612) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxiNA-0004y1-Ul for qemu-devel@nongnu.org; Mon, 20 Sep 2010 11:33:41 -0400 Message-ID: <4C977ECF.4000907@redhat.com> Date: Mon, 20 Sep 2010 17:33:35 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC] block-queue: Delay and batch metadata writes References: <1284991010-10951-1-git-send-email-kwolf@redhat.com> <4C977028.3050602@codemonkey.ws> <4C9778EC.9060704@redhat.com> In-Reply-To: <4C9778EC.9060704@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On 09/20/2010 05:08 PM, Kevin Wolf wrote: > > > > Let's expand it a bit more: > > > > 1. Update refcount table > > 2. bdrv_flush > > 3. Update L2 entry > > 4. Write data to disk > > 5. Report write complete > > > > I'm struggling to understand how a thread helps out. > > This sequence becomes: > > 1. Update refcount table > 2. Write data to disk > 3. Report write complete > > And only later: > > 4. Update L2 entry > 5. bdrv_flush (possibly merged with other flushes) > The L2 update needs to happen after we're sure the refcount update is stable, so need a bdrv_flush between them. Still, the basic idea looks sound. You can do many refcount updates, flush, many L2 updates, flush. -- error compiling committee.c: too many arguments to function