Received: from [140.186.70.92] (port=52542 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pjwd2-0001oX-Si for qemu-devel@nongnu.org; Mon, 31 Jan 2011 11:29:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pjwd1-0004h6-Jq for qemu-devel@nongnu.org; Mon, 31 Jan 2011 11:29:24 -0500 Received: from smtp.eu.citrix.com ([62.200.22.115]:30627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pjwd1-0004ft-FE for qemu-devel@nongnu.org; Mon, 31 Jan 2011 11:29:23 -0500 Date: Mon, 31 Jan 2011 16:30:52 +0000 From: Stefano Stabellini Subject: Re: [Qemu-devel] [PATCH V9 10/16] xen: Introduce the Xen mapcache In-Reply-To: <4D40A946.2020903@codemonkey.ws> Message-ID: References: <1295965760-31508-1-git-send-email-anthony.perard@citrix.com> <1295965760-31508-11-git-send-email-anthony.perard@citrix.com> <4D40A946.2020903@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Xen Devel , Stefano Stabellini , Jun@gnu.org, QEMU-devel , Nakajima , Anthony Perard On Wed, 26 Jan 2011, Anthony Liguori wrote: > > +void qemu_invalidate_map_cache(void) > > +{ > > + unsigned long i; > > + MapCacheRev *reventry; > > + > > + qemu_aio_flush(); > > > > This is bizarre? Why is this needed? > Sorry, I forgot to reply to this question. Xen might send an IOREQ_TYPE_INVALIDATE at any time and we have to flush the mapcache in response. Of course we cannot flush the mapcache if there are any in flight AIO's, so we have to make sure they are all completed before destroying all the mappings. Maybe there is better API to do that than calling qemu_aio_flush()?