qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Jiang Jiacheng" <jiangjiacheng@huawei.com>
Cc: Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org, Prasad Pandit <ppandit@redhat.com>,
	Julia Suvorova <jusual@redhat.com>,
	Fabiano Rosas <farosas@suse.de>,
	Juraj Marcin <jmarcin@redhat.com>,
	"Dr . David Alan Gilbert" <dave@treblig.org>,
	Jiang Jiacheng <jiangjiacheng@huawei.com>
Subject: Re: [PATCH 0/7] migration: query-migrationthreads enhancements and cleanups
Date: Tue, 1 Oct 2024 11:06:47 -0400	[thread overview]
Message-ID: <ZvwQB1Calv407MH0@x1n> (raw)
In-Reply-To: <ZvwGSgDnW8KfgFEh@redhat.com>

On Tue, Oct 01, 2024 at 03:25:14PM +0100, Daniel P. Berrangé wrote:
> On Tue, Oct 01, 2024 at 07:46:09AM +0200, Markus Armbruster wrote:
> > Command query-migrationthreads went in without a QAPI ACK.  Issues
> > review should have caught:
> > 
> > * Flawed documentation.  Fixed in commit e6c60bf02d1.
> > 
> > * It should have been spelled query-migration-threads.  Not worth fixing
> >   now, I guess.
> > 
> > * What are the use cases?  The commit message doesn't tell!  If it's
> >   just for debugging, the command should be marked unstable.
> 
> It is hard to use too.
> 
> Lets say a mgmt app wants to restrict migration threads to some
> certain pCPUs. It can't call query-migrationthreads beforehand
> as the threads don't exist until migration is started. If it
> calls after migration is started, then there's a window where
> threads are running on arbitrary pCPUs that QEMU has access
> to. There's no synchronization point where threads have been
> created & can be queried, but are not yet sending data (and
> thus burning CPU time)

Indeed, I suppose tricks needed if to work with such model, e.g., mgmt
needs to turn bw=0, start migration, query TIDs, then restore bw.

However that still lacks at least the dest multifd threads, as currently it
only reports src multifd threads TIDs.  I don't see why a serious mgmt
would like to pin and care only src threads, not dest threads, which can
also eat as much (or even more) pCPU resources.

For real debugging purpose, I actually don't see a major value out of it
either, because GDB can provide all information that this API wants to
provide, and only better with thread stacks if we want.

Since I don't see how this can be used right, it didn't get proper QAPI
reviews, and further I highly suspect whether this API is consumed by
anyone at all.. in any serious way.  Shall we remove this API (with/without
going through the deprecation process)?

I added the author Jiacheng too.

Thanks,

-- 
Peter Xu



  reply	other threads:[~2024-10-01 15:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 19:58 [PATCH 0/7] migration: query-migrationthreads enhancements and cleanups Peter Xu
2024-09-30 19:58 ` [PATCH 1/7] migration: Unify names of migration src main thread Peter Xu
2024-09-30 19:58 ` [PATCH 2/7] migration: Put thread names together with macros Peter Xu
2024-09-30 19:58 ` [PATCH 3/7] migration: Remove thread_id in migration_threads_add() Peter Xu
2024-09-30 19:58 ` [PATCH 4/7] migration: Simplify migration-threads API Peter Xu
2024-09-30 19:58 ` [PATCH 5/7] migration: Add all threads with QMP query-migrationthreads Peter Xu
2024-09-30 19:58 ` [PATCH 6/7] migration: Remove MigrationThread and threadinfo.h Peter Xu
2024-09-30 19:58 ` [PATCH 7/7] hmp: Add "info migrationthreads" Peter Xu
2024-09-30 23:43   ` Dr. David Alan Gilbert
2024-10-01  5:46 ` [PATCH 0/7] migration: query-migrationthreads enhancements and cleanups Markus Armbruster
2024-10-01 14:25   ` Daniel P. Berrangé
2024-10-01 15:06     ` Peter Xu [this message]
2024-10-02  5:58       ` Markus Armbruster
2024-10-10 19:46         ` Peter Xu

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=ZvwQB1Calv407MH0@x1n \
    --to=peterx@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dave@treblig.org \
    --cc=farosas@suse.de \
    --cc=jiangjiacheng@huawei.com \
    --cc=jmarcin@redhat.com \
    --cc=jusual@redhat.com \
    --cc=ppandit@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 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).