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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EEFEC43217 for ; Mon, 2 May 2022 12:55:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385133AbiEBM6g (ORCPT ); Mon, 2 May 2022 08:58:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385135AbiEBM6d (ORCPT ); Mon, 2 May 2022 08:58:33 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9C67115701 for ; Mon, 2 May 2022 05:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651496100; 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: in-reply-to:in-reply-to:references:references; bh=CqL4KiR9uD/RXOMEb8URbmnxGDSjsgc67isSNuA7kNo=; b=RDOV6sUYve+LqfR4ziuutrHEsHUuCSjFwpUXU3qhQf7NdxbSGjiqSVEqEhB18JYvAzSQaI 7D9LRI6z2XSQsPpllYmhDmNa4UoI7zt3SZCEfA3lXaMOPM2FZdoWIHQJOp/XUzGDAsGuV8 e0a5mZtsEZAZOJVGRB/Frjg/lkWLCbA= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-547-QE2QBk5aPe-IBXJWuMykJA-1; Mon, 02 May 2022 08:54:57 -0400 X-MC-Unique: QE2QBk5aPe-IBXJWuMykJA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DC9C93811A22; Mon, 2 May 2022 12:54:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.36.112.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 95B4B14DE24A; Mon, 2 May 2022 12:54:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7251F21E68BC; Mon, 2 May 2022 14:54:55 +0200 (CEST) From: Markus Armbruster To: Joao Martins Cc: qemu-devel@nongnu.org, Paolo Bonzini , "Dr. David Alan Gilbert" , Richard Henderson , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum , Peter Xu , Jason Wang , Alex Williamson , David Hildenbrand , Philippe =?utf-8?Q?Mathieu-Daud?= =?utf-8?Q?=C3=A9?= , Cornelia Huck , Juan Quintela , Eric Blake , Jason Gunthorpe , Nicolin Chen , Yishai Hadas , Kevin Tian , Yi Liu , Eric Auger , Thanos Makatos , "John G . Johnson" , kvm@vger.kernel.org Subject: Re: [PATCH RFC 09/10] migration/dirtyrate: Expand dirty_bitmap to be tracked separately for devices References: <20220428211351.3897-1-joao.m.martins@oracle.com> <20220428211351.3897-10-joao.m.martins@oracle.com> Date: Mon, 02 May 2022 14:54:55 +0200 In-Reply-To: <20220428211351.3897-10-joao.m.martins@oracle.com> (Joao Martins's message of "Thu, 28 Apr 2022 22:13:50 +0100") Message-ID: <87k0b4ksbk.fsf@pond.sub.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Joao Martins writes: > Expand dirtyrate measurer that is accessible via HMP calc_dirty_rate > or QMP 'calc-dirty-rate' to receive a @scope argument. The scope > then restricts the dirty tracking to be done at devices only, > while neither enabling or using the KVM (CPU) dirty tracker. > The default stays as is i.e. dirty-ring / dirty-bitmap from KVM. > > This is useful to test, exercise the IOMMU dirty tracker and observe > how much a given device is dirtying memory. > > Signed-off-by: Joao Martins [...] > diff --git a/qapi/migration.json b/qapi/migration.json > index 27d7b281581d..082830c6e771 100644 > --- a/qapi/migration.json > +++ b/qapi/migration.json > @@ -1793,6 +1793,19 @@ > { 'enum': 'DirtyRateMeasureMode', > 'data': ['page-sampling', 'dirty-ring', 'dirty-bitmap'] } > > +## > +# @DirtyRateScope: > +# > +# An enumeration of scope of measuring dirtyrate. "dirtyrate" is not a word. > +# > +# @dirty-devices: calculate dirtyrate by devices only. Please document @all, too. > +# > +# Since: 6.2 > +# > +## > +{ 'enum': 'DirtyRateScope', > + 'data': ['all', 'dirty-devices'] } > + > ## > # @DirtyRateInfo: > # > @@ -1827,6 +1840,7 @@ > 'calc-time': 'int64', > 'sample-pages': 'uint64', > 'mode': 'DirtyRateMeasureMode', > + 'scope': 'DirtyRateScope', Please document new member @scope. > '*vcpu-dirty-rate': [ 'DirtyRateVcpu' ] } } > > ## > @@ -1851,6 +1865,7 @@ > ## > { 'command': 'calc-dirty-rate', 'data': {'calc-time': 'int64', > '*sample-pages': 'int', > + '*scope': 'DirtyRateScope', > '*mode': 'DirtyRateMeasureMode'} } > > ## [...] 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D98EFC433EF for ; Mon, 2 May 2022 12:56:32 +0000 (UTC) Received: from localhost ([::1]:39712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlVbL-00084b-Co for qemu-devel@archiver.kernel.org; Mon, 02 May 2022 08:56:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlVZx-000719-AX for qemu-devel@nongnu.org; Mon, 02 May 2022 08:55:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:37808) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlVZu-0003b4-2e for qemu-devel@nongnu.org; Mon, 02 May 2022 08:55:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651496100; 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: in-reply-to:in-reply-to:references:references; bh=CqL4KiR9uD/RXOMEb8URbmnxGDSjsgc67isSNuA7kNo=; b=RDOV6sUYve+LqfR4ziuutrHEsHUuCSjFwpUXU3qhQf7NdxbSGjiqSVEqEhB18JYvAzSQaI 7D9LRI6z2XSQsPpllYmhDmNa4UoI7zt3SZCEfA3lXaMOPM2FZdoWIHQJOp/XUzGDAsGuV8 e0a5mZtsEZAZOJVGRB/Frjg/lkWLCbA= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-547-QE2QBk5aPe-IBXJWuMykJA-1; Mon, 02 May 2022 08:54:57 -0400 X-MC-Unique: QE2QBk5aPe-IBXJWuMykJA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DC9C93811A22; Mon, 2 May 2022 12:54:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.36.112.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 95B4B14DE24A; Mon, 2 May 2022 12:54:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7251F21E68BC; Mon, 2 May 2022 14:54:55 +0200 (CEST) From: Markus Armbruster To: Joao Martins Subject: Re: [PATCH RFC 09/10] migration/dirtyrate: Expand dirty_bitmap to be tracked separately for devices References: <20220428211351.3897-1-joao.m.martins@oracle.com> <20220428211351.3897-10-joao.m.martins@oracle.com> Date: Mon, 02 May 2022 14:54:55 +0200 In-Reply-To: <20220428211351.3897-10-joao.m.martins@oracle.com> (Joao Martins's message of "Thu, 28 Apr 2022 22:13:50 +0100") Message-ID: <87k0b4ksbk.fsf@pond.sub.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "John G . Johnson" , kvm@vger.kernel.org, "Michael S. Tsirkin" , Jason Wang , qemu-devel@nongnu.org, Peter Xu , Eric Blake , Yi Liu , Juan Quintela , David Hildenbrand , Nicolin Chen , Jason Gunthorpe , Kevin Tian , Richard Henderson , "Dr. David Alan Gilbert" , Eric Auger , Alex Williamson , Paolo Bonzini , Eduardo Habkost , Yishai Hadas , Cornelia Huck , Philippe =?utf-8?Q?Mathieu-Daud?= =?utf-8?Q?=C3=A9?= , Thanos Makatos Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Joao Martins writes: > Expand dirtyrate measurer that is accessible via HMP calc_dirty_rate > or QMP 'calc-dirty-rate' to receive a @scope argument. The scope > then restricts the dirty tracking to be done at devices only, > while neither enabling or using the KVM (CPU) dirty tracker. > The default stays as is i.e. dirty-ring / dirty-bitmap from KVM. > > This is useful to test, exercise the IOMMU dirty tracker and observe > how much a given device is dirtying memory. > > Signed-off-by: Joao Martins [...] > diff --git a/qapi/migration.json b/qapi/migration.json > index 27d7b281581d..082830c6e771 100644 > --- a/qapi/migration.json > +++ b/qapi/migration.json > @@ -1793,6 +1793,19 @@ > { 'enum': 'DirtyRateMeasureMode', > 'data': ['page-sampling', 'dirty-ring', 'dirty-bitmap'] } > > +## > +# @DirtyRateScope: > +# > +# An enumeration of scope of measuring dirtyrate. "dirtyrate" is not a word. > +# > +# @dirty-devices: calculate dirtyrate by devices only. Please document @all, too. > +# > +# Since: 6.2 > +# > +## > +{ 'enum': 'DirtyRateScope', > + 'data': ['all', 'dirty-devices'] } > + > ## > # @DirtyRateInfo: > # > @@ -1827,6 +1840,7 @@ > 'calc-time': 'int64', > 'sample-pages': 'uint64', > 'mode': 'DirtyRateMeasureMode', > + 'scope': 'DirtyRateScope', Please document new member @scope. > '*vcpu-dirty-rate': [ 'DirtyRateVcpu' ] } } > > ## > @@ -1851,6 +1865,7 @@ > ## > { 'command': 'calc-dirty-rate', 'data': {'calc-time': 'int64', > '*sample-pages': 'int', > + '*scope': 'DirtyRateScope', > '*mode': 'DirtyRateMeasureMode'} } > > ## [...]