From nobody Mon Apr 29 13:26:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1528199058937100.03660272849436; Tue, 5 Jun 2018 04:44:18 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A1120A5D85; Tue, 5 Jun 2018 11:44: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 AD6F95D9CB; Tue, 5 Jun 2018 11:44: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 8CC121800C9D; Tue, 5 Jun 2018 11:44:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w55Bf8qA000576 for ; Tue, 5 Jun 2018 07:41:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 38FC7308BDAE; Tue, 5 Jun 2018 11:41:08 +0000 (UTC) Received: from mx1.redhat.com (ext-mx20.extmail.prod.ext.phx2.redhat.com [10.5.110.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 30A65308BDA1 for ; Tue, 5 Jun 2018 11:41:06 +0000 (UTC) Received: from mail-wr0-f199.google.com (mail-wr0-f199.google.com [209.85.128.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CA28F30BA348 for ; Tue, 5 Jun 2018 11:41:05 +0000 (UTC) Received: by mail-wr0-f199.google.com with SMTP id x14-v6so1263309wrr.17 for ; Tue, 05 Jun 2018 04:41:05 -0700 (PDT) Received: from fiorina.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id 194-v6sm1832480wml.20.2018.06.05.04.41.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jun 2018 04:41:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GGLcwjrv84grSw/shFcfcuB8EAPNJPLtyzxLraJY/5s=; b=ISglhxcKL7jElDGBdMrOFRjNzrsFuqqIZtQvKAVdfy8v848TppV+G1alPoWrFyX4NF m2OcP6fLIbW7/QRK2MoGsYsLbooQQBl4YnpIxz3q41lkZzu1CtZKM5imtLVXgQalzf8j TL6BPHBbCLlEqdLWIXEoYR8qesq8h08qOTsU4oFZaAvVQNq8Yi0B9e3GiaV3+25KB/oY viAY3lk0huaUBaFdVRMBZ1AbAN22zcIf+77oNLXMfcXoD6WBUygGEpR7yQutteqDAUAe hCyx1SFUvDTzSSCPVUlZKZ5B7GIwHwBOLSpT3SegovqK2VU03yYizAffeyPxe0o/xKHJ AAaw== X-Gm-Message-State: ALKqPwfA+g8FnjTrzLQBkyn/2sZECPuFwg6TmvJaPrEi62/ZrH/oLb6c nmF96nDZkebD7LV9IipDmOvMt3+22aToiTSL8ft0HWzSIrxha0yxyfY6xd47Dh/xq4ej/7VzXaf 7itDdCwTH5M4aBiwiZIc= X-Received: by 2002:a1c:cc08:: with SMTP id h8-v6mr11405500wmb.82.1528198864278; Tue, 05 Jun 2018 04:41:04 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLw/4HYJ0Q2gF80JDPN9oIIUOEYVB581WNFaitxCaQck/4jbKAkikcZnGUcDSHSqS5+9f4Ytw== X-Received: by 2002:a1c:cc08:: with SMTP id h8-v6mr11405494wmb.82.1528198864145; Tue, 05 Jun 2018 04:41:04 -0700 (PDT) From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Golembiovsk=C3=BD?= To: libvir-list@redhat.com Date: Tue, 5 Jun 2018 13:41:02 +0200 Message-Id: <59402afcb0b4f436837e99b62e7097dbaee741e7.1528198855.git.tgolembi@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Tom=C3=A1=C5=A1=20Golembiovsk=C3=BD?= Subject: [libvirt] [PATCH] qemu: add entry for balloon stat stat-disk-caches 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 05 Jun 2018 11:44:17 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Signed-off-by: Tom=C3=A1=C5=A1 Golembiovsk=C3=BD --- include/libvirt/libvirt-domain.h | 9 ++++++++- src/qemu/qemu_monitor_json.c | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index da773b76cb..b96c018a90 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -628,11 +628,18 @@ typedef enum { /* Timestamp of the last update of statistics, in seconds. */ VIR_DOMAIN_MEMORY_STAT_LAST_UPDATE =3D 9, =20 + /* + * The amount of memory, in bytes, that can be quickly reclaimed witho= ut + * additional I/O. Typically these pages are used for caching files fr= om + * disk. + */ + VIR_DOMAIN_MEMORY_STAT_DISK_CACHES =3D 10, + /* * The number of statistics supported by this version of the interface. * To add new statistics, add them to the enum and increase this value. */ - VIR_DOMAIN_MEMORY_STAT_NR =3D 10, + VIR_DOMAIN_MEMORY_STAT_NR =3D 11, =20 # ifdef VIR_ENUM_SENTINELS VIR_DOMAIN_MEMORY_STAT_LAST =3D VIR_DOMAIN_MEMORY_STAT_NR diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 42d7b9c5e9..b0a65d8af9 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2069,6 +2069,8 @@ int qemuMonitorJSONGetMemoryStats(qemuMonitorPtr mon, VIR_DOMAIN_MEMORY_STAT_AVAILABLE, 1024); GET_BALLOON_STATS(statsdata, "stat-available-memory", VIR_DOMAIN_MEMORY_STAT_USABLE, 1024); + GET_BALLOON_STATS(statsdata, "stat-disk-caches", + VIR_DOMAIN_MEMORY_STAT_DISK_CACHES, 1024); GET_BALLOON_STATS(data, "last-update", VIR_DOMAIN_MEMORY_STAT_LAST_UPDATE, 1); ret =3D got; --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list