All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Ilya Lesokhin <ilyal@mellanox.com>
Cc: "virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>
Subject: Re: packed ring layout proposal v3
Date: Sun, 29 Oct 2017 16:21:52 +0200	[thread overview]
Message-ID: <20171029162117-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <AM4PR0501MB2723177BF4E5EE32CC878E8CD4580@AM4PR0501MB2723.eurprd05.prod.outlook.com>

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 <ilyal@mellanox.com>
> > 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

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Ilya Lesokhin <ilyal@mellanox.com>
Cc: "virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>
Subject: [virtio-dev] Re: packed ring layout proposal v3
Date: Sun, 29 Oct 2017 16:21:52 +0200	[thread overview]
Message-ID: <20171029162117-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <AM4PR0501MB2723177BF4E5EE32CC878E8CD4580@AM4PR0501MB2723.eurprd05.prod.outlook.com>

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 <ilyal@mellanox.com>
> > 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

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


  reply	other threads:[~2017-10-29 14:21 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-10  5:06 [virtio-dev] packed ring layout proposal v3 Michael S. Tsirkin
2017-02-08 13:37 ` packed ring layout proposal v2 Christian Borntraeger
2017-02-09 17:43   ` Michael S. Tsirkin
     [not found]   ` <20170209181955-mutt-send-email-mst@kernel.org>
2017-02-09 18:27     ` Christian Borntraeger
2017-02-08 17:41 ` [virtio-dev] " Paolo Bonzini
2017-02-08 19:59   ` Michael S. Tsirkin
     [not found]   ` <20170208214435-mutt-send-email-mst@kernel.org>
2017-02-09 15:48     ` Paolo Bonzini
2017-02-09 16:11       ` Cornelia Huck
2017-02-09 18:24       ` Michael S. Tsirkin
     [not found]       ` <20170209202203-mutt-send-email-mst@kernel.org>
2017-02-10 11:32         ` Paolo Bonzini
     [not found]         ` <c229269b-1702-ffec-62e8-002c7c142904@redhat.com>
2017-02-10 15:20           ` Michael S. Tsirkin
2017-02-10 16:17             ` Paolo Bonzini
     [not found]       ` <20170209171105.075a9d9c.cornelia.huck@de.ibm.com>
2017-02-22 16:43         ` Michael S. Tsirkin
     [not found]         ` <20170222181333-mutt-send-email-mst@kernel.org>
2017-03-07 15:53           ` Cornelia Huck
2017-03-07 20:33             ` Michael S. Tsirkin
     [not found]             ` <20170307223057-mutt-send-email-mst@kernel.org>
2017-07-10 16:27               ` Amnon Ilan
2017-07-10 16:27               ` Amnon Ilan
2017-02-22  4:27 ` packed ring layout proposal - todo list Michael S. Tsirkin
     [not found] ` <20170222054336-mutt-send-email-mst@kernel.org>
2017-02-22  9:19   ` [virtio-dev] " Gray, Mark D
     [not found]   ` <738D45BC1F695740A983F43CFE1B7EA94E93CA7E@IRSMSX108.ger.corp.intel.com>
2017-02-22 15:13     ` Michael S. Tsirkin
2017-02-28  4:29   ` Yuanhan Liu
     [not found]   ` <20170228042943.GH18844@yliu-dev.sh.intel.com>
2017-03-01  1:07     ` Michael S. Tsirkin
2017-03-08  7:09       ` Yuanhan Liu
     [not found]       ` <20170308070948.GC18844@yliu-dev.sh.intel.com>
2017-03-08  7:56         ` Yuanhan Liu
     [not found]         ` <20170308075624.GF18844@yliu-dev.sh.intel.com>
2017-03-29 12:39           ` Michael S. Tsirkin
2017-04-01  7:30             ` Yuanhan Liu
2017-02-22 14:46 ` [virtio-dev] packed ring layout proposal v2 Chien, Roger S
2017-02-28  5:02 ` Yuanhan Liu
2017-02-28  5:47 ` [RFC] packed (virtio-net) headers Yuanhan Liu
     [not found] ` <20170228050218.GI18844@yliu-dev.sh.intel.com>
2017-03-01  1:02   ` [virtio-dev] packed ring layout proposal v2 Michael S. Tsirkin
     [not found]   ` <20170301024951-mutt-send-email-mst@kernel.org>
2017-03-01  3:57     ` Yuanhan Liu
     [not found]     ` <20170301035715.GP18844@yliu-dev.sh.intel.com>
2017-03-01  4:14       ` Michael S. Tsirkin
2017-03-01  4:57         ` Yuanhan Liu
     [not found] ` <20170228054719.GJ18844@yliu-dev.sh.intel.com>
2017-03-01  1:28   ` [RFC] packed (virtio-net) headers Michael S. Tsirkin
2017-07-16  6:00 ` [virtio-dev] packed ring layout proposal v2 Lior Narkis
2017-07-18 16:23   ` Michael S. Tsirkin
2017-07-18 16:23     ` Michael S. Tsirkin
2017-07-19  7:41     ` Lior Narkis
2017-07-20 13:06       ` Michael S. Tsirkin
2017-07-20 13:06         ` Michael S. Tsirkin
2017-07-19  7:41     ` Lior Narkis
2017-07-16  6:00 ` Lior Narkis
2017-09-11  7:47 ` [virtio-dev] Re: packed ring layout proposal v3 Jason Wang
2017-09-12 16:23   ` Willem de Bruijn
2017-09-13  1:26     ` Jason Wang
2017-09-13  1:26     ` Jason Wang
2017-09-12 16:23   ` Willem de Bruijn
2017-09-11  7:47 ` Jason Wang
2017-09-12 16:20 ` [virtio-dev] " Willem de Bruijn
2017-09-12 16:20 ` Willem de Bruijn
2017-09-14  8:23 ` Ilya Lesokhin
2017-09-20  9:11 ` [virtio-dev] " Liang, Cunming
2017-09-20  9:11   ` Liang, Cunming
2017-09-25 22:24   ` Michael S. Tsirkin
2017-09-25 22:24   ` Michael S. Tsirkin
2017-09-26 23:38     ` Steven Luong (sluong)
2017-09-27 23:49       ` Michael S. Tsirkin
2017-09-27 23:49         ` Michael S. Tsirkin
2017-09-28  9:44         ` Liang, Cunming
2017-10-01  4:08           ` Michael S. Tsirkin
2017-10-01  4:08             ` Michael S. Tsirkin
2017-10-04 12:39             ` Jens Freimann
2017-10-04 12:58               ` Michael S. Tsirkin
2017-10-04 12:58               ` Michael S. Tsirkin
2017-10-10  9:56                 ` Liang, Cunming
2017-10-10  9:56                 ` Liang, Cunming
2017-10-11 12:22                   ` Jens Freimann
2017-09-28  9:44         ` Liang, Cunming
2017-09-28 21:13         ` Michael S. Tsirkin
2017-09-28 21:13         ` Michael S. Tsirkin
2017-09-26 23:38     ` Steven Luong (sluong)
2017-09-21 13:36 ` Liang, Cunming
2017-09-21 13:36   ` Liang, Cunming
2017-09-28 21:27   ` Michael S. Tsirkin
2017-09-28 21:27   ` Michael S. Tsirkin
2017-10-08  6:16 ` Ilya Lesokhin
2017-10-08  6:16 ` [virtio-dev] " Ilya Lesokhin
2017-10-25 16:20   ` Michael S. Tsirkin
2017-10-25 16:20     ` [virtio-dev] " Michael S. Tsirkin
2017-10-29  9:05     ` Ilya Lesokhin
2017-10-29  9:05     ` [virtio-dev] " Ilya Lesokhin
2017-10-29 14:21       ` Michael S. Tsirkin [this message]
2017-10-29 14:21         ` [virtio-dev] " Michael S. Tsirkin
2017-10-29 14:34         ` Ilya Lesokhin
2017-10-29 14:34         ` [virtio-dev] " Ilya Lesokhin
2017-10-30  2:08           ` Michael S. Tsirkin
2017-10-30  2:08             ` [virtio-dev] " Michael S. Tsirkin
2017-10-30  6:30             ` [virtio-dev] " Ilya Lesokhin
2017-10-30 16:30               ` Michael S. Tsirkin
2017-10-30 16:30                 ` [virtio-dev] " Michael S. Tsirkin
2017-10-30  6:30             ` Ilya Lesokhin
2017-09-10  5:06 Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171029162117-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=ilyal@mellanox.com \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.