From nobody Mon Feb 9 00:55:21 2026 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; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=2; a=rsa-sha256; t=1595580330; cv=pass; d=zohomail.com; s=zohoarc; b=KHqGe1CbYQDKqougdbLYMrn1LgqV5f09LkbqTtCfZo5rFRiueA7X7TO57RfabJG9+ihoOwCxw8tghHA67UhMfbfaU/K6d1i0FnSdKKvspSX2HiiVIs/NpYgWHRd6x9j7LRcw/PDEJUdc/ch2nBcik0LIdGQj84uiAvoPOiRhAPA= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595580330; 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:References:Sender:Subject:To; bh=ag2OZSd4XEK0WPwnOZnDuD4ozl6LXYHngLXM4paMDsk=; b=jh3WdrPpUyTBTNFNGwVo2TgGdk/jKRwob81vPwBI8/zSIgAuzZvJr4hl1VETDoDKqDhnTRIoHSd9rkfe5iH13rns/omIzf+OI46T9xqGPSizBd84fX34RuSjxO2nlvd1Hdnq5IYQhHXinJJ/edZfupxfvthJ3IQpOG2ar6o5kgA= ARC-Authentication-Results: i=2; 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; arc=pass (i=1dmarc=pass fromdomain=virtuozzo.com); dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15955803303971006.9108590337826; Fri, 24 Jul 2020 01:45:30 -0700 (PDT) Received: from localhost ([::1]:50072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jytKb-0004Ov-3u for importer@patchew.org; Fri, 24 Jul 2020 04:45:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jytJ3-0001Md-Ka; Fri, 24 Jul 2020 04:43:53 -0400 Received: from mail-am6eur05on2134.outbound.protection.outlook.com ([40.107.22.134]:63329 helo=EUR05-AM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jytJ1-0008OD-NW; Fri, 24 Jul 2020 04:43:53 -0400 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) by AM6PR08MB4534.eurprd08.prod.outlook.com (2603:10a6:20b:ba::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3195.17; Fri, 24 Jul 2020 08:43:47 +0000 Received: from AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::8c0c:c056:97a5:484a]) by AM7PR08MB5494.eurprd08.prod.outlook.com ([fe80::8c0c:c056:97a5:484a%4]) with mapi id 15.20.3216.024; Fri, 24 Jul 2020 08:43:47 +0000 Received: from localhost.localdomain (185.215.60.156) by AM0PR01CA0160.eurprd01.prod.exchangelabs.com (2603:10a6:208:aa::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.21 via Frontend Transport; Fri, 24 Jul 2020 08:43:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W3GW5EHgxL3HxobQZTcjihkWXjRX6cdL4cmzmhbwuWmlUH39KpUV1JHaAF+t7XsFDjHyky4qRgEKETjoCeKEBEyAM6JMsdVWAg1Nqs+/d/ZZM3ivxpuB1pAWDV1cFjPIOuDvE1o2oBSJty+tS7pN/bu9wr/L6GthIufV4cWTzmWLNCwhyysLE2tWrAmUhid8OHVZXAQ+NXux1mFlsRyNUT5B3rcUcUN6x07ZUZzXeUMq45gDDBJHwT3ueQpclDZo+nyeIGxyKxiIHWWofe8ua5qRj2YOBvjZwzRAyG9n0nrilXtNG9HOZyRCIxAbFb8cfQHEO5Ol0roXE6q8GgrFmA== 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-SenderADCheck; bh=ag2OZSd4XEK0WPwnOZnDuD4ozl6LXYHngLXM4paMDsk=; b=bd6IBdPnC/IjB8WTy5l8kQtzoCvQUjVoFZ8TglPqcpaPN6FVRcYkxYET7txRRRH4OdSVmRXvx3T5wLZTxS61uCqkJIXvffCNeVsuTN54iZ+Qy0uW4GjMoT4JdKu0pMV+TYFidNY1wq3DhWELGhiX1K6R6KVj2qj8Dl/vQRvuKzpe7aDvafAZ1g20BOH11ql9x4TdyRYuDzXQmsHkB/wywcWvmDY/D0Cj/3N7Sgr4bYe7kvokZ9acGCRJ8j9dYRkqshkfXmgaamDvAcILynRCPuZpamLodeE0KqpKBb7KCudYUMoF1JoLWn9OKn8s5JmFdOb3nKQqgk33B1khR4Feqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ag2OZSd4XEK0WPwnOZnDuD4ozl6LXYHngLXM4paMDsk=; b=onryG/w9BXq9DAu9CAXjb9ja9K838+Yo2j626kvZui9YXgIgNVvYYQuAUb8uKeZsfCZRHl6bgQPYDmT7yk/QZgcJ02wiPDu0c7zCtOiHsHeOCzJgrGCiRWE10+5IK6hf2rweYLE7/BWDlQTPY566bTDh0WOmx5/NUk7iIzP/nHs= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Subject: [PATCH v3 05/21] qemu-iotests/199: change discard patterns Date: Fri, 24 Jul 2020 11:43:11 +0300 Message-Id: <20200724084327.15665-6-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200724084327.15665-1-vsementsov@virtuozzo.com> References: <20200724084327.15665-1-vsementsov@virtuozzo.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0PR01CA0160.eurprd01.prod.exchangelabs.com (2603:10a6:208:aa::29) To AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-Mailer: git-send-email 2.21.0 X-Originating-IP: [185.215.60.156] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4212e3c3-28ee-4254-dcb2-08d82fadae50 X-MS-TrafficTypeDiagnostic: AM6PR08MB4534: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:34; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 36JT+Kiqlv4G9wycf4B+mHj8FEH9r+kJVsJKC2e+zECDsEPgxilVB9lGaBU5swHL701eLRPOdDzND2WmxTe8xP58jQ2FbCAYS+edOj5YViDiGu7DfLDxCyedLmOp5tNtk7nkla1sVK9UKXmu0I33bfu0f7tPyhbVfqu93FigAUWRjzjokFD6dv86vz7Ie/WiQ8sNkzjzw8blcd2jdEBcg6fgrmPZftyNBNaB47N8plDNvGPLAYGBYQIzS8QbeoSxC9SRCHT9H/i1a8QQv/uFaLkpwbx1EHCgEU6Zz9xBeRIHH2faWrVSYZsFWQwY7eJgcDA/C5U4X3W4FX9Hlfvr9/rGdSlEUrBh3LeDknX7FqLx/Ajd57gT8XZxHyfPsWIs X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR08MB5494.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(346002)(396003)(136003)(39840400004)(376002)(6512007)(6916009)(66476007)(8676002)(66556008)(52116002)(66946007)(4326008)(83380400001)(6506007)(36756003)(6486002)(956004)(26005)(6666004)(2616005)(69590400007)(7416002)(186003)(5660300002)(478600001)(8936002)(2906002)(107886003)(16526019)(86362001)(316002)(1076003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: CrggtobVk+pAaugJoLejVnbWvAr2RpZ3inxoc9Rzr/k1N5UbVMmLasNKqlh00HDgIt0DxpnRyRHJw7C8bjnjoM7GlRqXfG1syzCg0unMlJRRvjilPn7moJCg5EkTgyR6wCVBtpYdNzo2OZbRg0Si4cuhHV/6aoq4dY1CmKo6a2RKmEABS0Q7ml0e3kh0NNYrGGFmh7P1KXaz1eUQmyhYCutjUV8Gq1dik29i8YS9rq4Fs0g0xqcG8Wc75KCkpH4cE96an/CGAlze1Pny59ZmOZ+ecY94tyTuJwwQ4s+zeHC+Fa/VUddOZrEH8Xpy8Pt+OWy1onLz2ZGdEu72fyG1CjQg9QG1BmFzlJSeGgZJgT9r3PydBlxtgh6ED3thfeSEXLXTtXe4L3Ketzg3Fci412MnwvR4u/xAdVswLwgxfaeArEgZwuMR0jeo8NBUa/yPbsm2oMmdRYD3v7rl+4UP1sNdZ+9ptBiLXxD5WbxbJaw= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4212e3c3-28ee-4254-dcb2-08d82fadae50 X-MS-Exchange-CrossTenant-AuthSource: AM7PR08MB5494.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2020 08:43:47.4711 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: oD53SDHa/RKgo8Il0yTH/zmV2LNJ3HUvuNSb6UtfHjNi3ny2QZVGmZDfUzhLKFGlEod/ZZUVAlDwWCZY+F2ed464/JCYkmpckk192RE3tMA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4534 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=40.107.22.134; envelope-from=vsementsov@virtuozzo.com; helo=EUR05-AM6-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/24 04:43:47 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, fam@euphon.net, vsementsov@virtuozzo.com, quintela@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com, stefanha@redhat.com, andrey.shinkevich@virtuozzo.com, den@openvz.org, mreitz@redhat.com, jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @virtuozzo.com) Content-Type: text/plain; charset="utf-8" iotest 199 works too long because of many discard operations. At the same time, postcopy period is very short, in spite of all these efforts. So, let's use less discards (and with more interesting patterns) to reduce test timing. In the next commit we'll increase postcopy period. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich Tested-by: Eric Blake --- tests/qemu-iotests/199 | 44 +++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/tests/qemu-iotests/199 b/tests/qemu-iotests/199 index 190e820b84..da4dae01fb 100755 --- a/tests/qemu-iotests/199 +++ b/tests/qemu-iotests/199 @@ -30,6 +30,28 @@ size =3D '256G' fifo =3D os.path.join(iotests.test_dir, 'mig_fifo') =20 =20 +GiB =3D 1024 * 1024 * 1024 + +discards1 =3D ( + (0, GiB), + (2 * GiB + 512 * 5, 512), + (3 * GiB + 512 * 5, 512), + (100 * GiB, GiB) +) + +discards2 =3D ( + (3 * GiB + 512 * 8, 512), + (4 * GiB + 512 * 8, 512), + (50 * GiB, GiB), + (100 * GiB + GiB // 2, GiB) +) + + +def apply_discards(vm, discards): + for d in discards: + vm.hmp_qemu_io('drive0', 'discard {} {}'.format(*d)) + + def event_seconds(event): return event['timestamp']['seconds'] + \ event['timestamp']['microseconds'] / 1000000.0 @@ -80,9 +102,7 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCa= se): self.vm_b_events =3D [] =20 def test_postcopy(self): - discard_size =3D 0x40000000 granularity =3D 512 - chunk =3D 4096 =20 result =3D self.vm_a.qmp('block-dirty-bitmap-add', node=3D'drive0', name=3D'bitmap', granularity=3Dgranularity) @@ -92,14 +112,7 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestC= ase): node=3D'drive0', name=3D'bitmap') empty_sha256 =3D result['return']['sha256'] =20 - s =3D 0 - while s < discard_size: - self.vm_a.hmp_qemu_io('drive0', 'discard %d %d' % (s, chunk)) - s +=3D 0x10000 - s =3D 0x8000 - while s < discard_size: - self.vm_a.hmp_qemu_io('drive0', 'discard %d %d' % (s, chunk)) - s +=3D 0x10000 + apply_discards(self.vm_a, discards1 + discards2) =20 result =3D self.vm_a.qmp('x-debug-block-dirty-bitmap-sha256', node=3D'drive0', name=3D'bitmap') @@ -111,10 +124,8 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTest= Case): result =3D self.vm_a.qmp('block-dirty-bitmap-clear', node=3D'drive= 0', name=3D'bitmap') self.assert_qmp(result, 'return', {}) - s =3D 0 - while s < discard_size: - self.vm_a.hmp_qemu_io('drive0', 'discard %d %d' % (s, chunk)) - s +=3D 0x10000 + + apply_discards(self.vm_a, discards1) =20 caps =3D [{'capability': 'dirty-bitmaps', 'state': True}, {'capability': 'events', 'state': True}] @@ -134,10 +145,7 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTest= Case): event_resume =3D self.vm_b.event_wait('RESUME') self.vm_b_events.append(event_resume) =20 - s =3D 0x8000 - while s < discard_size: - self.vm_b.hmp_qemu_io('drive0', 'discard %d %d' % (s, chunk)) - s +=3D 0x10000 + apply_discards(self.vm_b, discards2) =20 match =3D {'data': {'status': 'completed'}} event_complete =3D self.vm_b.event_wait('MIGRATION', match=3Dmatch) --=20 2.21.0