From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: packed ring layout proposal v3 Date: Sun, 29 Oct 2017 16:21:52 +0200 Message-ID: <20171029162117-mutt-send-email-mst@kernel.org> References: <20160915223915.qjlnlvf2w7u37bu3@redhat.com> <20171025191346-mutt-send-email-mst@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Ilya Lesokhin Cc: "virtio-dev@lists.oasis-open.org" , "virtualization@lists.linux-foundation.org" List-Id: virtualization@lists.linuxfoundation.org If you do this whats the point of the id? Just use descriptor offset like virtio 0 did. On Sun, Oct 29, 2017 at 09:05:01AM +0000, Ilya Lesokhin wrote: > My point was that if the driver is not required to change the IDs, > it can initialized the ID's in all the descriptors when the ring is created > and never write the ID field again. > > A simple allocator for the IDs can solve the problem I presented but it is still more > expensive then not doing ID allocation at all. > > > > -----Original Message----- > > From: Michael S. Tsirkin [mailto:mst@redhat.com] > > Sent: Wednesday, October 25, 2017 7:20 PM > > To: Ilya Lesokhin > > Cc: virtio-dev@lists.oasis-open.org; virtualization@lists.linux-foundation.org > > Subject: Re: packed ring layout proposal v3 > > > > On Sun, Oct 08, 2017 at 06:16:44AM +0000, Ilya Lesokhin wrote: > > > > > -----Original Message----- > > > > > From: virtualization-bounces@lists.linux-foundation.org > > > > > [mailto:virtualization-bounces@lists.linux-foundation.org] On > > > > > Behalf Of Michael S. Tsirkin > > > > > > > > > > This is an update from v2 version. > > > >> ... > > > > > When driver descriptors are chained in this way, multiple > > > > > descriptors are treated as a part of a single transaction > > > > > containing an optional write buffer followed by an optional read buffer. > > > > > All descriptors in the chain must have the same ID. > > > > > > > > > > > I apologize for the repost, I didn't realize I have to be a member of > > > the virtio-dev mailing list. > > > > > > I'm concerned about the "same ID" requirement in chained descriptors. > > > > It's there really just so we can remove the doubt about which descriptor's ID > > should be used. My testing does not show a performance win from this, so I'm > > fine with removing this requirement though I'd be curious to know why is it a > > problem. > > > > > Assuming out of order execution, how is the driver supposed to > > > re-assign unique IDs to the previously chained descriptor? > > > > For example, driver can have a simple allocator for the IDs. > > > > > > > Is the driver expected to copy original IDs somewhere else before the > > > chaining and then restore the IDs after the chain is executed? > > > > > > Thanks, > > > Ilya > > > > As device overwrites the ID, driver will have to write it out each time, that's true. > > It's going to be a requirement even if descriptors on the chain do not need to > > have the same ID. > > > > -- > > MST