All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Jiang Jiacheng" <jiangjiacheng@huawei.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>
Subject: Re: [PATCH 0/7] migration: query-migrationthreads enhancements and cleanups
Date: Thu, 10 Oct 2024 15:46:59 -0400	[thread overview]
Message-ID: <ZwgvMzB3JZ1y3_WC@x1n> (raw)
In-Reply-To: <87h69vavvr.fsf@pond.sub.org>

On Wed, Oct 02, 2024 at 07:58:48AM +0200, Markus Armbruster wrote:
> Peter Xu <peterx@redhat.com> writes:
> 
> > 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.
> 
> Sounds like there's a use case for management applications querying
> TIDs, but query-migrationthreads falls short of serving it.
> 
> > 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.
> 
> True.
> 
> > 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)?
> 
> If we decide we want to serve the management application use case now,
> we should provide a suitable interface, then deprecate
> query-migrationthreads.
> 
> If we decide not now or not at all, we can deprecate it right away.
> Removal without deprecation is also possible, but I doubt breaking our
> compatibility promise is justified.
> 
> > I added the author Jiacheng too.
> 
> Users of query-migrationthreads, please speak up!

I'll go ahead and remove it.  The current plan is I'll skip the deprecation
procedure for this one because I don't expect anyone would read the
deprecation notification at all... aka, no real user I can ever think of,
who only cares about source pinning not dest.

I'll pick patch 2 out and send separately, which is still a cleanup without
the query-migrationthreads API.

We can keep the discussion going in the new patch.

Thanks,

-- 
Peter Xu



      reply	other threads:[~2024-10-10 19:47 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
2024-10-02  5:58       ` Markus Armbruster
2024-10-10 19:46         ` Peter Xu [this message]

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=ZwgvMzB3JZ1y3_WC@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 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.