qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Laurent Vivier <lvivier@redhat.com>
Cc: "Lukáš Doktor" <ldoktor@redhat.com>,
	"Juan Quintela" <quintela@redhat.com>,
	qemu-devel@nongnu.org,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	qemu-ppc@nongnu.org, clg@kaod.org,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [PATCH] spapr: Fix VSMT mode when it is not supported by the kernel
Date: Fri, 8 Nov 2019 18:23:15 +0100	[thread overview]
Message-ID: <20191108182315.4c26b3fa@bahia.lan> (raw)
In-Reply-To: <cafafbdc-7869-f8ac-bfc0-5b93cacc5542@redhat.com>

On Fri, 8 Nov 2019 18:03:08 +0100
Laurent Vivier <lvivier@redhat.com> wrote:

> On 08/11/2019 17:47, Greg Kurz wrote:
> > On Fri,  8 Nov 2019 16:40:35 +0100
> > Laurent Vivier <lvivier@redhat.com> wrote:
> > 
> >> Commit 29cb4187497d sets by default the VSMT to smp_threads,
> >> but older kernels (< 4.13) don't support that.
> >>
> >> We can reasonably restore previous behavior with this kernel
> >> to allow to run QEMU as before.
> >>
> >> If VSMT is not supported, VSMT will be set to MAX(8, smp_threads)
> >> as it is done for previous machine types (< pseries-4.2)
> >>
> > 
> > It is usually _bad_ to base the machine behavior on host capabilities.
> 
> This is already the case, statically: your patch guesses the kernel
> always support VSMT. So you can't start the machine (and thus can't
> migrate it to/from).
> 

Failing to start the machine is okay. The thing we want to avoid is
to successfully start the guest and discover later on we cannot
migrate it.

> > What happens if we migrate between an older kernel and a recent one ?
> 
> I think migration is supported correctly only if parameters are
> explicitly set. So this is not our case.
> 

Hence my suggestion to introspect...

> > I understand this is to fix tests/migration-test on older kernels.
> > Couldn't this be achieved with migration-test doing some introspection
> > and maybe pass vsmt=8 on the QEMU command line ?
> 
> It could be a little bit complicated to instrospect this.

... ah, you likely know migration-test better than I do :)

> We could also set by default vsmt=8 at the test level.
> 

This would mean that we don't test an exact default setup, but this
would still test most of the migration paths. I guess this could be
an acceptable trade-off only if 'make check' must *really* support
older kernels.

> Thanks,
> Laurent
> 



  reply	other threads:[~2019-11-08 17:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 15:40 [PATCH] spapr: Fix VSMT mode when it is not supported by the kernel Laurent Vivier
2019-11-08 16:47 ` Greg Kurz
2019-11-08 17:03   ` Laurent Vivier
2019-11-08 17:23     ` Greg Kurz [this message]
2019-11-19  1:00   ` David Gibson
2019-11-19 14:06     ` Laurent Vivier
2019-11-19 15:45       ` Greg Kurz
2019-11-19 16:13         ` Lukáš Doktor
2019-11-20  4:39           ` David Gibson
2019-11-20  4:36         ` David Gibson
2019-11-20  7:49           ` Greg Kurz
2019-11-20  9:00           ` Laurent Vivier
2019-11-20 11:28             ` Laurent Vivier
2019-11-20 11:41               ` David Gibson
2019-11-20 11:58                 ` Laurent Vivier
2019-11-20 14:28                 ` Laurent Vivier
2019-11-21  2:02                   ` David Gibson
2019-11-20 12:47               ` Greg Kurz
2019-11-20 13:35                 ` Laurent Vivier

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=20191108182315.4c26b3fa@bahia.lan \
    --to=groug@kaod.org \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgilbert@redhat.com \
    --cc=ldoktor@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=quintela@redhat.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).