[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/3] virtio-net: graceful drop of vhost for TAP

From: Daniel P . Berrangé
Subject: Re: [PATCH 0/3] virtio-net: graceful drop of vhost for TAP
Date: Tue, 9 Feb 2021 15:18:00 +0000
User-agent: Mutt/1.14.6 (2020-07-11)

On Tue, Feb 09, 2021 at 10:04:30AM -0500, Michael S. Tsirkin wrote:
> On Tue, Feb 09, 2021 at 02:51:05PM +0000, Daniel P. Berrangé wrote:
> > On Tue, Feb 09, 2021 at 09:34:20AM -0500, Michael S. Tsirkin wrote:
> > > On Thu, Feb 04, 2021 at 10:29:12PM +0200, Yuri Benditovich wrote:
> > > > This set of patches introduces graceful switch from tap-vhost to
> > > > tap-no-vhost depending on guest features. Before that the features
> > > > that vhost does not support were silently cleared in get_features.
> > > > This creates potential problem of migration from the machine where
> > > > some of virtio-net features are supported by the vhost kernel to the
> > > > machine where they are not supported (packed ring as an example).
> > > 
> > > I still worry that adding new features will silently disable vhost for 
> > > people.
> > > Can we limit the change to when a VM is migrated in?
> > 
> > Some management applications expect bi-directional live migration to
> > work, so taking specific actions on incoming migration only feels
> > dangerous. 
> Could you be more specific?
> Bi-directional migration is currently broken
> when migrating new kernel->old kernel.

At the very least  new QEMU -> old QEMU, but in general new kernel
to old kerenl would be expected too. Assuming a QEMU command line
is using a versioned machine type, and not using host passthrough
features (-cpu host), then it should in general represent a fixed
guest ABI  independant of kernel version/features.

> > IMHO if the features we're adding cannot be expected to exist in
> > host kernels in general, then the feature should defualt to off
> > and require explicit user config to enable.
> > Downstream distros which can guarantee newer kernels can flip the
> > default in their custom machine types if they desire.
> Unfortunately that will basically mean we are stuck with no new features
> for years. We did what this patch is trying to change for years now, in
> particular KVM also seems to happily disable CPU features not supported
> by kernel so I wonder why we can't keep doing it, with tweaks for some
> corner cases.

Yep, it is not great from a upstream POV.

In upstream we've traditionally not expressed a specific min
kernel version we expect to be run on. So that lmits what we
can do in upstram machine types.  Downstram distros can
expose stuff pretty much immediately if they desire.

eg if RHEL 8 adds the kernel feature in 8.5, it could in
theory add the feature by default in pc-q35-rhel8.5.0 machine
types (if we ignore pain of containers running on old kernels).
Even if we take into account mismatched usrespace/kernel, the
downstram distros can adopt much more quickly.

There is probably scope for upstream to be more explicit about
min required kernel features, but we'll always be worse upstream
because we target a broader range of platforms/distros.

> userspace and kernel not being in 100% sync wrt features is not
> a corner case though, and switching backends seems like too big
> a hammer.

Yes, the containers world in particular has made life much worse,
because the mis-matched combinations of  userspace and kernel are
much more likely. In fact I'd say out of sync kernel+userspace
is arguably going to become the common case in future.

eg worst case someone running a RHEL-8 userspace on a RHEL-7
container host or vica verca.

|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

reply via email to

[Prev in Thread] Current Thread [Next in Thread]