From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=58577 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OxiRq-00039W-1f for qemu-devel@nongnu.org; Mon, 20 Sep 2010 11:38:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OxiRo-0005ca-Pc for qemu-devel@nongnu.org; Mon, 20 Sep 2010 11:38:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40173) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxiRo-0005cI-Ca for qemu-devel@nongnu.org; Mon, 20 Sep 2010 11:38:28 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8KFcRYT011611 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 20 Sep 2010 11:38:27 -0400 Message-ID: <4C977FF0.40208@redhat.com> Date: Mon, 20 Sep 2010 17:38:24 +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> <4C977ECF.4000907@redhat.com> In-Reply-To: <4C977ECF.4000907@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:33 PM, Avi Kivity wrote: > 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. > Oh, your original RFC has that flush in place, so all is good. -- error compiling committee.c: too many arguments to function