From nobody Mon Feb 9 16:03:01 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1595883730; cv=none; d=zohomail.com; s=zohoarc; b=iOIUBOwSVrg7BnSIlscgfg4CNTBe0zx+8Bdb5ITPub8BLfXxuhIP2azGpdcW1LP+M9WL7wafzHs+GO+B+mDVKmz/kzgzDp9ceNWprRv6x+VuxcTwMCCTj5NMuiEECr3P9ykaqbHt4ENwCPHls9aHO0/psFwi9CSOiA9DG8ZxJ1Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595883730; 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=PD0Ql2SFu37Jc2pUAqddf4cWEviu9Iqud0o+66za5yI=; b=FlHmeSrnBPOLD1HrlopVXQv4xG3z3rUQ8/wZCJ1djadRw/5x1BJRbb4iIjQ/BGqhLbFw+pCgSD58WvCVj+9YLoWJW6h2IO/tFE47+bO6rnjbPBi2EZExxK88z6ff7mgMjkC6JJ+H4BOj4Btv/XFJ9rr5JcZ94slK4kHpSf1FCpo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail 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 1595883730372695.9893040263872; Mon, 27 Jul 2020 14:02:10 -0700 (PDT) Received: from localhost ([::1]:60534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k0AG8-0005ab-VJ for importer@patchew.org; Mon, 27 Jul 2020 17:02:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k0AAH-00057h-IA for qemu-devel@nongnu.org; Mon, 27 Jul 2020 16:56:05 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:44244 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k0AAF-0004u7-75 for qemu-devel@nongnu.org; Mon, 27 Jul 2020 16:56:05 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-388-ZtPzh8rcNJmqRZy6kXoLAw-1; Mon, 27 Jul 2020 16:56:00 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CD17558; Mon, 27 Jul 2020 20:55:58 +0000 (UTC) Received: from blue.redhat.com (ovpn-118-248.rdu2.redhat.com [10.10.118.248]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4832319724; Mon, 27 Jul 2020 20:55:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595883362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PD0Ql2SFu37Jc2pUAqddf4cWEviu9Iqud0o+66za5yI=; b=VhUpvir99RNFAIcd0V/anQ0K4vwB8h2qmHzcAmtSwSDlP9f8HrTuijRSdOz1sL0FcgqV6i l30zbZpLIA5KDdG5ddPdyAtGQ+hgd4LAwlxEQB6cdqDdRz5KnXnEfavvZ+WEks9dIKwYgT DOWyfnrsJ1FdD82iLaqYYRhHj/PX5mk= X-MC-Unique: ZtPzh8rcNJmqRZy6kXoLAw-1 From: Eric Blake To: qemu-devel@nongnu.org Subject: [PULL 06/24] qemu-iotests/199: change discard patterns Date: Mon, 27 Jul 2020 15:55:25 -0500 Message-Id: <20200727205543.206624-7-eblake@redhat.com> In-Reply-To: <20200727205543.206624-1-eblake@redhat.com> References: <20200727205543.206624-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=205.139.110.61; envelope-from=eblake@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/27 01:46:13 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, 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_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: Kevin Wolf , Andrey Shinkevich , Vladimir Sementsov-Ogievskiy , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Vladimir Sementsov-Ogievskiy 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 Message-Id: <20200727194236.19551-6-vsementsov@virtuozzo.com> Signed-off-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 190e820b8408..da4dae01fb5d 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') +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 [] def test_postcopy(self): - discard_size =3D 0x40000000 granularity =3D 512 - chunk =3D 4096 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'] - 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) 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) 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) - 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) match =3D {'data': {'status': 'completed'}} event_complete =3D self.vm_b.event_wait('MIGRATION', match=3Dmatch) --=20 2.27.0