From nobody Thu Apr 18 18:50:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1602748881; cv=none; d=zohomail.com; s=zohoarc; b=VV3ziZALH8Z6pUtUVCiU4DeCmK8nGnZ4SdCkkVF7DqJeeyH5MXKpcS4X/3gu5w2HzZMPFqfT4tS+npr7pePiQH1AbwNxt87BU3qR2DP5A3lyOkhB04Fb63tnYM13oKzijU/Hf9J8wA9JaF5elTWcGes0NdiHbVw1BGv+U68993I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602748881; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dvazCTZQjJfBKKbioF4KLbleUVLIG/kAGIEEMcQ0Yso=; b=k9BdfJwRIdIERbFCNRvaeR8eJ47xATiaO9aQNwbDK4pmloz/sTVHlHYyp2n03hbd6o2ek+yzGRmzV1weIFg/xQDr0z0AYCcFJeYUMS3Vjqyfttdx6HHHrj8n6OQ6KarYENs0VE63C/xcKN7NMxqdvX5umfGKB1ittAGOorSuLiI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1602748881833302.65831256500337; Thu, 15 Oct 2020 01:01:21 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-227-U5htgtKBNBmz3teXVSkXSA-1; Thu, 15 Oct 2020 04:00:50 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 86F1880362B; Thu, 15 Oct 2020 08:00:44 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 62D755C22B; Thu, 15 Oct 2020 08:00:44 +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 2D80D58112; Thu, 15 Oct 2020 08:00:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09F7xJk8010105 for ; Thu, 15 Oct 2020 03:59:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0585E200A7CD; Thu, 15 Oct 2020 07:59:19 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 00F83208BDE5 for ; Thu, 15 Oct 2020 07:59:18 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CD71F85828F for ; Thu, 15 Oct 2020 07:59:18 +0000 (UTC) Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-158-PB1GTPiUP4OFKK2efXwaUw-1; Thu, 15 Oct 2020 03:59:16 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 366CFD3614F3E790C3ED; Thu, 15 Oct 2020 15:59:08 +0800 (CST) Received: from huawei.com (10.175.104.175) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.487.0; Thu, 15 Oct 2020 15:58:59 +0800 X-MC-Unique: U5htgtKBNBmz3teXVSkXSA-1 X-MC-Unique: PB1GTPiUP4OFKK2efXwaUw-1 From: Hao Wang To: Subject: [[RESEND] 1/8] migration/dirtyrate: Introduce virDomainDirtyRateInfo structure Date: Thu, 15 Oct 2020 15:49:39 +0800 Message-ID: <20201015074946.2740968-2-wanghao232@huawei.com> In-Reply-To: <20201015074946.2740968-1-wanghao232@huawei.com> References: <20201015074946.2740968-1-wanghao232@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.104.175] X-CFilter-Loop: Reflected 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-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 09F7xJk8010105 X-loop: libvir-list@redhat.com Cc: yubihong@huawei.com, alex.chen@huawei.com, zhouyimin@huawei.com, zhang.zhanghailiang@huawei.com, dgilbert@redhat.com, xiexiangyou@huawei.com, david.edmondson@oracle.com, jdenemar@redhat.com, zhengchuan@huawei.com 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.79 on 10.5.11.16 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-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Introduce virDomainDirtyRateInfo structure used for domain's memory dirty r= ate query. Signed-off-by: Hao Wang Reviewed-by: Chuan Zheng --- 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 77f9116675..c7e22d4af1 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -5012,4 +5012,28 @@ int virDomainBackupBegin(virDomainPtr domain, char *virDomainBackupGetXMLDesc(virDomainPtr domain, unsigned int flags); =20 +/** + * virDomainDirtyRateInfo: + * + * a virDomainDirtyRateInfo is a structure filled by virDomainGetDirtyRate= () and + * extracting dirty rate infomation for a given active Domain. + */ + +typedef struct _virDomainDirtyRateInfo virDomainDirtyRateInfo; + +struct _virDomainDirtyRateInfo { + int status; /* the status of dirtyrate calculation */ + long long dirtyRate; /* the dirtyrate in MB/s */ + long long startTime; /* the start time of dirtyrate calculation */ + long long calcTime; /* the period of dirtyrate calculation */ +}; + +/** + * virDomainDirtyRateInfoPtr: + * + * a virDomainDirtyRateInfoPtr is a pointer to a virDomainDirtyRateInfo st= ructure. + */ + +typedef virDomainDirtyRateInfo *virDomainDirtyRateInfoPtr; + #endif /* LIBVIRT_DOMAIN_H */ --=20 2.23.0