[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH][Take 2] Sysfs Interface for balloon driver


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Satoshi Uchida" <s-uchida@xxxxxxxxxxxxx>
  • Date: Mon, 25 Sep 2006 20:51:39 +0900
  • Delivery-date: Mon, 25 Sep 2006 04:52:21 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcbgmPYKO+6dSF7KTWykOVHhL8ByPQ==

Hi.

This patch provides a sysfs interface for the balloon driver (Take 2).

Currently, the interface for the balloon driver is provided by procfs.
However, I was suggested by Kier and Anthony that procfs should handle
 only process information and other information should be located in sysfs,
  when I made the interface for virtual block devices.

The information for the balloon driver also should be moved to sysfs.
So, I have made a sysfs interface for the balloon driver.

The information for balloon driver is placed in /sys/devices/system/memory/.


Example outputs of the sysfs interface of the balloon driver are as follows:

 Example 1.  Show each information

  [root@Dom0 ~]# ls /sys/devices/system/memory/memory0/
  balloon_high  current_pages  hard_limit
  balloon_low   driver_pages   target_pages
  [root@Dom0 ~]# cat /sys/devices/system/memory/memory0/current_pages 
    262144
  [root@Dom0 ~]# cat /sys/devices/system/memory/memory0/target_pages 
    262144
  [root@Dom0 ~]# cat /sys/devices/system/memory/memory0/balloon_high 
         0
  [root@Dom0 ~]# cat /sys/devices/system/memory/memory0/balloon_low 
    509952
  [root@Dom0 ~]# cat /sys/devices/system/memory/memory0/hard_limit 
  ??? 
  [root@Dom0 ~]# cat /sys/devices/system/memory/memory0/driver_pages 
      1024

 Example 2. Set memory size of a domain

  [root@Dom0 ~]# echo 1024M > /sys/devices/system/memory/memory0/target_pages 
  [root@Dom0 ~]# cat /sys/devices/system/memory/memory0/target_pages 
   1048576
  [root@Dom0 ~]# cat /sys/devices/system/memory/memory0/current_pages 
    758192
  [root@Dom0 ~]# cat /sys/devices/system/memory/memory0/hard_limit 
    758192
  [root@Dom0 ~]# cat /sys/devices/system/memory/memory0/driver_pages 
      1024


Regards
Satoshi UCHIDA 
   NEC Corporation, Japan

Attachment: balloon_sysfs.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.