From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D4D8C4338F for ; Fri, 23 Jul 2021 07:51:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 139CB60EBD for ; Fri, 23 Jul 2021 07:51:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 139CB60EBD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:50834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6pyL-0008Oi-7Y for qemu-devel@archiver.kernel.org; Fri, 23 Jul 2021 03:51:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6pwx-0007HB-ED for qemu-devel@nongnu.org; Fri, 23 Jul 2021 03:50:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:35254) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6pws-0001P9-VL for qemu-devel@nongnu.org; Fri, 23 Jul 2021 03:50:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627026622; 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=HbGkJXD/fNICnlay3/xcrHhiq5jqGyc9cZ+9+PiImYk=; b=FrBTOeubrQ8sB+qOPgeRDlmHpKEfmHRIbyURX5Rq/Gy39TZr03PF1uvr+Vy5lo8f+FVhII VGfoCP6BSEu4/mZq/UEWszLCcu4fMPdYudcbxzerfHQt76JOMhwEMUUZSAsltQG66wy/hb eosbjRaYl23zE7U1iGwCObcznhpi2Tg= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-149-_j8C5GYYPGWlKgB37YTwMA-1; Fri, 23 Jul 2021 03:50:21 -0400 X-MC-Unique: _j8C5GYYPGWlKgB37YTwMA-1 Received: by mail-wm1-f72.google.com with SMTP id f10-20020a7bcc0a0000b0290229a389ceb2so1146423wmh.0 for ; Fri, 23 Jul 2021 00:50:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:organization:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=HbGkJXD/fNICnlay3/xcrHhiq5jqGyc9cZ+9+PiImYk=; b=RECXzIr4ydqNX2n07O4AA8ohpI/sKKGwxBhdTglDiE0xm/GDeVA0dK+c0xMvDPi0lL m2fCDzO+R/v/GBZ9997E/agT/M5NNhDTIpru7BNO3zpmfoMhBPKGmeMXRkfP1hl1rafn 5gA0CiwShT2+fSl6b83keqcUzqEAv/KSB+Ioaha5KPbwgCoAiheXPC/LiG+Xq1CPPBdN 8aoDzv3XiUlneaNkDmYoeN35brq9FxukWsF0IpsKs1nSHUg+P2rcXef2vYvwAKpZtA2a UUTFHjvpisxNmc0Qm+eQ1n+zaKvTJtrSsm8gew7t4FYZapzc0Yl8eplr5FfpOEmKKakE faQA== X-Gm-Message-State: AOAM530l/3EavT1c5fhmGYYZeg6LF0yGTGYz9h8FvoMZb2w58grqh6ii LX0SJE5Zovja5mCda/9oxQiRmX9jmMZkH55I2FLgy0VPspFoxoJ1NfpdqX+uB0dhsVkq1ZNlo69 mST24BrxLnhL+PFw= X-Received: by 2002:adf:ea4c:: with SMTP id j12mr3782565wrn.138.1627026619995; Fri, 23 Jul 2021 00:50:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrjlGKK6fgveqv6hoGzUEBJ/rroHBObMl7UPqH4+IhQNalhDvPYEWMOk2v8RH/1OqOqogDWQ== X-Received: by 2002:adf:ea4c:: with SMTP id j12mr3782548wrn.138.1627026619791; Fri, 23 Jul 2021 00:50:19 -0700 (PDT) Received: from [192.168.3.132] (p5b0c676e.dip0.t-ipconnect.de. [91.12.103.110]) by smtp.gmail.com with ESMTPSA id u2sm26149881wmc.42.2021.07.23.00.50.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Jul 2021 00:50:19 -0700 (PDT) To: Peter Xu References: <20210722083055.23352-1-wei.w.wang@intel.com> <0faf5f01-399f-621f-431e-d35b3e87b9ff@redhat.com> From: David Hildenbrand Organization: Red Hat Subject: Re: [PATCH v3] migration: clear the memory region dirty bitmap when skipping free pages Message-ID: <087670b0-d28c-7f3d-caf4-f37acf8f7d7e@redhat.com> Date: Fri, 23 Jul 2021 09:50:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=216.205.24.124; envelope-from=david@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) DKIMWL_WL_HIGH=-1.472, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.203, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Wang, Wei W" , "mst@redhat.com" , "qemu-devel@nongnu.org" , "dgilbert@redhat.com" , "quintela@redhat.com" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 22.07.21 19:41, Peter Xu wrote: > On Thu, Jul 22, 2021 at 04:51:48PM +0200, David Hildenbrand wrote: >> I'll give it a churn. > > Thanks, David. > Migration of a 8 GiB VM * within the same host * after Linux is up and idle * free page hinting enabled * after dirtying most VM memory using memhog * keeping bandwidth set to QEMU defaults * On my 16 GiB notebook with other stuff running Current upstream with 63268c4970a, without this patch: total time: 28606 ms downtime: 33 ms setup: 3 ms transferred ram: 3722913 kbytes throughput: 1066.37 mbps remaining ram: 0 kbytes total ram: 8389384 kbytes duplicate: 21674 pages skipped: 0 pages normal: 928866 pages normal bytes: 3715464 kbytes dirty sync count: 5 pages-per-second: 32710 Current upstream without 63268c4970a, without this patch: total time: 28530 ms downtime: 277 ms setup: 4 ms transferred ram: 3726266 kbytes throughput: 1070.21 mbps remaining ram: 0 kbytes total ram: 8389384 kbytes duplicate: 21890 pages skipped: 0 pages normal: 929702 pages normal bytes: 3718808 kbytes dirty sync count: 5 pages-per-second: 32710 Current upstream without 63268c4970a, with this patch: total time: 5115 ms downtime: 37 ms setup: 5 ms transferred ram: 659532 kbytes throughput: 1057.94 mbps remaining ram: 0 kbytes total ram: 8389384 kbytes duplicate: 20748 pages skipped: 0 pages normal: 164516 pages normal bytes: 658064 kbytes dirty sync count: 4 pages-per-second: 32710 Current upstream with 63268c4970a, with this patch: total time: 5205 ms downtime: 45 ms setup: 3 ms transferred ram: 659636 kbytes throughput: 1039.39 mbps remaining ram: 0 kbytes total ram: 8389384 kbytes duplicate: 20264 pages skipped: 0 pages normal: 164543 pages normal bytes: 658172 kbytes dirty sync count: 4 pages-per-second: 32710 I repeated the last two measurements two times and took the "better" results. Looks like this patch does it job and that 63268c4970a doesn't seem to degrade migration in this combination/setup significantly (if at all, we would have to do more measurements). -- Thanks, David / dhildenb