From nobody Mon Feb 9 08:56:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=git.sr.ht ARC-Seal: i=1; a=rsa-sha256; t=1690712458; cv=none; d=zohomail.com; s=zohoarc; b=aXRvKCRnp/KC4n1bamSJy8YCvFZlSI5m7rRCwbFv55B+WyI0W8+uo+3ZXsC5J11HeOVrWswlGrF6WKRkjBTPT3tsjw5arlQb+nYmvQc8ApXp9c55wxC26JJ01KZfWsnLIvvQy8U+ve5cxtVraT3teMh5TEQ+uR9IDf/fnRm/xvI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1690712458; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=AUwlODyy7yPFRFJar7mIqojUGQuQ9+ApMpI8Swz0d9U=; b=CjMCsxmuTy3Ki+zcZQaQMh61mUpiPX9dv7d75Pckhjz67SteDy1L+OqRc1WviNIB5wR3bpeuGdeQEKb1So9DIMyBtssE9dfW7qANyUOE+Tl1pCIz4dTqjZ2XaoBpHinrDTnKVCgObFv6/ebl4rkfz8mHv4+HKHAetT3hi8zFdMo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1690712458115144.66476309150516; Sun, 30 Jul 2023 03:20:58 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-86-JwwBsD_MNp--pV8vXoQJFA-1; Sun, 30 Jul 2023 06:20:50 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2EF4286801E; Sun, 30 Jul 2023 10:20:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16FC7492CAE; Sun, 30 Jul 2023 10:20:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5C5AB19451EC; Sun, 30 Jul 2023 10:20:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DAB8C1946A63 for ; Sun, 30 Jul 2023 10:20:41 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C64221121318; Sun, 30 Jul 2023 10:20:41 +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 BE4F61121314 for ; Sun, 30 Jul 2023 10:20:41 +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 A17DF380390E for ; Sun, 30 Jul 2023 10:20:41 +0000 (UTC) Received: from mail-b.sr.ht (mail-b.sr.ht [173.195.146.151]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-74-x2vMPKIQMwWeJd2_j-yIOA-1; Sun, 30 Jul 2023 06:20:39 -0400 Received: from git.sr.ht (unknown [173.195.146.142]) by mail-b.sr.ht (Postfix) with ESMTPSA id 663A511EF57 for ; Sun, 30 Jul 2023 10:20:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690712457; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=AUwlODyy7yPFRFJar7mIqojUGQuQ9+ApMpI8Swz0d9U=; b=OUP4ZZFe1vsG2BmHzV9g1tgrkrSMm/+BqOpPt9Wo/jAxDMLPdavUvKM/HTvtelfgL3itgu r7r/TzMeokxxCuXXuaTQ7xRx7LYEGcD7OSVNlEL/tr5kDfunQGYsWoW+ZMs8tpGM5Zpb+W 3JufbZ0FRKIK2RL2dbKdlwH8FKnVg88= X-MC-Unique: JwwBsD_MNp--pV8vXoQJFA-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: x2vMPKIQMwWeJd2_j-yIOA-1 From: ~hyman Date: Sat, 13 Aug 2022 11:11:15 +0800 Subject: [PATCH Libvirt 07/11] virsh: Extend vcpuinfo api MIME-Version: 1.0 Message-ID: <169071243700.22823.6002973365882521706-7@git.sr.ht> In-Reply-To: <169071243700.22823.6002973365882521706-0@git.sr.ht> To: libvir-list@redhat.com 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 3.1 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ~hyman Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: git.sr.ht Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1690712460175100021 From: Hyman Huang(=E9=BB=84=E5=8B=87) Extend vcpuinfo api to display dirty page rate upper limit info, which is set by 'limit-dirty-page-rate'. Signed-off-by: Hyman Huang(=E9=BB=84=E5=8B=87) --- src/remote/remote_daemon_dispatch.c | 2 ++ src/remote/remote_driver.c | 2 ++ src/remote/remote_protocol.x | 2 ++ tools/virsh-domain.c | 5 +++++ 4 files changed, 11 insertions(+) diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon= _dispatch.c index 7144e9e7ca..edf6386653 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -2893,6 +2893,8 @@ remoteDispatchDomainGetVcpus(virNetServer *server G_G= NUC_UNUSED, ret->info.info_val[i].state =3D info[i].state; ret->info.info_val[i].cpu_time =3D info[i].cpuTime; ret->info.info_val[i].cpu =3D info[i].cpu; + ret->info.info_val[i].limit =3D info[i].limit; + ret->info.info_val[i].current =3D info[i].current; } =20 /* Don't need to allocate/copy the cpumaps if we make the reasonable diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 4d7682eb32..c03e9e862b 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -2147,6 +2147,8 @@ remoteDomainGetVcpus(virDomainPtr domain, info[i].state =3D ret.info.info_val[i].state; info[i].cpuTime =3D ret.info.info_val[i].cpu_time; info[i].cpu =3D ret.info.info_val[i].cpu; + info[i].limit =3D ret.info.info_val[i].limit; + info[i].current =3D ret.info.info_val[i].current; } =20 for (i =3D 0; i < ret.cpumaps.cpumaps_len; ++i) diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index f0b7f0a5fa..633b9af74e 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -416,6 +416,8 @@ struct remote_vcpu_info { int state; unsigned hyper cpu_time; int cpu; + unsigned hyper limit; + unsigned hyper current; }; =20 /* Wire encoding of virTypedParameter. diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index ba2309eb3c..b51bd7a3d0 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -6935,6 +6935,11 @@ cmdVcpuinfo(vshControl *ctl, const vshCmd *cmd) maxcpu, pretty) < 0) return false; =20 + if (cpuinfo[n].limit !=3D 0) { + vshPrint(ctl, "%-15s %lld\n", _("DirtyRate limit:"), cpuinfo[n= ].limit); + vshPrint(ctl, "%-15s %lld\n", _("DirtyRate current:"), cpuinfo= [n].current); + } + if (n < (ncpus - 1)) vshPrint(ctl, "\n"); } --=20 2.38.5