From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60389 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OumpU-0004QP-W8 for qemu-devel@nongnu.org; Sun, 12 Sep 2010 09:42:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OumaD-0007Ji-38 for qemu-devel@nongnu.org; Sun, 12 Sep 2010 09:27:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64351) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OumaC-0007Jc-QC for qemu-devel@nongnu.org; Sun, 12 Sep 2010 09:27:01 -0400 Message-ID: <4C8CD51B.8040602@redhat.com> Date: Sun, 12 Sep 2010 15:26:51 +0200 From: Avi Kivity 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> <4C8CD0DA.40401@codemonkey.ws> In-Reply-To: <4C8CD0DA.40401@codemonkey.ws> 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: Anthony Liguori Cc: Kevin Wolf , Anthony Liguori , qemu-devel@nongnu.org, Stefan Hajnoczi , Juan Quintela On 09/12/2010 03:08 PM, Anthony Liguori wrote: >> 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. Sorry to harp on the subject, but that's the standard problem with state machines. Every time you want to do a blocking operation in a function, you have to put all its locals in some structure, split the function into two, do some scheduling, etc. >> >> 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. Wasn't there some qdev callback that represents this? Faint memory from the reset thread. -- error compiling committee.c: too many arguments to function