From nobody Mon Feb 9 18:45:16 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1643355389313991.7486466215663; Thu, 27 Jan 2022 23:36:29 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-529-5FUZs82aMtCl-aVc4i1KQA-1; Fri, 28 Jan 2022 02:36:21 -0500 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 5860334830; Fri, 28 Jan 2022 07:36:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7284016586; Fri, 28 Jan 2022 07:36:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4D2881809CB9; Fri, 28 Jan 2022 07:36:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20S7aBY2022070 for ; Fri, 28 Jan 2022 02:36:11 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4066448FB06; Fri, 28 Jan 2022 07:36:11 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C9684021B4 for ; Fri, 28 Jan 2022 07:36:11 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 24A493802AEB for ; Fri, 28 Jan 2022 07:36:11 +0000 (UTC) Received: from chinatelecom.cn (prt-mail.chinatelecom.cn [42.123.76.222]) by relay.mimecast.com with ESMTP id us-mta-206-N3Toc5lIOfKHrN7W3ntbkQ-1; Fri, 28 Jan 2022 02:36:08 -0500 Received: from clientip-125.69.42.75 (unknown [172.18.0.48]) by chinatelecom.cn (HERMES) with SMTP id C2CFB2800C8; Fri, 28 Jan 2022 15:36:06 +0800 (CST) Received: from ([172.18.0.48]) by app0024 with ESMTP id a2e7839449ed482bb50adf9c6f1f6dac for libvir-list@redhat.com; Fri, 28 Jan 2022 15:36:06 CST X-MC-Unique: 5FUZs82aMtCl-aVc4i1KQA-1 X-MC-Unique: N3Toc5lIOfKHrN7W3ntbkQ-1 HMM_SOURCE_IP: 172.18.0.48:38544.850124988 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP X-189-SAVE-TO-SEND: +huangy81@chinatelecom.cn X-Transaction-ID: a2e7839449ed482bb50adf9c6f1f6dac X-Real-From: huangy81@chinatelecom.cn X-Receive-IP: 172.18.0.48 X-MEDUSA-Status: 0 From: huangy81@chinatelecom.cn To: Subject: [PATCH v3 4/7] include: Introduce enum for qemuDomainStartDirtyRateCalc Date: Fri, 28 Jan 2022 15:35:51 +0800 Message-Id: <3a5c73d01877b4d6fa3b091f14b676a85aaa2115.1643353245.git.huangy81@chinatelecom.cn> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Mimecast-Spam-Signature: yes X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 20S7aBY2022070 X-loop: libvir-list@redhat.com Cc: huangy81@chinatelecom.cn X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643355391435100002 From: Hyman Huang(=E9=BB=84=E5=8B=87) Introduce virDomainDirtyRateCalcFlags and virDomainDirtyRateCalcMode to get ready for adding mode parameter to qemuDomainStartDirtyRateCalc. Signed-off-by: Hyman Huang(=E9=BB=84=E5=8B=87) --- include/libvirt/libvirt-domain.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 374859f..722a310 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -5257,8 +5257,32 @@ typedef enum { # endif } virDomainDirtyRateStatus; =20 +/** + * virDomainDirtyRateCalcFlags: + * + * Flags OR'ed together to provide specific behaviour when calculating dir= ty page + * rate for a Domain + * + */ +typedef enum { + VIR_DOMAIN_DIRTYRATE_MODE_PAGE_SAMPLING =3D 0, /* default mode = - page-sampling */ + VIR_DOMAIN_DIRTYRATE_MODE_DIRTY_BITMAP =3D 1 << 0, /* dirty-bitmap = mode */ + VIR_DOMAIN_DIRTYRATE_MODE_DIRTY_RING =3D 1 << 1, /* dirty-ring mo= de */ +} virDomainDirtyRateCalcFlags; + int virDomainStartDirtyRateCalc(virDomainPtr domain, int seconds, unsigned int flags); +/** + * virDomainDirtyRateCalcMode: + * + * Dirty page rate calculation mode used during measurement. + */ +typedef enum { + VIR_DOMAIN_DIRTYRATE_CALC_MODE_PAGE_SAMPLING =3D 0, + VIR_DOMAIN_DIRTYRATE_CALC_MODE_DIRTY_BITMAP, + VIR_DOMAIN_DIRTYRATE_CALC_MODE_DIRTY_RING, + VIR_DOMAIN_DIRTYRATE_CALC_MODE_LAST, +} virDomainDirtyRateCalcMode; =20 #endif /* LIBVIRT_DOMAIN_H */ --=20 1.8.3.1