From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KTHXs-0004pS-4S for qemu-devel@nongnu.org; Wed, 13 Aug 2008 10:41:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KTHXq-0004om-JL for qemu-devel@nongnu.org; Wed, 13 Aug 2008 10:41:51 -0400 Received: from [199.232.76.173] (port=39665 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTHXq-0004of-Dy for qemu-devel@nongnu.org; Wed, 13 Aug 2008 10:41:50 -0400 Received: from il.qumranet.com ([212.179.150.194]:14719) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KTHXq-00075o-8c for qemu-devel@nongnu.org; Wed, 13 Aug 2008 10:41:50 -0400 Received: from gleb-debian.qumranet.com (gleb-debian.qumranet.com.qumranet.com [172.16.15.143]) by il.qumranet.com (Postfix) with ESMTP id 18745250310 for ; Wed, 13 Aug 2008 17:41:49 +0300 (IDT) Date: Wed, 13 Aug 2008 17:41:48 +0300 From: Gleb Natapov Subject: Re: [Qemu-devel] [PATCH] Flush pending AIO on reboot and shutdown. Message-ID: <20080813144148.GE17567@minantech.com> References: <20080813132358.17672.68212.stgit@gleb-debian.qumranet.com.qumranet.com> <20080813134608.GN6165@implementation.uk.xensource.com> <20080813135941.GB17567@minantech.com> <20080813140641.GP6165@implementation.uk.xensource.com> <20080813142557.GD17567@minantech.com> <20080813142904.GR6165@implementation.uk.xensource.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20080813142904.GR6165@implementation.uk.xensource.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Wed, Aug 13, 2008 at 03:29:04PM +0100, Samuel Thibault wrote: > Gleb Natapov, le Wed 13 Aug 2008 17:25:58 +0300, a =C3=A9crit : > > On Wed, Aug 13, 2008 at 03:06:41PM +0100, Samuel Thibault wrote: > > > Gleb Natapov, le Wed 13 Aug 2008 16:59:41 +0300, a =C3=A9crit : > > > > On Wed, Aug 13, 2008 at 02:46:08PM +0100, Samuel Thibault wrote: > > > > > Gleb Natapov, le Wed 13 Aug 2008 16:23:58 +0300, a =C3=A9crit : > > > > > > If there is outstanding IDE IO when BIOS starts execution then = IDE > > > > > > commands sent by BIOS will interfere with it and will leave IDE > > > > > > subsystem in unpredictable state. This can happen when system r= eboots > > > > > > unexpectedly without waiting for IO completion. Flushing IO bef= ore exit > > > > > > prevents data lose. > > > > >=20 > > > > > I'm wondering: isn't that what happens with real machines? > > > > >=20 > > > > With shutdown yes, but why not try harder. With reboot I don't think > > > > that in real HW you can hang IDE interface after reboot ;) > > >=20 > > > Mmm, I couldn't understand. > > >=20 > > > With real hardware, if you reboot into the bios the board is not > > > resetted either, and thus the interference is the same. > > >=20 > > On real hardware if you press reset button >=20 > That's when you press the reset button. When you have a triple fault > the IDE board won't be resetted. >=20 As far as I see qemu doesn't handle triple faults yet and when it will handle it we will flush aio there too. > > Currently BOCHS BIOS doesn't check that IDE is busy (it doesn't even > > know that HW is present) and sends overlapping command. >=20 > Then fix it. >=20 Wow you found one more reason to do nothing in qemu. Congratulations. The real HW are much more complex then what qemu is implementing. The real HW can even save you buffers after you unplugged your computer. And for real HW it takes much less time to do it too. -- Gleb.