From 90cbeec3d956f5f5b0ba5395a1e341c7b1329d27 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 27 Jul 2015 10:24:13 +0200 Subject: [PATCH] remove mirror-sleep patches (now upstream) --- debian/patches/mirror-sleep.patch | 58 ------------ debian/patches/mirror-sleep2.patch | 137 ----------------------------- debian/patches/series | 2 - 3 files changed, 197 deletions(-) delete mode 100644 debian/patches/mirror-sleep.patch delete mode 100644 debian/patches/mirror-sleep2.patch diff --git a/debian/patches/mirror-sleep.patch b/debian/patches/mirror-sleep.patch deleted file mode 100644 index 0e2208d..0000000 --- a/debian/patches/mirror-sleep.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 2540abec85433596dd04640b14f75ceb13bbb342 Mon Sep 17 00:00:00 2001 -From: Fam Zheng -Date: Wed, 13 May 2015 11:11:13 +0800 -Subject: [PATCH] block/mirror: Sleep periodically during bitmap scanning - -Before, we only yield after initializing dirty bitmap, where the QMP -command would return. That may take very long, and guest IO will be -blocked. - -Add sleep points like the later mirror iterations. - -Signed-off-by: Fam Zheng -Reviewed-by: Wen Congyang -Reviewed-by: Paolo Bonzini -Reviewed-by: Stefan Hajnoczi ---- - block/mirror.c | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/block/mirror.c b/block/mirror.c -index 4056164..0a05971 100644 ---- a/block/mirror.c -+++ b/block/mirror.c -@@ -444,11 +444,23 @@ static void coroutine_fn mirror_run(void *opaque) - sectors_per_chunk = s->granularity >> BDRV_SECTOR_BITS; - mirror_free_init(s); - -+ last_pause_ns = qemu_clock_get_ns(QEMU_CLOCK_REALTIME); - if (!s->is_none_mode) { - /* First part, loop on the sectors and initialize the dirty bitmap. */ - BlockDriverState *base = s->base; - for (sector_num = 0; sector_num < end; ) { - int64_t next = (sector_num | (sectors_per_chunk - 1)) + 1; -+ int64_t now = qemu_clock_get_ns(QEMU_CLOCK_REALTIME); -+ -+ if (now - last_pause_ns > SLICE_TIME) { -+ last_pause_ns = now; -+ block_job_sleep_ns(&s->common, QEMU_CLOCK_REALTIME, 0); -+ } -+ -+ if (block_job_is_cancelled(&s->common)) { -+ goto immediate_exit; -+ } -+ - ret = bdrv_is_allocated_above(bs, base, - sector_num, next - sector_num, &n); - -@@ -455,7 +467,6 @@ static void coroutine_fn mirror_run(void *opaque) - } - - bdrv_dirty_iter_init(s->dirty_bitmap, &s->hbi); -- last_pause_ns = qemu_clock_get_ns(QEMU_CLOCK_REALTIME); - for (;;) { - uint64_t delay_ns = 0; - int64_t cnt; --- -2.1.4 - diff --git a/debian/patches/mirror-sleep2.patch b/debian/patches/mirror-sleep2.patch deleted file mode 100644 index d7e57bc..0000000 --- a/debian/patches/mirror-sleep2.patch +++ /dev/null @@ -1,137 +0,0 @@ -Return-Path: qemu-devel-bounces+aderumier=odiso.com@nongnu.org -Received: from mailpro.odiso.net (LHLO mailpro.odiso.net) (10.1.31.112) by - mailpro.odiso.net with LMTP; Thu, 9 Jul 2015 05:48:28 +0200 (CEST) -Received: from localhost (localhost [127.0.0.1]) - by mailpro.odiso.net (Postfix) with ESMTP id E27A845C8E4B0 - for ; Thu, 9 Jul 2015 05:48:27 +0200 (CEST) -X-Virus-Scanned: amavisd-new at mailpro.odiso.com -X-Spam-Flag: NO -X-Spam-Score: 0 -X-Spam-Level: -X-Spam-Status: No, score=0 tagged_above=-10 required=4 - tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, SPF_PASS=-0.001] - autolearn=ham autolearn_force=no -Received: from mailpro.odiso.net ([127.0.0.1]) - by localhost (mailpro.odiso.net [127.0.0.1]) (amavisd-new, port 10024) - with ESMTP id dJJWUgwkqqGc for ; - Thu, 9 Jul 2015 05:48:26 +0200 (CEST) -Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) - by mailpro.odiso.net (Postfix) with ESMTPS id 79D8C40592FF1 - for ; Thu, 9 Jul 2015 05:48:26 +0200 (CEST) -Received: from localhost ([::1]:37746 helo=lists.gnu.org) - by lists.gnu.org with esmtp (Exim 4.71) - (envelope-from ) - id 1ZD2oz-0007BD-RV - for aderumier@odiso.com; Wed, 08 Jul 2015 23:48:25 -0400 -Received: from eggs.gnu.org ([2001:4830:134:3::10]:55387) - by lists.gnu.org with esmtp (Exim 4.71) - (envelope-from ) id 1ZD2oq-00078r-My - for qemu-devel@nongnu.org; Wed, 08 Jul 2015 23:48:17 -0400 -Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) - (envelope-from ) id 1ZD2op-0004hr-MC - for qemu-devel@nongnu.org; Wed, 08 Jul 2015 23:48:16 -0400 -Received: from mx1.redhat.com ([209.132.183.28]:44555) - by eggs.gnu.org with esmtp (Exim 4.71) - (envelope-from ) - id 1ZD2ol-0004g3-H0; Wed, 08 Jul 2015 23:48:11 -0400 -Received: from int-mx09.intmail.prod.int.phx2.redhat.com - (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) - by mx1.redhat.com (Postfix) with ESMTPS id 103F72B5EA0; - Thu, 9 Jul 2015 03:48:11 +0000 (UTC) -Received: from ad.nay.redhat.com. (dhcp-15-42.nay.redhat.com [10.66.15.42]) - by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP - id t693lwp6028288; Wed, 8 Jul 2015 23:48:08 -0400 -From: Fam Zheng -To: qemu-devel@nongnu.org -Date: Thu, 9 Jul 2015 11:47:58 +0800 -Message-Id: <1436413678-7114-4-git-send-email-famz@redhat.com> -In-Reply-To: <1436413678-7114-1-git-send-email-famz@redhat.com> -References: <1436413678-7114-1-git-send-email-famz@redhat.com> -X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 -X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x -X-Received-From: 209.132.183.28 -Cc: Kevin Wolf , Jeff Cody , - qemu-block@nongnu.org -Subject: [Qemu-devel] [PATCH 3/3] mirror: Speed up bitmap initial scanning -X-BeenThere: qemu-devel@nongnu.org -X-Mailman-Version: 2.1.14 -Precedence: list -List-Id: -List-Unsubscribe: , - -List-Archive: -List-Post: -List-Help: -List-Subscribe: , - -Errors-To: qemu-devel-bounces+aderumier=odiso.com@nongnu.org -Sender: qemu-devel-bounces+aderumier=odiso.com@nongnu.org - -Limiting to sectors_per_chunk for each bdrv_is_allocated_above is slow, -because the underlying protocol driver would issue much more queries -than necessary. We should coalesce the query. - -Signed-off-by: Fam Zheng ---- - block/mirror.c | 15 ++++++--------- - 1 file changed, 6 insertions(+), 9 deletions(-) - -diff --git a/block/mirror.c b/block/mirror.c -index ca55578..e8cb592 100644 ---- a/block/mirror.c -+++ b/block/mirror.c -@@ -387,7 +387,7 @@ static void coroutine_fn mirror_run(void *opaque) - MirrorBlockJob *s = opaque; - MirrorExitData *data; - BlockDriverState *bs = s->common.bs; -- int64_t sector_num, end, sectors_per_chunk, length; -+ int64_t sector_num, end, length; - uint64_t last_pause_ns; - BlockDriverInfo bdi; - char backing_filename[2]; /* we only need 2 characters because we are only -@@ -441,7 +441,6 @@ static void coroutine_fn mirror_run(void *opaque) - goto immediate_exit; - } - -- sectors_per_chunk = s->granularity >> BDRV_SECTOR_BITS; - mirror_free_init(s); - - last_pause_ns = qemu_clock_get_ns(QEMU_CLOCK_REALTIME); -@@ -449,7 +448,9 @@ static void coroutine_fn mirror_run(void *opaque) - /* First part, loop on the sectors and initialize the dirty bitmap. */ - BlockDriverState *base = s->base; - for (sector_num = 0; sector_num < end; ) { -- int64_t next = (sector_num | (sectors_per_chunk - 1)) + 1; -+ /* Just to make sure we are not exceeding int limit. */ -+ int nb_sectors = MIN(INT_MAX >> BDRV_SECTOR_BITS, -+ end - sector_num); - int64_t now = qemu_clock_get_ns(QEMU_CLOCK_REALTIME); - - if (now - last_pause_ns > SLICE_TIME) { -@@ -460,9 +461,7 @@ static void coroutine_fn mirror_run(void *opaque) - if (block_job_is_cancelled(&s->common)) { - goto immediate_exit; - } -- -- ret = bdrv_is_allocated_above(bs, base, -- sector_num, next - sector_num, &n); -+ ret = bdrv_is_allocated_above(bs, base, sector_num, nb_sectors, &n); - - if (ret < 0) { - goto immediate_exit; -@@ -471,10 +470,8 @@ static void coroutine_fn mirror_run(void *opaque) - assert(n > 0); - if (ret == 1) { - bdrv_set_dirty_bitmap(s->dirty_bitmap, sector_num, n); -- sector_num = next; -- } else { -- sector_num += n; - } -+ sector_num += n; - } - } - --- -2.4.3 - - diff --git a/debian/patches/series b/debian/patches/series index 6ee07fa..664e3f1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -31,5 +31,3 @@ glusterfs-daemonize.patch gluster-backupserver.patch add-qmp-get-link-status.patch jemalloc.patch -mirror-sleep.patch -mirror-sleep2.patch -- 2.39.2