From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWVZY-0006nD-Lv for qemu-devel@nongnu.org; Tue, 14 Jun 2011 11:30:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWVZW-0005Ru-To for qemu-devel@nongnu.org; Tue, 14 Jun 2011 11:30:32 -0400 Received: from cantor2.suse.de ([195.135.220.15]:45123 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWVZW-0005Rb-9Z for qemu-devel@nongnu.org; Tue, 14 Jun 2011 11:30:30 -0400 Message-ID: <4DF77E90.4080409@suse.de> Date: Tue, 14 Jun 2011 17:30:24 +0200 From: Hannes Reinecke MIME-Version: 1.0 References: <4DEE2B15.4090809@redhat.com> <4DF21447.6090005@suse.de> <20110612075140.GB11941@redhat.com> In-Reply-To: <20110612075140.GB11941@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] virtio scsi host draft specification, v3 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Christoph Hellwig , Stefan Hajnoczi , "kvm@vger.kernel.org" , Rusty Russell , qemu-devel , Linux Kernel Mailing List , Paolo Bonzini , Linux Virtualization On 06/12/2011 09:51 AM, Michael S. Tsirkin wrote: > On Fri, Jun 10, 2011 at 02:55:35PM +0200, Hannes Reinecke wrote: >>> Device operation: request queues >>> -------------------------------- >>> >>> The driver queues requests to an arbitrary request queue, and they ar= e >>> used by the device on that same queue. >>> >> What about request ordering? >> If requests are placed on arbitrary queues you'll inevitably run on >> locking issues to ensure strict request ordering. >> I would add here: >> >> If a device uses more than one queue it is the responsibility of the >> device to ensure strict request ordering. > > Maybe I misunderstand - how can this be the responsibility of > the device if the device does not get the information about > the original ordering of the requests? > > For example, if the driver is crazy enough to put > all write requests on one queue and all barriers > on another one, how is the device supposed to ensure > ordering? > Which is exactly the problem I was referring to. When using more than one channel the request ordering _as seen by the initiator_ has to be preserved. This is quite hard to do from a device's perspective; it might be able to process the requests _in the order_ they've=20 arrived, but it won't be able to figure out the latency of each=20 request, ie how it'll take the request to be delivered to the initiator. What we need to do here is to ensure that virtio will deliver the requests in-order across all virtqueues. Not sure whether it=20 does this already. Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: J. Hawn, J. Guild, F. Imend=F6rffer, HRB 16746 (AG N=FCrnberg)