From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37211 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OumTZ-0004L9-7p for qemu-devel@nongnu.org; Sun, 12 Sep 2010 09:20:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OumIW-0004aT-IH for qemu-devel@nongnu.org; Sun, 12 Sep 2010 09:08:45 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:56471) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OumIW-0004aK-Ff for qemu-devel@nongnu.org; Sun, 12 Sep 2010 09:08:44 -0400 Received: by gxk22 with SMTP id 22so1481674gxk.4 for ; Sun, 12 Sep 2010 06:08:44 -0700 (PDT) Message-ID: <4C8CD0DA.40401@codemonkey.ws> Date: Sun, 12 Sep 2010 08:08:42 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 3/3] disk: don't read from disk until the guest starts References: <1284213896-12705-1-git-send-email-aliguori@us.ibm.com> <1284213896-12705-4-git-send-email-aliguori@us.ibm.com> <4C8CAE9C.4030504@redhat.com> In-Reply-To: <4C8CAE9C.4030504@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: Avi Kivity Cc: Kevin Wolf , Anthony Liguori , qemu-devel@nongnu.org, Stefan Hajnoczi , Juan Quintela On 09/12/2010 05:42 AM, Avi Kivity wrote: > On 09/11/2010 05:04 PM, Anthony Liguori wrote: >> This fixes a couple nasty problems relating to live migration. >> >> 1) When dealing with shared storage with weak coherence (i.e. NFS), >> even if >> we re-read, we may end up with undesired caching. By delaying >> any reads >> until we absolutely have to, we decrease the likelihood of any >> undesirable >> caching. >> >> 2) When dealing with copy-on-read, the local storage acts as a >> cache. We need >> to make sure to avoid any reads to avoid polluting the local cache. >> >> + >> static void ide_identify(IDEState *s) >> { >> uint16_t *p; >> @@ -105,6 +132,8 @@ static void ide_identify(IDEState *s) >> return; >> } >> >> + guess_geometry(s); >> + > > This can cause a disk read, no? Shouldn't it be made asynchronous? Yes, it should. I'm not sure there's an easy way to make it asynchronous though not because of the block layer but because of how these functions are called. > > Or just move it to just before the guest starts? We don't really have a notion of "guest starts" today although maybe we should. Regards, Anthony Liguori