All of lore.kernel.org
 help / color / mirror / Atom feed
From: Parav Pandit <parav@nvidia.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>,
	Virtio-Dev <virtio-dev@lists.oasis-open.org>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	Cornelia Huck <cohuck@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: RE: [virtio-dev] [PATCH v2] virtio: Improve queue_reset polarity to match to default reset state
Date: Wed, 27 Apr 2022 15:57:35 +0000	[thread overview]
Message-ID: <PH0PR12MB5481AC52975356341A964314DCFA9@PH0PR12MB5481.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20220427114055-mutt-send-email-mst@kernel.org>


> From: Michael S. Tsirkin <mst@redhat.com>
> Sent: Wednesday, April 27, 2022 11:44 AM
> 
> On Wed, Apr 27, 2022 at 03:39:40PM +0000, Parav Pandit wrote:
> >
> > > From: Michael S. Tsirkin <mst@redhat.com>
> > > Sent: Wednesday, April 27, 2022 11:30 AM
> > >
> > > On Wed, Apr 27, 2022 at 02:51:36PM +0000, Parav Pandit wrote:
> > > >
> > > > > From: Jason Wang <jasowang@redhat.com>
> > > > > Sent: Wednesday, April 27, 2022 7:30 AM
> > > > >
> > > > > On Wed, Apr 27, 2022 at 6:26 PM Parav Pandit <parav@nvidia.com>
> wrote:
> > > > > >
> > > > > > example flow:
> > > > > > a) 0,0 -> device init time value
> > > > > > b) 1,0 -> vq is enabled by driver and working
> > > > >
> > > > > Did you see my reply in V1? What's the reason for using write to
> > > > > clear behavior that is different from the device status?
> > > > >
> > > > > We can simply make this as 1, 1 here and let the driver write to
> > > > > 0 to reset the virtqueue.
> > > > >
> > > > > And if we do this, the queue_enable and queue_reset are always
> > > > > the same, then we can simply reuse queue_enable.
> > > > >
> > > > Yes, I know we can make this work using new feature bit + single
> > > queue_enable register.
> > > > I replied that in v0 to Michael.
> > >
> > > A bigger question in my eyes is that down the road we might want to
> > > be able to stop the ring without having it lose state.
> > > The natural interface for that seems to be writing 0 to queue enable.
> > Why queue_enable and not queue_reset?
> 
> If what to disable ring without reset then writing into reset seems
> unintuitive.
> 
True. I assume you want to start the queue again later, hence the stop/start.
Make sense.

> > to me this interface is unlikely performant and useful for such case.
> > When we want to pause/stop the VQ and query the state we need
> performant scheme, that can even work in a batch for all the VQs.
> > At that point programming 64 registers to pause/stop VQ without losing
> state and querying its indices etc won't be scalable with register interface.
> > I imagine a AQ (likely) or some other interface.
> >
> > >
> > > > I was not sure how drastic that would be at this point in the spec
> > > > release cycle
> > > that Michael highlighted.
> > > > Hence, I proposed a minimal change fix to queue_reset register given
> timeline.
> > >
> > > Well if accepted this proposal is going to delay the release anyway.
> > > If we are doing a new feature then that can love alongside the one
> > > that is already in the spec.
> > I didn't quite understand your point.
> 
> I understood your "given timeline" to mean "to avoid delays in 1.2 release".
Yes.

> My point is any material change will mean a delay at this time.
But this is so basic.
It's hard to gaze at this spec for coming years and the code to see,
Hey sometimes 0 means disabled, sometime 0 means still enabled, sometime 1 means enabled, and sometimes 1 means now disabled...
And maintain those weird code in device side and extra state bits burning some expensive chip resource.

Is removing from 1.2 is equal delay to get is fixed in 1.3?
If yes, I make humble request to fix this and have errata.
Some of the professional standard bodies release the spec and short after that errata/ratification follows the release that resolve such small issues.
May be time for virtio spec to take this opportunity now and be bit agile on it.
Your call. :)


  reply	other threads:[~2022-04-27 15:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 10:25 [PATCH v2] virtio: Improve queue_reset polarity to match to default reset state Parav Pandit
2022-04-27 11:29 ` [virtio-dev] " Jason Wang
2022-04-27 11:44   ` Xuan Zhuo
2022-04-28  3:46     ` Jason Wang
2022-04-27 14:51   ` Parav Pandit
2022-04-27 15:29     ` Michael S. Tsirkin
2022-04-27 15:39       ` Parav Pandit
2022-04-27 15:43         ` Michael S. Tsirkin
2022-04-27 15:57           ` Parav Pandit [this message]
2022-04-27 16:15             ` Parav Pandit
2022-04-27 19:32               ` Michael S. Tsirkin
2022-04-28  1:52                 ` Parav Pandit
2022-04-28  3:40               ` Jason Wang
2022-04-28  4:00                 ` Parav Pandit
2022-04-28  6:13                   ` Jason Wang
2022-04-28  6:30                     ` Michael S. Tsirkin
2022-04-28  6:56                       ` Jason Wang
2022-04-27 19:28             ` Michael S. Tsirkin
2022-04-27 19:29               ` Parav Pandit
2022-04-28  3:15         ` Jason Wang
2022-04-28  3:24           ` Parav Pandit
2022-04-28  3:43             ` Jason Wang
2022-04-28  4:56               ` Michael S. Tsirkin
2022-04-28  6:10                 ` Jason Wang
2022-04-28  6:26                   ` Michael S. Tsirkin
2022-04-28  8:20                     ` Jason Wang
2022-04-27 12:48 ` [virtio-dev] " Cornelia Huck
2022-04-28  1:09   ` [virtio-dev] " Parav Pandit
2022-04-27 20:39 ` [virtio-dev] " Michael S. Tsirkin
2022-04-28  1:49   ` Parav Pandit
2022-04-28  7:33     ` [virtio-comment] " Cornelia Huck
2022-04-28 19:13       ` Parav Pandit

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=PH0PR12MB5481AC52975356341A964314DCFA9@PH0PR12MB5481.namprd12.prod.outlook.com \
    --to=parav@nvidia.com \
    --cc=cohuck@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=xuanzhuo@linux.alibaba.com \
    /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.