From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755414AbcBPPvW (ORCPT ); Tue, 16 Feb 2016 10:51:22 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:32827 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755391AbcBPPvU (ORCPT ); Tue, 16 Feb 2016 10:51:20 -0500 From: "Denis V. Lunev" Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, "Denis V. Lunev" , Igor Redko , "Michael S. Tsirkin" , Andrew Morton Subject: [PATCH 0/2] export 'available' memory to virtio balloon statistics Date: Tue, 16 Feb 2016 18:50:50 +0300 Message-Id: <1455637852-7323-1-git-send-email-den@openvz.org> X-Mailer: git-send-email 2.5.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a new field, VIRTIO_BALLOON_S_AVAIL, to virtio_balloon memory statistics protocol, corresponding to 'Available' in /proc/meminfo. It indicates to the hypervisor how big the balloon can be inflated without pushing the guest system to swap. This metric would be very useful in VM orchestration software to improve memory management of different VMs under overcommit. Signed-off-by: Igor Redko Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Michael S. Tsirkin CC: Andrew Morton Igor Redko (2): calculate 'available' memory in the separate function virtio_balloon: export 'available' memory to balloon statistics drivers/virtio/virtio_balloon.c | 6 ++++++ fs/proc/meminfo.c | 31 +------------------------- include/linux/mm.h | 1 + include/uapi/linux/virtio_balloon.h | 3 ++- mm/page_alloc.c | 43 +++++++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 31 deletions(-) -- 2.5.0