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:[email protected]] > > Sent: Wednesday, October 25, 2017 7:20 PM > > To: Ilya Lesokhin <[email protected]> > > Cc: [email protected]; > > [email protected] > > Subject: Re: packed ring layout proposal v3 > > > > On Sun, Oct 08, 2017 at 06:16:44AM +0000, Ilya Lesokhin wrote: > > > > > -----Original Message----- > > > > > From: [email protected] > > > > > [mailto:[email protected]] 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 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
