All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Peter Xu" <peterx@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 0/5] migration-test: Support running a real kernel
Date: Fri, 27 Nov 2026 12:18:10 -0300	[thread overview]
Message-ID: <87h5h2qp59.fsf@suse.de> (raw)
In-Reply-To: <awmNKb0WevtA0L_L@redhat.com>

Daniel P. Berrangé <berrange@redhat.com> writes:
On Fri, Nov 27, 2026 at 08:45:04AM -0500, Peter Xu wrote:

>> On Thu, Nov 26, 2026 at 06:46:59PM -0300, Fabiano Rosas wrote:
>> > There's a class of migration performance bugs that are very specific
>> > to the internals of QEMU and most likely require work on our side, but
>> > are currently invisible to our testing because migration-test runs a
>> > simple guest workload (not even that, really). The more important ones
>> > are BQL contention issues that result in vcpu starvation.
>> > 
>> > My plan is to incrementally add some pieces to migration-test to
>> > reduce that testing gap.
>> > 
>> > The first piece is adding support for running a kernel + initrd inside
>> > the guest which gives us an easy way to start exercising migration of
>> > a more loaded guest that can already cause VM exits.
>> > 
>> > This series adds support for -kernel and -initrd arguments to
>> > migration-test and runs the same set of tests we currently have, but
>> > with the kernel instead of the custom loop. By default it uses the
>> > initrd from tests/migration-stress/ which runs a read-write loop over
>> > all memory and has customizable vcpu and memory size.
>> 
> The whole thing sounds useful, I'll read into details after I flush more of
> the older patches.. which will take some time (it also depends on if next
> week I got some more urgent task "injected"..).
> 

Take your time. I just need to put these out sooner rather than later
because my internal branch is growing too big and I need feedback from
the list before I get too deep.

The hugepages series will come probably sometime next week and then I'll
give you a break while I work on other stuff.
---

> One high level question: this will grow qtest closer to what the
> functional test is doing.  Have you thought of the relationship
> between the two, after we move qtest more over there?

I'm not sure what "move" you mean. Are we porting tests to python? I'm
definitely open to discussion, whatever it is.

> I assumed not, based on what you mentioned
> in the rest part of cover letter that you planned to have it only for dev
> debug purpose.  But still, we'll start to ask the question to ourselves at
> some point, IIUC.  So I ask first. :)

I'm simply going through the path which I see is of least
resistance. These additions are simple enough. Importantly: with this
series we would be adding a different workload to the guest, but it
still runs all the existing migration-tests.

The same with the hugepages support, it's just another mem_type. For
this to work with the functional tests we'd need to either duplicate the
migration-tests there or write new tests. And we'd isolate the existing
tests entirely from these new features.

E.g.: I want to work on the migration performance around dirty log
disabling, it performs worse when hugepages are enabled, it may trigger
softlockups in the guest and it only happens when migration is aborted.

The /migration/cancel/src/after/ tests can already exercise that path,
work well and have caught bugs before. It just need hugepages and a
kernel:

args->mem_type=MEM_TYPE_HUGE 

MIG_KERNEL=vmlinuz \ 
HUGEPAGES=/dev/hugepages/... \
migration-test -p .../cancel/src/after

>
> In terms of the boundary between functional tests and qtests, I
> think the guidance is in the names.
>
> If it is a "qtest" test then it should be primarily making use
> of QTest to interrogate the QEMU internalprocess state.
>

Hm, quite arbitrary. A "qtest" is a test that uses QTest, ok, but we can
do whatever kind of testing we want with it. If we want to stick to any
formal definition, that is. I'm not sure we need to.

> If it is a "functional"  test, then it is interested in running
> real kernels & real accelerators and validating the behaviour of
> QEMU via its external mgmt interfaces.
>
> By this definition, IMHO, the migration-test would be a functional
> test, if it were created from scratch to.
>

By any other definition it already is a functional test.

I'm maybe being too literal. What I think you're trying to indicate
(maybe Peter as well), is that we should preferably group the functional
tests under tests/functional and migration-test.c is more functional
test than anything else, so it should be in there as well. Except that
since migration-test is written in a different programming language, we
would have to leave migration-test.c as is and write new migration tests
under tests/functional.

> It only uses libqtest.h APIs for the purpose of sending QMP
> commands, not examining internal device state. Essentially it is a
> historical accident that it is written as a qtest instead of a
> functional test, as that was the best choice at the time.
>

It uses qtest_read* to validate the guest memory, that was probably the
reason, no?

I also don't understand whatever happened to the whole QGraph/QOS thing,
which, by initial commits seemed it had been written explicitly to
support live migration testing.


  parent reply	other threads:[~2026-11-27 15:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26 21:46 [PATCH 0/5] migration-test: Support running a real kernel Fabiano Rosas
2026-11-26 21:47 ` [PATCH 1/5] tests/migration-stress: Fix stress.c loop Fabiano Rosas
2026-11-26 21:47 ` [PATCH 2/5] tests/migration-stress: Cleanups to stress.c Fabiano Rosas
2026-11-26 21:47 ` [PATCH 3/5] tests/qtest/migration: Move guest workload code into bootfile.c Fabiano Rosas
2026-11-26 21:47 ` [PATCH 4/5] tests/qtest/migration: Adapt wait_for_serial routine for stress.c Fabiano Rosas
2026-11-26 21:47 ` [PATCH 5/5] tests/qtest/migration: Make it possible to run stress.c Fabiano Rosas
2026-11-27 13:45 ` [PATCH 0/5] migration-test: Support running a real kernel Peter Xu
2026-11-27 14:01   ` Daniel P. Berrangé
2026-11-27 15:01     ` Peter Xu
2026-11-27 19:15       ` Fabiano Rosas
2026-11-27 15:18     ` Fabiano Rosas [this message]
2026-11-27 15:33       ` Daniel P. Berrangé

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=87h5h2qp59.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=berrange@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.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.