From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbzV6-0003BQ-Ht for qemu-devel@nongnu.org; Wed, 29 Jun 2011 14:28:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbzV5-000518-AE for qemu-devel@nongnu.org; Wed, 29 Jun 2011 14:28:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbzV4-000510-Pu for qemu-devel@nongnu.org; Wed, 29 Jun 2011 14:28:35 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5TISXDE005510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Jun 2011 14:28:33 -0400 Date: Wed, 29 Jun 2011 20:28:26 +0200 From: Alon Levy Message-ID: <20110629182826.GC26431@bow.redhat.com> References: <1309348641-20061-1-git-send-email-alevy@redhat.com> <1309348641-20061-14-git-send-email-alevy@redhat.com> <4E0B2410.3090008@redhat.com> <20110629142956.GA30873@bow.redhat.com> <4E0B3E04.9060305@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E0B3E04.9060305@redhat.com> Subject: Re: [Qemu-devel] [PATCHv3] qxl: move to UNDEFINED on DESTROY_ALL_SURFACES{, _ASYNC} List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: yhalperi@redhat.com, qemu-devel@nongnu.org On Wed, Jun 29, 2011 at 05:00:20PM +0200, Gerd Hoffmann wrote: > On 06/29/11 16:29, Alon Levy wrote: > >On Wed, Jun 29, 2011 at 03:09:36PM +0200, Gerd Hoffmann wrote: > >>Hi, > >> > >>>+ case QXL_IO_DESTROY_ALL_SURFACES_ASYNC: + d->mode = > >>>QXL_MODE_UNDEFINED; > >> > >>Should go to the async thread. > > > >doesn't it make more sense to do all state changes from the vcpu > >thread? async thread can run much later, if you have a > >QXL_IO_DESTROY_ALL_SURFACES_ASYNC followed by a > >QXL_IO_CREATE_PRIMARY_ASYNC where the driver did not wait for the > >completion of the ASYNC first, I would still like to support that, > >but it won't work if I move this to the async thread. > > I think we should disallow doing any I/O ops while one is in > progress (except maybe QXL_IO_LOG). Most I/O commands are I/O > commands because they either needed for device setup or must be > synchronous anyway. > > QXL_IO_CREATE_PRIMARY_ASYNC wasn't exactly clever designed I think. > Would have been better to enter native mode with another I/O > command, then send the create request for the primary through the > rings like all other surface commands. But given it is a rare event > it isn't that a big issue either. > So - leave or change? I prefer to leave.. Maybe add a "pending async" flag to catch such occasions? > cheers, > Gerd > >