kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Yan Zhao <yan.y.zhao@intel.com>
Cc: "Tian, Kevin" <kevin.tian@intel.com>,
	"intel-gvt-dev@lists.freedesktop.org" 
	<intel-gvt-dev@lists.freedesktop.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Zhenyu Wang <zhenyuw@linux.intel.com>
Subject: Re: [PATCH v3 0/2] VFIO mdev aggregated resources handling
Date: Fri, 10 Jul 2020 09:00:03 -0600	[thread overview]
Message-ID: <20200710090003.32dd24cb@x1.home> (raw)
In-Reply-To: <20200710015849.GA29271@joy-OptiPlex-7040>

On Fri, 10 Jul 2020 09:58:49 +0800
Yan Zhao <yan.y.zhao@intel.com> wrote:

> On Thu, Jul 09, 2020 at 02:22:26PM -0600, Alex Williamson wrote:
> > On Thu, 9 Jul 2020 15:23:34 +0800
> > Yan Zhao <yan.y.zhao@intel.com> wrote:
> >   
> > > On Thu, Jul 09, 2020 at 02:53:05AM +0000, Tian, Kevin wrote:
> > > 
> > > <...>  
> > > > > We also can't even seem to agree that type is a necessary requirement
> > > > > for compatibility.  Your discussion below of a type-A, which is
> > > > > equivalent to a type-B w/ aggregation set to some value is an example
> > > > > of this.  We might also have physical devices with extensions to
> > > > > support migration.  These could possibly be compatible with full mdev
> > > > > devices.  We have no idea how an administrative tool would discover
> > > > > this other than an exhaustive search across every possible target.
> > > > > That's ugly but feasible when considering a single target host, but
> > > > > completely untenable when considering a datacenter.    
> > > > 
> > > > If exhaustive search can be done just one-off to build the compatibility
> > > > database for all assignable devices on each node, then it might be
> > > > still tenable in datacenter?    
> > > yes, Alex, do you think below behavior to build compatibility database is
> > > acceptable?
> > > 
> > > management stack could do the exhaustive search in one shot to build the
> > > compatibility database for all devices in every node. Meanwhile, it caches
> > > migration version strings for all tested devices.
> > > when there's a newly created/attached device, management stack could write
> > > every cached strings to migration version attribute of the newly
> > > created/attached device in order to update the migration compatibility
> > > database. Then it caches the migration version string of the newly
> > > created/attached device as well.
> > > once a device attribute is modified, e.g. after changing its aggregation
> > > count or updating its parent driver, update its cached migration version
> > > string and update the compatibility database by testing against migration
> > > version attribute of this device.  
> > 
> > This is exactly the scenario that I think is untenable.  You're asking
> > a management application to keep a live database of the opaque version
> > string of every device type and likely every instance of a device,
> > which it's not allowed to compare on its own, it can only pipe them  
> if management stack is allowed to compare on its own, then the migration
> version strings have to be standardized.
> 
> But it's a little hard to do it.
> e.g. 
> for GVT, string format can be
> "parent device PCI ID" + "version of gvt driver" + "mdev type" +
> "aggregator count".
> 
> for an NVMe VF connecting to a remote storage. it is
> "PCI ID" + "driver version" + "configured remote storage URL"
> 
> for a QAT VF, it's
> "PCI ID" + "driver version" + "supported encryption set".
> 
> The management stack also needs to understand how to compare those
> strings, which is also hard. e.g.
> two device with different PCI IDs are incompatible initially, but later
> because of software upgrade, they are compatible again.

You're rehashing all the reasons we decided to make the string opaque.
Your examples include driver version information, but different driver
versions don't necessarily imply incompatibility.  Therefore the only
means that a consumer of the version string really has for determining
compatibility is to push that version string back into the driver and
ask whether it it's compatible.  The absolute only test that a
management tool could do on its own would be a simple strcmp(), but
clearly that can't support different driver versions or parent device
IDs, or any other field of the proposed version string.  These examples
are also extremely PCI biased, we need a solution that supports any
type of device.

> > through to every other device across the datacenter to determine which
> > are comparable.  It would need to respond to not only devices being
> > added and removed, but bound and unbound from drivers, and entire nodes
> > being added and removed.  That seems like a lot of overhead, in  
> those responses are also required if the management stack wants to
> compare on its own, right?

I think there needs to be an efficient mechanism to ask, given this
source device, does a target system have a compatible device, or
resources and capacity to create one.  The proposals we're discussing
fail that efficiency qualification in my mind.
 
> > addition to the effect of essentially fuzzing the version interface
> > across all vendors and types.  We need a better solution or we need
> > someone from openstack and ovirt to agree that this is more viable than
> > I suspect. Thanks  
> before we have a better solution, do you think it's good to ask people
> from openstack and ovirt first? what if the problem is not as complicated
> as we thought?

That's exactly what I just suggested here and in the other fork of this
thread.  Thanks,

Alex


  reply	other threads:[~2020-07-10 15:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26  5:41 [PATCH v2 0/2] VFIO mdev aggregated resources handling Zhenyu Wang
2020-03-26  5:41 ` [PATCH v2 1/2] Documentation/driver-api/vfio-mediated-device.rst: update for aggregation support Zhenyu Wang
2020-03-26  8:17   ` Tian, Kevin
2020-03-26  8:21     ` Zhenyu Wang
2020-03-27  6:16       ` Tian, Kevin
2020-03-27  6:21         ` Zhenyu Wang
2020-03-26  5:41 ` [PATCH v2 2/2] drm/i915/gvt: mdev aggregation type Zhenyu Wang
2020-03-27  7:48   ` Tian, Kevin
2020-03-27  8:12     ` Zhenyu Wang
2020-03-27  8:44       ` Tian, Kevin
2020-03-27  8:58         ` Zhenyu Wang
2020-03-27  9:31           ` Tian, Kevin
2020-04-08  5:58 ` [PATCH v3 0/2] VFIO mdev aggregated resources handling Zhenyu Wang
2020-07-07 23:28   ` Tian, Kevin
2020-07-08  1:06     ` Alex Williamson
2020-07-08  1:54       ` Zhenyu Wang
2020-07-08  3:38         ` Yan Zhao
2020-07-08  3:40           ` Yan Zhao
2020-07-08  4:17             ` Alex Williamson
2020-07-08  6:31       ` Tian, Kevin
2020-07-08  9:54         ` Zhenyu Wang
2020-07-08 18:48         ` Alex Williamson
2020-07-09  2:53           ` Tian, Kevin
2020-07-09  7:23             ` Yan Zhao
2020-07-09 20:22               ` Alex Williamson
2020-07-10  1:58                 ` Yan Zhao
2020-07-10 15:00                   ` Alex Williamson [this message]
2020-07-09 17:28             ` Alex Williamson
2020-07-10  2:09               ` Tian, Kevin
2020-07-10  6:29                 ` Yan Zhao
2020-07-10 15:12                   ` Alex Williamson
2020-07-13  0:59                     ` Yan Zhao
2020-04-08  5:58 ` [PATCH v3 1/2] Documentation/driver-api/vfio-mediated-device.rst: update for aggregation support Zhenyu Wang
2020-04-08  5:58 ` [PATCH v3 2/2] drm/i915/gvt: mdev aggregation type Zhenyu Wang

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=20200710090003.32dd24cb@x1.home \
    --to=alex.williamson@redhat.com \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=yan.y.zhao@intel.com \
    --cc=zhenyuw@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).