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=-10.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 C820AC4708F for ; Wed, 2 Jun 2021 00:27:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A64B46124B for ; Wed, 2 Jun 2021 00:27:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229656AbhFBA3K (ORCPT ); Tue, 1 Jun 2021 20:29:10 -0400 Received: from prt-mail.chinatelecom.cn ([42.123.76.227]:42238 "EHLO chinatelecom.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229586AbhFBA3K (ORCPT ); Tue, 1 Jun 2021 20:29:10 -0400 HMM_SOURCE_IP: 172.18.0.48:35850.1746061569 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-110.184.66.8?logid-6a2457510f35480f852050c9164a9a69 (unknown [172.18.0.48]) by chinatelecom.cn (HERMES) with SMTP id B234D28009A; Wed, 2 Jun 2021 08:27:23 +0800 (CST) X-189-SAVE-TO-SEND: huangy81@chinatelecom.cn Received: from ([172.18.0.48]) by app0024 with ESMTP id 6a2457510f35480f852050c9164a9a69 for dgilbert@redhat.com; Wed Jun 2 08:27:24 2021 X-Transaction-ID: 6a2457510f35480f852050c9164a9a69 X-filter-score: filter<0> X-Real-From: huangy81@chinatelecom.cn X-Receive-IP: 172.18.0.48 X-MEDUSA-Status: 0 Sender: huangy81@chinatelecom.cn Subject: Re: [PATCH v1 2/6] KVM: introduce dirty_pages into CPUState To: Peter Xu Cc: qemu-devel@nongnu.org, Paolo Bonzini , kvm@vger.kernel.org, Juan Quintela , "Dr. David Alan Gilbert" References: <78cc154863754a93d88070d1fae9fed6a1ec5f01.1622479161.git.huangy81@chinatelecom.cn> From: Hyman Huang Message-ID: <2749938b-f775-ec5a-6ac5-d59cde656999@chinatelecom.cn> Date: Wed, 2 Jun 2021 08:27:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 在 2021/6/2 7:20, Peter Xu 写道: > On Tue, Jun 01, 2021 at 01:04:06AM +0800, huangy81@chinatelecom.cn wrote: >> diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h >> index 044f668a6e..973c193501 100644 >> --- a/include/hw/core/cpu.h >> +++ b/include/hw/core/cpu.h >> @@ -375,6 +375,8 @@ struct CPUState { >> struct kvm_run *kvm_run; >> struct kvm_dirty_gfn *kvm_dirty_gfns; >> uint32_t kvm_fetch_index; >> + uint64_t dirty_pages; >> + bool stat_dirty_pages; > > Shall we make this bool a global one? As I don't think we'll be able to only > enable it on a subset of cpus? Yes, it's a reasonable advice, i'll apply this on the next version > -- Best regard Hyman Huang(黄勇) 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=-10.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 DE933C47080 for ; Wed, 2 Jun 2021 00:29:21 +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 CDE97613C0 for ; Wed, 2 Jun 2021 00:29:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CDE97613C0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=chinatelecom.cn Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loEl5-0002dV-Pb for qemu-devel@archiver.kernel.org; Tue, 01 Jun 2021 20:29:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loEjP-0001Ef-Au for qemu-devel@nongnu.org; Tue, 01 Jun 2021 20:27:35 -0400 Received: from prt-mail.chinatelecom.cn ([42.123.76.227]:60626 helo=chinatelecom.cn) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loEjM-0005pq-Tj for qemu-devel@nongnu.org; Tue, 01 Jun 2021 20:27:34 -0400 HMM_SOURCE_IP: 172.18.0.48:35850.1746061569 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-110.184.66.8?logid-6a2457510f35480f852050c9164a9a69 (unknown [172.18.0.48]) by chinatelecom.cn (HERMES) with SMTP id B234D28009A; Wed, 2 Jun 2021 08:27:23 +0800 (CST) X-189-SAVE-TO-SEND: huangy81@chinatelecom.cn Received: from ([172.18.0.48]) by app0024 with ESMTP id 6a2457510f35480f852050c9164a9a69 for dgilbert@redhat.com; Wed Jun 2 08:27:24 2021 X-Transaction-ID: 6a2457510f35480f852050c9164a9a69 X-filter-score: filter<0> X-Real-From: huangy81@chinatelecom.cn X-Receive-IP: 172.18.0.48 X-MEDUSA-Status: 0 Subject: Re: [PATCH v1 2/6] KVM: introduce dirty_pages into CPUState To: Peter Xu References: <78cc154863754a93d88070d1fae9fed6a1ec5f01.1622479161.git.huangy81@chinatelecom.cn> From: Hyman Huang Message-ID: <2749938b-f775-ec5a-6ac5-d59cde656999@chinatelecom.cn> Date: Wed, 2 Jun 2021 08:27:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=42.123.76.227; envelope-from=huangy81@chinatelecom.cn; helo=chinatelecom.cn X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.613, SPF_HELO_PASS=-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: Paolo Bonzini , "Dr. David Alan Gilbert" , qemu-devel@nongnu.org, kvm@vger.kernel.org, Juan Quintela Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 在 2021/6/2 7:20, Peter Xu 写道: > On Tue, Jun 01, 2021 at 01:04:06AM +0800, huangy81@chinatelecom.cn wrote: >> diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h >> index 044f668a6e..973c193501 100644 >> --- a/include/hw/core/cpu.h >> +++ b/include/hw/core/cpu.h >> @@ -375,6 +375,8 @@ struct CPUState { >> struct kvm_run *kvm_run; >> struct kvm_dirty_gfn *kvm_dirty_gfns; >> uint32_t kvm_fetch_index; >> + uint64_t dirty_pages; >> + bool stat_dirty_pages; > > Shall we make this bool a global one? As I don't think we'll be able to only > enable it on a subset of cpus? Yes, it's a reasonable advice, i'll apply this on the next version > -- Best regard Hyman Huang(黄勇)