From nobody Sun May 19 07:31:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1673267847; cv=none; d=zohomail.com; s=zohoarc; b=NSlmKSVyeq3zprY/f6UIyrrIh5vV9P28iXJpcHOECUvi23fD8OiLra7RRV6NTOSXW9RTk3ij2DJpUUawLMSNGDQcvFmzKkfNg8Z0TDp2PfPDrUJSxOMa4WaeOekm2IY4KfUkwPJI2IdbF7B65avxQXR6E9VU6vpaUTGlvPFDbuQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673267847; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=wlCyEWuTWmvLmheCmTf9pOtNzxqjfkauSChll8b7rHc=; b=jlVRbe3cmcpzCQ2MFx6EtlyGdBQ1jD08UfT7aScxlmxduGqlclYtpEGZhm9ka9j2HXRQw+MXsTlguNpPWOS6yqJ7uIUTVW2eJYJUDVLZqluaT1p2nw44oAiF+58HkTkcSP9L2oGX5k1A0knT5rNMggU/42dT5Cf4jv2TT3U2r9U= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 1673267847479741.3691968673239; Mon, 9 Jan 2023 04:37:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEr7S-0006nK-MU; Mon, 09 Jan 2023 07:19:14 -0500 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 1pEr7P-0006gg-3Q for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:19:11 -0500 Received: from szxga08-in.huawei.com ([45.249.212.255]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEr7M-0003IL-Tu for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:19:10 -0500 Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4NrCcp6XBrz16MdM; Mon, 9 Jan 2023 20:17:30 +0800 (CST) Received: from localhost.localdomain (10.175.124.27) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 9 Jan 2023 20:19:02 +0800 To: CC: , , , , , , Subject: [RESEND PATCH 1/2] migration: report migration related thread pid to libvirt Date: Mon, 9 Jan 2023 20:12:34 +0800 Message-ID: <20230109121235.2666476-2-jiangjiacheng@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230109121235.2666476-1-jiangjiacheng@huawei.com> References: <20230109121235.2666476-1-jiangjiacheng@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500022.china.huawei.com (7.185.36.66) X-CFilter-Loop: Reflected 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=45.249.212.255; envelope-from=jiangjiacheng@huawei.com; helo=szxga08-in.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, 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: , Reply-to: Jiang Jiacheng From: Jiang Jiacheng via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1673267848903100001 Content-Type: text/plain; charset="utf-8" From: Zheng Chuan Report migration thread pid to libvirt in order to pin migration thread to different cpu. --- migration/migration.c | 3 +++ qapi/migration.json | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index 52b5d39244..2534e5a1f1 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -3955,6 +3955,9 @@ static void *migration_thread(void *opaque) MigThrError thr_error; bool urgent =3D false; =20 + /* report migration thread pid to libvirt */ + qapi_event_send_migration_pid(qemu_get_thread_id()); + rcu_register_thread(); =20 object_ref(OBJECT(s)); diff --git a/qapi/migration.json b/qapi/migration.json index 88ecf86ac8..aafc940617 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1286,6 +1286,18 @@ { 'event': 'MIGRATION_PASS', 'data': { 'pass': 'int' } } =20 +## +# @MIGRATION_PID: +# +# Emitted when migration thread appear +# +# @pid: pid of migration thread +# +# Since: 7.2 +## +{ 'event': 'MIGRATION_PID', + 'data': { 'pid': 'int' } } + ## # @COLOMessage: # --=20 2.33.0 From nobody Sun May 19 07:31:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1673266780; cv=none; d=zohomail.com; s=zohoarc; b=AGzgb/z0GvC971AnGMpn1JwwRkVW733JYJWoA7RdbK/CyWzjfr+irTDAMknIuMynUwVqrPAKl0sK1FGqU9kgBdVdWWFLp3UIAcjUD1miKjO9OatJySjYgXBgw4dWojt06BNlHoISvq49rBCBfkL7JzjiONEujT8soi6lG+LfDfw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673266780; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=rVCMks0KXmUFPoYHsNhjEBUtcBuUoKrQU1iksLX0wk4=; b=ad8HC2+cQSgTBMQsi+R55yiqdTH42dFB5/MhazWkG3jvguLIbueKW5xE8H+vQrFjs2yXXio9wPrMq7VLrzx3aeESeGrByChp5ysMWYz9CSovmP1JLI4sRV80QmnSKjf/8MPr1cih+vjFgV6TWoECzUjVmziqQKqrMyO2bfG5Vtk= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 1673266780656129.37323316819993; Mon, 9 Jan 2023 04:19:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEr7Q-0006hi-9o; Mon, 09 Jan 2023 07:19:12 -0500 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 1pEr7N-0006eC-PW for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:19:09 -0500 Received: from szxga01-in.huawei.com ([45.249.212.187]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pEr7L-0003Hi-FJ for qemu-devel@nongnu.org; Mon, 09 Jan 2023 07:19:09 -0500 Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NrCcp4xtgznVCN; Mon, 9 Jan 2023 20:17:30 +0800 (CST) Received: from localhost.localdomain (10.175.124.27) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 9 Jan 2023 20:19:03 +0800 To: CC: , , , , , , Subject: [RESEND PATCH 2/2] migration: report multiFd related thread pid to libvirt Date: Mon, 9 Jan 2023 20:12:35 +0800 Message-ID: <20230109121235.2666476-3-jiangjiacheng@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230109121235.2666476-1-jiangjiacheng@huawei.com> References: <20230109121235.2666476-1-jiangjiacheng@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500022.china.huawei.com (7.185.36.66) X-CFilter-Loop: Reflected 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=45.249.212.187; envelope-from=jiangjiacheng@huawei.com; helo=szxga01-in.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, 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: , Reply-to: Jiang Jiacheng From: Jiang Jiacheng via Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1673266781204100001 Content-Type: text/plain; charset="utf-8" From: Zheng Chuan Report multiFd related thread pid to libvirt in order to pin multiFd thread to different cpu. --- migration/multifd.c | 4 ++++ qapi/migration.json | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/migration/multifd.c b/migration/multifd.c index 000ca4d4ec..f3f7e8ae31 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -17,6 +17,7 @@ #include "exec/ramblock.h" #include "qemu/error-report.h" #include "qapi/error.h" +#include "qapi/qapi-events-migration.h" #include "ram.h" #include "migration.h" #include "socket.h" @@ -650,6 +651,9 @@ static void *multifd_send_thread(void *opaque) int ret =3D 0; bool use_zero_copy_send =3D migrate_use_zero_copy_send(); =20 + /* report multifd thread pid to libvirt */ + qapi_event_send_migration_multifd_pid(qemu_get_thread_id()); + trace_multifd_send_thread_start(p->id); rcu_register_thread(); =20 diff --git a/qapi/migration.json b/qapi/migration.json index aafc940617..33fc319329 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -1286,6 +1286,18 @@ { 'event': 'MIGRATION_PASS', 'data': { 'pass': 'int' } } =20 +## +# @MIGRATION_MULTIFD_PID: +# +# Emitted when multifd thread appear +# +# @pid: pid of multifd thread +# +# Since: 7.2 +## +{ 'event': 'MIGRATION_MULTIFD_PID', + 'data': { 'pid': 'int' } } + ## # @MIGRATION_PID: # --=20 2.33.0