From nobody Tue Oct 22 22:33:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1729547581; cv=none; d=zohomail.com; s=zohoarc; b=HcEFQzY55+1M3PLo+UhmwU4wc0V9ctTn6pyc9Ez1GK68CR4jKFK+kQGUGUoRau8cQvP4pVC7aCZf2X2UaOz+28FqqifUUbVIIkRF66i2okgLHVJq2Ou8HWMDfKNEA16Y8JvlqWYYYGwbrZ9k7Br2h80frSXV93n2lmcmmRDLg5k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729547581; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=087OfFMmh0RHkgJbBmLUcTRUXDGVFXELFrxJJHeqAnk=; b=C0Nu/cCRjKlB6CJWZeGMIqau5BjBBRv2H0zcoZ5Ab7TB8Qd6GWNqumgdWxgPX/t0hcwj4f6ultr9MGyMpjK0ExKrw+GSp8F72OnuMAL/g9smnAHBPKKFFsQKNTMibASdVXdPXCq3PIy4DtKyp3S1kr3K0cIxOk+mi2PsJROPMLM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1729547581960414.3208400299993; Mon, 21 Oct 2024 14:53:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t30KM-0001K1-NR; Mon, 21 Oct 2024 17:52:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t30KL-0001Js-Gd for qemu-devel@nongnu.org; Mon, 21 Oct 2024 17:52:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t30KJ-0006yi-CP for qemu-devel@nongnu.org; Mon, 21 Oct 2024 17:52:37 -0400 Received: from mail-vk1-f199.google.com (mail-vk1-f199.google.com [209.85.221.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-96-5_qW5FcaMYOW0ILVy-6uhg-1; Mon, 21 Oct 2024 17:52:24 -0400 Received: by mail-vk1-f199.google.com with SMTP id 71dfb90a1353d-50d5127122cso960990e0c.2 for ; Mon, 21 Oct 2024 14:52:24 -0700 (PDT) Received: from x1n.redhat.com (pool-99-254-114-190.cpe.net.cable.rogers.com. [99.254.114.190]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b165a86f43sm218566885a.126.2024.10.21.14.52.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2024 14:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729547549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=087OfFMmh0RHkgJbBmLUcTRUXDGVFXELFrxJJHeqAnk=; b=a2v05TAKnltxx8L51hkVZ7c2B55HqINJq8fXnYYjUDJwQBs2vi1RNJ/Zl7c30ybgUoy4UV ud4XeQe4HX9Rg9b1aTJBBn2c01SKoAqW10hTJfTnx/fRRYrBefAQWDDmglibXJo8hPhPCA sD5IZhFmZjQMgrFZPAPAp3EMsapOG3s= X-MC-Unique: 5_qW5FcaMYOW0ILVy-6uhg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729547542; x=1730152342; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=087OfFMmh0RHkgJbBmLUcTRUXDGVFXELFrxJJHeqAnk=; b=boi9vDCWk9hZydWcQwqfBeJo9Kkm/X8UK0Bsl7w5JWrBUb21t9DAVQWqxh5c6BF79N JQzuFqWBT6jgGdi2uL0wcLmuCkHVsLJpTF+Al7ZZo81ryfOEvNOokXsKXeAgDVyGUMsf +TVrltgeyS7JmP3qnzklrjLIHrBMteZrxRLjw8bQom49tNq5kJZngtbqstuQN6/H7Mb5 YceUr2WXk0JSdKTPfxK2Qm35PftQMniTRpHl37Hip3qp+8GUhfHtQ/HG7C52uSYbWTbS UYjHRlhBqixNDlvAIbtI/7u3EoyXUwau5DJjHNqWW3HvAqJeaq22LtZm26Vk0GMEO8Km tngA== X-Gm-Message-State: AOJu0YxLfPTOyd7ZgGoz64szR/0RSHtjXVLGxOGRrgbkoZn3nm0ijFC+ 2dIsh11gLCk+pFENa5UE+K9PEp0NI/fVV+vlWS2ZlvOSG3rd7rr6Q3F/mwhCWpCejbK60TpkWd8 cpnNC+3MUhnMsdeCq/OHqY9YuTtFJS3y/Mf9Xb5M5BvqAsxEc88AV9HnXBkvEnREgDORhpxsC5t mGQVRAOFgo49Pl72X6On8bniCSV2WnMVZnmA== X-Received: by 2002:a05:6122:2521:b0:50d:74af:d480 with SMTP id 71dfb90a1353d-50dda1bb590mr10517549e0c.1.1729547542591; Mon, 21 Oct 2024 14:52:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFnedorL7sAOyTa2Ngv3UWyelmQmeq1JO6kKK6aLq3V5m8BQxZDFwv5Hhz9ucRvSe3ezAJk2w== X-Received: by 2002:a05:6122:2521:b0:50d:74af:d480 with SMTP id 71dfb90a1353d-50dda1bb590mr10517503e0c.1.1729547542149; Mon, 21 Oct 2024 14:52:22 -0700 (PDT) From: Peter Xu To: qemu-devel@nongnu.org Cc: "Dr . David Alan Gilbert" , Juraj Marcin , Prasad Pandit , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Markus Armbruster , Julia Suvorova , peterx@redhat.com, Fabiano Rosas Subject: [PATCH] migration: Deprecate query-migrationthreads command Date: Mon, 21 Oct 2024 17:52:20 -0400 Message-ID: <20241021215220.982325-1-peterx@redhat.com> X-Mailer: git-send-email 2.45.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.421, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1729547584094116600 Content-Type: text/plain; charset="utf-8" Per previous discussion [1,2], this patch deprecates query-migrationthreads command. To summarize, the major reason of the deprecation is due to no sensible way to consume the API properly: (1) The reported list of threads are incomplete (ignoring destination threads and non-multifd threads). (2) For CPU pinning, there's no way to properly pin the threads with the API if the threads will start running right away after migration threads can be queried, so the threads will always run on the default cores for a short window. (3) For VM debugging, one can use "-name $VM,debug-threads=3Don" instead, which will provide proper names for all migration threads. [1] https://lore.kernel.org/r/20240930195837.825728-1-peterx@redhat.com [2] https://lore.kernel.org/r/20241011153417.516715-1-peterx@redhat.com Signed-off-by: Peter Xu Acked-by: Markus Armbruster Reviewed-by: Fabiano Rosas Reviewed-by: Prasad Pandit --- docs/about/deprecated.rst | 8 ++++++++ qapi/migration.json | 6 +++++- migration/threadinfo.c | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index ce38a3d0cf..ffb147e896 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -147,6 +147,14 @@ options are removed in favor of using explicit ``block= dev-create`` and ``blockdev-add`` calls. See :doc:`/interop/live-block-operations` for details. =20 +``query-migrationthreads`` (since 9.2) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +To be removed with no replacement, as it reports only a limited set of +threads (for example, it only reports source side of multifd threads, +without reporting any destination threads, or non-multifd source threads). +For debugging purpose, please use ``-name $VM,debug-threads=3Don`` instead. + Incorrectly typed ``device_add`` arguments (since 6.2) '''''''''''''''''''''''''''''''''''''''''''''''''''''' =20 diff --git a/qapi/migration.json b/qapi/migration.json index 3af6aa1740..a71a9f0cd3 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -2284,12 +2284,16 @@ # # Returns information of migration threads # +# Features: +# @deprecated: This command is deprecated with no replacement yet. +# # Returns: @MigrationThreadInfo # # Since: 7.2 ## { 'command': 'query-migrationthreads', - 'returns': ['MigrationThreadInfo'] } + 'returns': ['MigrationThreadInfo'], + 'features': ['deprecated'] } =20 ## # @snapshot-save: diff --git a/migration/threadinfo.c b/migration/threadinfo.c index 262990dd75..2867413420 100644 --- a/migration/threadinfo.c +++ b/migration/threadinfo.c @@ -13,6 +13,7 @@ #include "qemu/osdep.h" #include "qemu/queue.h" #include "qemu/lockable.h" +#include "qemu/error-report.h" #include "threadinfo.h" =20 QemuMutex migration_threads_lock; @@ -52,6 +53,9 @@ MigrationThreadInfoList *qmp_query_migrationthreads(Error= **errp) MigrationThread *thread =3D NULL; =20 QEMU_LOCK_GUARD(&migration_threads_lock); + + warn_report("Command 'query-migrationthreads' is deprecated"); + QLIST_FOREACH(thread, &migration_threads, node) { MigrationThreadInfo *info =3D g_new0(MigrationThreadInfo, 1); info->name =3D g_strdup(thread->name); --=20 2.45.0