From patchwork Wed Sep 20 16:05:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VG9tw6HFoSBHb2xlbWJpb3Zza8O9?= X-Patchwork-Id: 816346 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xy4lx1Xvqz9t2Q for ; Thu, 21 Sep 2017 02:22:52 +1000 (AEST) Received: from localhost ([::1]:49492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duhlz-0000ww-1R for incoming@patchwork.ozlabs.org; Wed, 20 Sep 2017 12:22:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duhVE-0004BL-SV for qemu-devel@nongnu.org; Wed, 20 Sep 2017 12:05:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duhV9-0007Lk-1A for qemu-devel@nongnu.org; Wed, 20 Sep 2017 12:05:32 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:44610) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1duhV8-0007KP-Qg for qemu-devel@nongnu.org; Wed, 20 Sep 2017 12:05:26 -0400 Received: by mail-wm0-f50.google.com with SMTP id 189so5554328wmh.1 for ; Wed, 20 Sep 2017 09:05:26 -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:in-reply-to :references:mime-version:content-transfer-encoding; bh=z/7KpNQjyoH6A2NlevtKgKEn4yQUr4YakPtRrKC/q6U=; b=C6wz7hmoyz3XILXn6Q8Ji0fRAg8cWkctPl3bvGpy+cifs8NjCY3D6j/UB7KeCi2PIw d9Et7tkSlOi1jn4IQKJkwPZvXjK35tkvGaZMRs8acCA/vO/60FuBerwbidaj3HgNCmua nbon4yOfc64M97oMzLNJu+jI8/zZLxYmViVSNBnaMn/3FTYO0F+VWKG1v2e9I9mu+T8N SMRQRrYmoMlTyHmD34qhIjMWszKm58jecuWRwKr4cCVNrrmpqytKICbKeBxx4py938w7 HnQm04h+g/H0vMwhYTCxzn8GxD9KTcccZIOZIe2cM2bVwG2cTN0ZmTF+SJMW+WPYbMnc r+pg== X-Gm-Message-State: AHPjjUhwuUkM8RjRodUaRlxRAxVJTX+Dj4csI5mIsU6cMvb6P6FoKOhA qFgwh/I18zIDpwm8t0LiWw/ur+e7X64= X-Google-Smtp-Source: AOwi7QBCGl0DEt54vmr1FpabuGWhH8HT+t54iALN4Ig6Tt4eiVzLnaOWMmabHtIMhTob5n2Yd+lKrg== X-Received: by 10.28.67.197 with SMTP id q188mr4792462wma.41.1505923525789; Wed, 20 Sep 2017 09:05:25 -0700 (PDT) Received: from fiorina.redhat.com (ip-94-112-73-67.net.upcbroadband.cz. [94.112.73.67]) by smtp.gmail.com with ESMTPSA id d6sm2000173wrb.32.2017.09.20.09.05.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Sep 2017 09:05:24 -0700 (PDT) From: =?utf-8?b?VG9tw6HFoSBHb2xlbWJpb3Zza8O9?= To: virtio-dev@lists.oasis-open.org, qemu-devel@nongnu.org Date: Wed, 20 Sep 2017 18:05:22 +0200 Message-Id: <13ca7e373615efac74661590527067ee8966f027.1505923516.git.tgolembi@redhat.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.50 Subject: [Qemu-devel] [PATCH 1/1] virtio-balloon: include buffers and chached memory statistics X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wei Wang , =?utf-8?q?Tom=C3=A1=C5=A1_Golembiovsk?= =?utf-8?b?w70=?= , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Tomáš Golembiovský --- hw/virtio/virtio-balloon.c | 2 ++ include/standard-headers/linux/virtio_balloon.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index a705e0ec55..0434784c14 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -49,6 +49,8 @@ static const char *balloon_stat_names[] = { [VIRTIO_BALLOON_S_MEMFREE] = "stat-free-memory", [VIRTIO_BALLOON_S_MEMTOT] = "stat-total-memory", [VIRTIO_BALLOON_S_AVAIL] = "stat-available-memory", + [VIRTIO_BALLOON_S_BUFFERS] = "stat-linux-buffers", + [VIRTIO_BALLOON_S_CACHED] = "stat-linux-cached", [VIRTIO_BALLOON_S_NR] = NULL }; diff --git a/include/standard-headers/linux/virtio_balloon.h b/include/standard-headers/linux/virtio_balloon.h index 9d06ccd066..d61efbfcee 100644 --- a/include/standard-headers/linux/virtio_balloon.h +++ b/include/standard-headers/linux/virtio_balloon.h @@ -52,7 +52,9 @@ struct virtio_balloon_config { #define VIRTIO_BALLOON_S_MEMFREE 4 /* Total amount of free memory */ #define VIRTIO_BALLOON_S_MEMTOT 5 /* Total amount of memory */ #define VIRTIO_BALLOON_S_AVAIL 6 /* Available memory as in /proc */ -#define VIRTIO_BALLOON_S_NR 7 +#define VIRTIO_BALLOON_S_BUFFERS 7 /* Buffers memory as in /proc */ +#define VIRTIO_BALLOON_S_CACHED 8 /* Cached memory as in /proc */ +#define VIRTIO_BALLOON_S_NR 9 /* * Memory statistics structure.