From patchwork Tue Dec 21 09:34:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Edmondson X-Patchwork-Id: 12689325 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44338C433EF for ; Tue, 21 Dec 2021 09:37:13 +0000 (UTC) Received: from localhost ([::1]:53836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzba3-0006P4-Pd for qemu-devel@archiver.kernel.org; Tue, 21 Dec 2021 04:37:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzbXq-0004wo-Vk for qemu-devel@nongnu.org; Tue, 21 Dec 2021 04:34:54 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:8862) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzbXo-0002TW-9y for qemu-devel@nongnu.org; Tue, 21 Dec 2021 04:34:54 -0500 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1BL8xKot004454; Tue, 21 Dec 2021 09:34:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=nLZLgSEF66v8G2Q5JeKEtpH1/CVa74aEsHHFj/2a6UI=; b=XDjqDCxDlI3b8PSCBptv1K9tEYL5GPduJuLaXpekNRyMdnIZttDsfXjvlcftFslad+3P it3y4LlsCqiwSGOnxYzuO1OgzYvWmZEBCmKhd9ALbuUuYwHSp9dFp1v/yoi3/p+3bzcB KgFUAqUeF54+8qCIpdUs1cD998OSOpL76N6mjDlfPEXltaCC7e5H+QC0WwHs3zaE0LfE 9lcsCwdRcwxvOUna3nxxLrRvZFLu7XiOzG9Tqp57PtnkI4AfsfXzUaFFII3yL0B8Qixo Y1YtdJE3tF1iKxT98R9huYvEXNUFQdEsnV/WOs6g7FD2uQEM1d4rp0CEcIT2b6m8papm Lw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3d2qk2as6s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Dec 2021 09:34:49 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1BL9Gk9W069723; Tue, 21 Dec 2021 09:34:48 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2172.outbound.protection.outlook.com [104.47.59.172]) by aserp3030.oracle.com with ESMTP id 3d15pd072j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Dec 2021 09:34:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZYGwlP55yGCI9rTs6YoFo0RJIZYEckShgGVOQfggB5EpU2GhmYZnfF3evekotXIy2ADJzkvpbGR3BTKoqs9h5gGWdacwX2YUIj2Yc31FFHZcozjWKWPblFDHtNZ3K360Ah9lxy5l4BDFZyRSUk2j6eQH1SGLF819yq9QDRmmPD5xKu0e9lJumNbE6EplT6Z8flIC638LNl/9rbJcRqLYAH8Qr4ZAFUjwlAGaJQ/m1KrCyq5Peo4XvfSqfA0HWiwXTJhUs/dOOOt9Ndzm4qcRskB2Kmu8p8UmRvr4WjG6YoD0JD3gYlP5zW986WxJ0UDCuXUbV7FU4h1fx369SK9ubw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nLZLgSEF66v8G2Q5JeKEtpH1/CVa74aEsHHFj/2a6UI=; b=cxm6IHgdlXcfuJ1CKed4wsHbyJsV9Z3Oc7tp1vPMFTxiZ7lzIJrK7WE/UVCXNyx7/X/LqL+936jkvH+O9mxwXVdF6U+hxrpzy43E+az0iaRW77+pjwnJjzqF8LqaGiyFcy4rAGFTrY8LSdFwkEtCy9wEaboIlqZPCQClpy4eXaEHc49TqhCP2SvAvC+8YGfYUKetKKa6nyM3ZDK1NEAV61jYKiiCV7Wwr8Dx7iOdLijGNadd0m4nbET+SVAybgQuCgcxyZNSJucbDmlT2O+JHkC5anZOH1EujE1AJBG0UC2JSDxRGi1m5ibzDaYxWiEhevnqAVyXmDo+z7MMRu++0w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nLZLgSEF66v8G2Q5JeKEtpH1/CVa74aEsHHFj/2a6UI=; b=zudjxuc02Ph5iwKFMNnx85zbRZO+bf7bz8L0Qk2m0yATFRP4uKFPvV7MF5GIACKETP8qjvfxpEkHp25fZxKYTue3UCQHICNhgp8OJKbVyw9lorTpcjzRpe+gnzwe0RcyrXkREjn+9ZQJgs6G11ck5bQR68CChLMpng93aShc9KA= Received: from DM6PR10MB3148.namprd10.prod.outlook.com (2603:10b6:5:1a4::21) by DM5PR1001MB2267.namprd10.prod.outlook.com (2603:10b6:4:2e::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.19; Tue, 21 Dec 2021 09:34:46 +0000 Received: from DM6PR10MB3148.namprd10.prod.outlook.com ([fe80::c517:d737:a012:1a0e]) by DM6PR10MB3148.namprd10.prod.outlook.com ([fe80::c517:d737:a012:1a0e%6]) with mapi id 15.20.4801.020; Tue, 21 Dec 2021 09:34:46 +0000 From: David Edmondson To: qemu-devel@nongnu.org Subject: [PATCH v3 0/2] migration: Tally pre-copy, downtime and post-copy bytes independently Date: Tue, 21 Dec 2021 09:34:39 +0000 Message-Id: <20211221093441.1445590-1-david.edmondson@oracle.com> X-Mailer: git-send-email 2.33.0 X-ClientProxiedBy: LO2P265CA0278.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a1::26) To DM6PR10MB3148.namprd10.prod.outlook.com (2603:10b6:5:1a4::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6fb93a88-012b-405d-1674-08d9c465206e X-MS-TrafficTypeDiagnostic: DM5PR1001MB2267:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: plYxvqCfpzeONovCdtqPSd11NnAs9rz9B5HsCtiAS1706dfQrkzU6l8BBhd1jvWbFh7YViWjiOVxb0MdNcmt/kcvH7jnJfddC6HkgPbBSs3muQXSj4KT9WKVQOnDezJDMU1ONwFMlCXhiIC1iLST6rYspUdNRuCov3m8FRvqysEn3S5XwpLvTWSpYpODOQ6En3DldOoBFungP7Pd9PmYQJ2CTiLEblLRGyjkyGIEfLJMGGJ/4fPhkStgtFTOJFyACiWbVKAwd+UmRqiw2a12/hCThWIImJDWRbjzHGrO6mm+2ou95VDLZqt8eQAIok/Bm7R1MqaveMtDVyWgjfWxceScZ9Ds+/eTUaArXaDbMoabzs4ssDeDyArmLmsR2gxu39hVxSp3TAJf8iYV00SATS1vQ8XCszQfXjLkHlxyieleqcD9KMK3ZuMs4nZc0JHDzbp2JBqWgngr9a0b4vlBGb4lYgTqSutl43xH95L2vqbf1EoZomh2CGCRJbESgGIPf/1LpsR2cjQS6wgn2BxaswPEAPgWFaHLTDXioop6MDinEdyRxmDuu20HOwkE87ae2poHX8orHT9mCvs4g9FeiB7CagNaNxWA7jfTPilXhU9DcJKU8GZD7tJKrxOvV7XBJXaPnGqGXF7/53V7lCq96A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR10MB3148.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(8676002)(4744005)(52116002)(1076003)(83380400001)(54906003)(6512007)(44832011)(186003)(5660300002)(6486002)(86362001)(38100700002)(36756003)(8936002)(508600001)(66556008)(2616005)(6666004)(6916009)(6506007)(2906002)(316002)(4326008)(107886003)(66476007)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ftABEG0T04wMIAA/Av/osEyBfXIB?= =?utf-8?q?BufJ/wKY01YDZg3Dq/AAcyILdOWtpvIh2oj5CMVNd16hsLm6biOpXv7xq944lwa19?= =?utf-8?q?/RATrqL75MzeScLAf1TPqSefnqtB6VHlmaMFgfdLAGnNmkUEmMoHZ/jovw/pgZQln?= =?utf-8?q?IXMNFAicDX25S3HEK5ocDeTUXnfokEWBO3v+OUzWaom0zU59A+wwibAnvlfQniOUb?= =?utf-8?q?ZgvYrM2p9ybjHJN3ge1T3YZZk2A48cXf+1bBIIpvv9hFiqUjchV790weddtW21m8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?utf-8?q?gDcORLAtqJ9NZOAvetieidr4zYsFhpKyrXp5hJR7fyAq3mAYIFnE3/SaREQSuQsJD?= =?utf-8?q?rTEo028N8MLpPXACYsP2AuBSrg0Hf9rg/4MdTv0JEiYUgt2smJkOtxeYX9PLNQnKB?= =?utf-8?q?fgJCnUSG2z3GkBjRw5K+5DINYQKS9Oa46iNDuJeq/ZSJ77g21z1tlBcr+Oe/e4FgE?= =?utf-8?q?oUnZC8mn9zWvInuIIffNfQpdOy4RQEWLttzZLR84JnxJWMkBAIIsGN66oa2+lxuyr?= =?utf-8?q?DCY4f6cTM9TJZMq5npnqquy3aVeHcLtDbJHeGb0RNi1K6IaLdmts8bzu7ceF9DINQ?= =?utf-8?q?AfXCuzd40acMtwkdGyL2eYdN/+IXwubL44jDxxBOxAoMoAUANOYeClhAfueC2QVcw?= =?utf-8?q?jK/6OeBnhWjmms7oI3SBNgAr8a1pleINn570hhwx4Q2kGE/AjFK48ylD7LuUt5jJV?= =?utf-8?q?Q0d1ULzMXbAZ82Z+aHtumhiuroONGUBMQ3qfQK1ye/bhc2djxb33FisZJFTcUc7Nw?= =?utf-8?q?Ok0gEdjgQR?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6fb93a88-012b-405d-1674-08d9c465206e X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB3148.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2021 09:34:46.6961 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tEye7yDfSuzwtrDYf4ZLLfxxu80+6uQP5qm4YIVZI6mRb4OW0yzQh6DSnQGZR8+dwMcu7B1yx2+xbTcHzYv/Ob6WKJn2B3OcvZ14L++YyKU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1001MB2267 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10204 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=806 malwarescore=0 mlxscore=0 spamscore=0 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112210041 X-Proofpoint-GUID: _b2o87h_sTNwzrOxZDvUiypNyr-Q1H0F X-Proofpoint-ORIG-GUID: _b2o87h_sTNwzrOxZDvUiypNyr-Q1H0F Received-SPF: pass client-ip=205.220.177.32; envelope-from=david.edmondson@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-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: , Cc: David Edmondson , Eric Blake , Markus Armbruster , "Dr. David Alan Gilbert" , Juan Quintela Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" When examining a report of poor migration behaviour, it would often be useful to understand how much data was transferred in different phases of the migration process. For example, if the downtime limit is exceeded, to know how much data was transferred during the downtime. RFC because the name "ram_transferred_add" doesn't seem great, and I'm unsure whether the tests to determine the phase in the second patch are the most appropriate. v3: - Add r-by (Philippe) - Improve a commit message (Philippe) v2: - ram_transferred_add() should be static (Philippe) - Document the new MigrationStats fields (dme) David Edmondson (2): migration: Introduce ram_transferred_add() migration: Tally pre-copy, downtime and post-copy bytes independently migration/migration.c | 3 +++ migration/ram.c | 30 +++++++++++++++++++++--------- monitor/hmp-cmds.c | 12 ++++++++++++ qapi/migration.json | 13 ++++++++++++- 4 files changed, 48 insertions(+), 10 deletions(-)