From: Wei Liu Subject: [PATCH] xen/balloon: export balloon hotplug page stats to sysfs Date: Thu, 20 Mar 2014 12:56:53 +0000 Message-ID: <1395320213-29921-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Boris Ostrovsky , Wei Liu , David Vrabel List-Id: xen-devel@lists.xenproject.org Signed-off-by: Wei Liu Cc: Konrad Wilk Cc: David Vrabel Cc: Boris Ostrovsky --- drivers/xen/xen-balloon.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/xen/xen-balloon.c b/drivers/xen/xen-balloon.c index e555845..2d4c5a8 100644 --- a/drivers/xen/xen-balloon.c +++ b/drivers/xen/xen-balloon.c @@ -129,6 +129,11 @@ module_exit(balloon_exit); BALLOON_SHOW(current_kb, "%lu\n", PAGES2KB(balloon_stats.current_pages)); BALLOON_SHOW(low_kb, "%lu\n", PAGES2KB(balloon_stats.balloon_low)); BALLOON_SHOW(high_kb, "%lu\n", PAGES2KB(balloon_stats.balloon_high)); +#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG +BALLOON_SHOW(hotplug_kb, "%lu\n", PAGES2KB(balloon_stats.hotplug_pages)); +BALLOON_SHOW(balloon_hotplug_kb, "%lu\n", + PAGES2KB(balloon_stats.balloon_hotplug)); +#endif static DEVICE_ULONG_ATTR(schedule_delay, 0444, balloon_stats.schedule_delay); static DEVICE_ULONG_ATTR(max_schedule_delay, 0644, balloon_stats.max_schedule_delay); @@ -206,6 +211,10 @@ static struct attribute *balloon_info_attrs[] = { &dev_attr_current_kb.attr, &dev_attr_low_kb.attr, &dev_attr_high_kb.attr, +#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG + &dev_attr_hotplug_kb.attr, + &dev_attr_balloon_hotplug_kb.attr, +#endif NULL }; -- 1.7.10.4