All of lore.kernel.org
 help / color / mirror / Atom feed
From: Parav Pandit <parav@nvidia.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Max Gurtovoy <mgurtovoy@nvidia.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"virtio-comment@lists.oasis-open.org"
	<virtio-comment@lists.oasis-open.org>,
	"cohuck@redhat.com" <cohuck@redhat.com>,
	"virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>, Oren Duer <oren@nvidia.com>,
	Shahaf Shuler <shahafs@nvidia.com>,
	"aadam@redhat.com" <aadam@redhat.com>,
	"virtio@lists.oasis-open.org" <virtio@lists.oasis-open.org>
Subject: [virtio-comment] RE: [virtio-dev] RE: [PATCH v5 0/7] Introduce device group and device management
Date: Sat, 30 Jul 2022 13:21:20 +0000	[thread overview]
Message-ID: <PH0PR12MB54812685041A59D642227920DC989@PH0PR12MB5481.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20220725030303-mutt-send-email-mst@kernel.org>

> From: Michael S. Tsirkin <mst@redhat.com>
> Sent: Monday, July 25, 2022 3:44 AM
> > >
> > How did you calculate the cost being negligible?
> 
> For sure each VF needs at least 2 VQs plus the AQ. Each one is 3 64 bit
> pointers, plus some flags and counters, plus at least one MSI vector about
> 200-300 bit.
> We are talking each feature taking up a single bit per VF right now.
> That's below 1%.
>
Because you assumed that new feature bits in this area will never be added.
The AQ and its capabilities are not limited to PF even though first version of the spec has only few bits.

And these 1% at scale results in several Kbytes.
 
> 
> > > > So better to start using AQ for new functionalities.
> > > > What is stopping us to adapt to this modern and optimized way?
> > >
> > > The cost/benefit tradeoff. The benefit is a theorectical gain of a
> > > few bits per VF. The cost is very real engineering time spent.
> > >
> > How is it theoretical? I provided the calculation few times in previous
> emails.
> 
> It's theoretical because we don't know whether anyone will ever add AQ to
> VFs as opposed to a PF.
>
Isnt the scope of AQ now more than just msix+features+livemigration?
Such as managing siov and more?

Things like queue_reset, query counters and other things can be done more efficiently through a vq than some burned bits regardless of SIOV.
So in my view looking at AQ for msix, LM purpose is narrow view to stay on the PF.
 
> > > I can keep poking holes and finding underspecified behaviour in the
> > > proposal.
> > We should fix the wording.
> > > But I don't really see why would anyone spend the time duplicating
> > > what virtio spec is already doing decently.
> > >
> > > > Why cant we keep features bits limited to device startup
> > > > negotiation
> > > scheme?
> > >
> > > Well they are already used for much more. So sure, maybe work on
> > > changing that, but IMO trying it all in a single huge project is just not a
> great idea.
> > >
> > Why would you recommend on changing something historic like this?
> 
> Because that will bring a much bigger gain.
>
That also breaks existing backward compatibility for existing devices.
So it has to be something additional and optional.

 
> > The ask here to improve the new features.
> 
> Let's just improve everything, a much bigger gain.  Simply put, pci transport
> was never designed with saving per device memory in mind.
Hence, new addition shouldn't make it worse when the new optimized methods are available.

> Adding complexity to save a couple of bytes per device will just create bugs
> without solving that. 
I disagree that it creates bugs.
When done right, we have seen in multiple projects (nvme, mlx5 and more) that it doesn't create bugs.

> AQ is already trying to solve grouping devices and that's
> a big project, let's finish that and then decide whether we want to work on
> migration or work on saving memory next.
> 
I assume migration means live migration and not migration from pci to something else.
If its former, it is not either-or project.
Saving memory is attributed as project and it doesn't have to be for the small piece being added here.

> > > > Other unrelated bits are added in past to feature bits  But lets
> > > > follow the
> > > good examples instead when the new choice is already proposed and
> > > defined.
> > >
> > > So IMHO saving a few bits here and there when we are spending tens
> > > of bytes on state makes no sense.
> > >
You missed the multiply factor of VFs. :)

It is not only saving bits, it also enforces certain aspects of how a device is being composed that must expose these bits pretty early.

> > Not a good reason to introduce something inferior.
> 
> Avoiding duplication and focusing on low hanging fruit are all sound
> engineering principles.
> 
It is not a duplication.
I iterate again. The bits we asked to put in the Aq commands are the one that does not need to be negotiated early.
Feature bits were mis-used to put all things in there because in past a generic AQ didn't exists.
And there is no reason for that past decision to influence current proposal.

Feature bits that are so basic for device bring up stage, stays in feature bits area defined today.
Hence, its not a duplication.

> 
> > > Something like transport over AQ (or the transport vq proposal) or
> > > some other concerted effort to save per device memory would be
> > > needed for SIOV, and maybe it's useful for SRIOV too.
> > >
> > AQ proposal is already doing it.
> > Some of the things seems to be lately duplicated in transport vq proposal.
> > We should possibly rename both the queues to mgmt_queue that serves
> both the purposes.
> 
> Quite possibly - transport VQ seems to handle a group of devices from one
> device which seems similar to what AQ does, and you guys should probably
> work together.
>
Yes.
 
> But whether we do or do not unify transport and admin vq, with transport
Without unification, I don't see how SIOV proposal can ever make to the spec.
Once AQ is merged SIOV can use AQ.
I would like to see SIOV to refer to the AQ proposal commands and extend it. Not as separate proposal.

> vq existing feature mechanism stops taking up space in the VQ and this
> opens up possibility to just use that mechanism to discover supported
> commands without paying memory penalty.
> 
This only helps any new SIOV beast which is not even fully defined at various layers of platform.

> 
> > Transport VQ proposal is tunneling some SIOV device feature bits.
> > Here AQ is negotiating its own feature bits. Both are orthogonal.
> 
> I thought the discussion was about dropping the get features command and
> using features instead. 

> The Transport VQ proposal seems to show how we
> can do that and still make things scale.  Yes it's orthogonal to using AQ for
> grouping, and using features is exactly what will keep it orthogonal.
> 
> > And suggesting to some newer RFC to discuss current one doesn't make
> much sense to tangent the discussion at all.
> 
> 
> The reason I bring it up is that it seems like a better solution to saving device
> memory than adding a get capabilities command. And it let you just use
> features for now, and assume whatever we spend will be saved back by
> using vq as transport.
> 
Even for non SIOV devices?

> 
> > Since there is zero technical short comings of negotiating AQ features via
> AQ command, lets please conclude to proceed with it.
> 
> Not 100% sure what you are saing here, so I think you should post a new
> version, yes. Generally iterating faster is a good idea. If you feel you didn't
> get enough feedback on a given version and some time passed try pinging
> people.
Without closing the discussion, I have seen same topic come up again and again in future version.
So even though new series is up for posting, we better close the discussion.


This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/


  reply	other threads:[~2022-07-30 13:21 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26 22:58 [PATCH v5 0/7] Introduce device group and device management Max Gurtovoy
2022-04-26 22:58 ` [virtio-comment] [PATCH v5 1/7] Introduce device group Max Gurtovoy
2022-05-15 15:25   ` Michael S. Tsirkin
2022-05-18 13:14     ` [virtio-comment] " Max Gurtovoy
2022-05-18 13:32       ` Cornelia Huck
2022-06-01 13:43         ` Max Gurtovoy
2022-06-02  2:21           ` Jason Wang
2022-06-02  6:59             ` Michael S. Tsirkin
2022-06-27 21:52               ` Max Gurtovoy
2022-06-28 18:54                 ` Michael S. Tsirkin
2022-07-06 11:25                   ` Max Gurtovoy
2022-07-06 11:42                     ` Michael S. Tsirkin
2022-07-06 12:01                       ` Max Gurtovoy
2022-07-06 12:23                         ` Michael S. Tsirkin
2022-07-06 15:18                           ` Max Gurtovoy
2022-04-26 22:58 ` [PATCH v5 2/7] Introduce admin command set Max Gurtovoy
2022-05-15 15:23   ` Michael S. Tsirkin
2022-05-16 21:08     ` [virtio-comment] " Parav Pandit
2022-05-17 10:08       ` [virtio-dev] " Cornelia Huck
2022-05-18 13:42         ` Max Gurtovoy
2022-05-17 11:48       ` Michael S. Tsirkin
2022-05-18 14:09         ` Max Gurtovoy
2022-05-18 14:42           ` [virtio] " Cornelia Huck
2022-05-18 14:48             ` Max Gurtovoy
2022-05-31 20:39         ` Parav Pandit
2022-06-20  9:23           ` Michael S. Tsirkin
2022-06-20  9:49             ` Michael S. Tsirkin
2022-06-20  9:59           ` Michael S. Tsirkin
2022-06-20 11:06             ` Parav Pandit
2022-06-20 16:46               ` Michael S. Tsirkin
2022-06-20 16:54                 ` Max Gurtovoy
2022-06-20 17:04                   ` Michael S. Tsirkin
2022-06-20 17:19                     ` Parav Pandit
2022-06-20 20:53                       ` Michael S. Tsirkin
2022-06-20 23:54                         ` Parav Pandit
2022-06-20 17:16                 ` Parav Pandit
2022-06-23  1:26               ` Jason Wang
2022-06-23  2:07                 ` Parav Pandit
2022-06-23  2:41                   ` Jason Wang
2022-06-23  2:57                     ` Parav Pandit
2022-06-23  3:34                       ` Jason Wang
2022-06-28 14:24                         ` Michael S. Tsirkin
2022-06-29  8:43                           ` Jason Wang
2022-06-29  9:02                             ` Michael S. Tsirkin
2022-06-30  1:53                               ` Jason Wang
2022-05-18 13:39     ` [virtio-comment] " Max Gurtovoy
2022-05-18 13:50       ` [virtio] " Cornelia Huck
2022-05-18 14:16         ` Max Gurtovoy
2022-06-20 22:26           ` Michael S. Tsirkin
2022-06-20 21:08       ` Michael S. Tsirkin
2022-04-26 22:58 ` [PATCH v5 3/7] Introduce new destination type for admin commands Max Gurtovoy
2022-05-15 15:01   ` Michael S. Tsirkin
2022-05-18 14:27     ` [virtio-comment] " Max Gurtovoy
2022-05-15 15:09   ` Michael S. Tsirkin
2022-05-16 21:21     ` Parav Pandit
2022-05-16 23:33       ` Michael S. Tsirkin
2022-05-18 14:36         ` Max Gurtovoy
2022-05-18 14:34     ` Max Gurtovoy
2022-05-18 23:55       ` Michael S. Tsirkin
2022-04-26 22:58 ` [PATCH v5 4/7] Introduce virtio admin virtqueue Max Gurtovoy
2022-05-15 14:59   ` Michael S. Tsirkin
2022-05-18 14:37     ` Max Gurtovoy
2022-05-18 23:56       ` Michael S. Tsirkin
2022-04-26 22:58 ` [PATCH v5 5/7] Add miscellaneous configuration structure for PCI Max Gurtovoy
2022-05-15 14:49   ` Michael S. Tsirkin
2022-06-01 14:46     ` Max Gurtovoy
2022-05-15 14:57   ` Michael S. Tsirkin
2022-05-17 10:12     ` [virtio] " Cornelia Huck
2022-05-18 14:42       ` Max Gurtovoy
2022-05-18 23:58         ` Michael S. Tsirkin
2022-04-26 22:58 ` [PATCH v5 6/7] Introduce MGMT admin commands Max Gurtovoy
2022-05-15 14:37   ` Michael S. Tsirkin
2022-05-16 21:47     ` Parav Pandit
2022-05-17 12:31       ` [virtio-comment] " Michael S. Tsirkin
2022-05-18 15:14         ` Max Gurtovoy
2022-05-17  2:28     ` Jason Wang
2022-05-18 15:27       ` Max Gurtovoy
2022-05-18 16:41         ` Michael S. Tsirkin
2022-05-18 23:10           ` Max Gurtovoy
2022-05-18 15:03     ` Max Gurtovoy
2022-06-20  9:45       ` Michael S. Tsirkin
2022-04-26 22:58 ` [PATCH v5 7/7] RFC: add initial support for configuring feature bits Max Gurtovoy
2022-05-15 14:38   ` Michael S. Tsirkin
2022-05-18 15:31     ` Max Gurtovoy
2022-05-18 16:34       ` Michael S. Tsirkin
2022-05-18 23:18         ` Max Gurtovoy
2022-05-15 15:27 ` [PATCH v5 0/7] Introduce device group and device management Michael S. Tsirkin
2022-05-18 15:32   ` Max Gurtovoy
2022-07-05 13:56 ` Michael S. Tsirkin
2022-07-05 15:11   ` [virtio-comment] " Parav Pandit
2022-07-06  2:54     ` [virtio-dev] " Jason Wang
2022-07-06 10:10       ` Michael S. Tsirkin
2022-07-06 10:46       ` [virtio-comment] " Parav Pandit
2022-07-06 11:00     ` Michael S. Tsirkin
2022-07-06 20:45       ` Parav Pandit
2022-07-24 21:09         ` Michael S. Tsirkin
2022-07-24 21:25           ` [virtio-comment] " Parav Pandit
2022-07-24 23:41             ` Michael S. Tsirkin
2022-07-25  2:53               ` [virtio-comment] " Parav Pandit
2022-07-25  7:44                 ` Michael S. Tsirkin
2022-07-30 13:21                   ` Parav Pandit [this message]
2022-07-31 15:38                     ` Michael S. Tsirkin
2022-08-02 17:40                       ` 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=PH0PR12MB54812685041A59D642227920DC989@PH0PR12MB5481.namprd12.prod.outlook.com \
    --to=parav@nvidia.com \
    --cc=aadam@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mgurtovoy@nvidia.com \
    --cc=mst@redhat.com \
    --cc=oren@nvidia.com \
    --cc=shahafs@nvidia.com \
    --cc=virtio-comment@lists.oasis-open.org \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=virtio@lists.oasis-open.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.