ia64/xen-unstable

changeset 3245:0e6cf5ea9f5c

bitkeeper revision 1.1159.187.56 (41af859alAU2_flUOUDG6VyGkjJ8Kg)

More balloon fixes.
author kaf24@scramble.cl.cam.ac.uk
date Thu Dec 02 21:14:02 2004 +0000 (2004-12-02)
parents 150e98023e13
children fc7b350be00f a169836882cb 380b3684683c
files linux-2.6.9-xen-sparse/drivers/xen/balloon/balloon.c
line diff
     1.1 --- a/linux-2.6.9-xen-sparse/drivers/xen/balloon/balloon.c	Thu Dec 02 20:56:17 2004 +0000
     1.2 +++ b/linux-2.6.9-xen-sparse/drivers/xen/balloon/balloon.c	Thu Dec 02 21:14:02 2004 +0000
     1.3 @@ -91,7 +91,7 @@ static struct timer_list balloon_timer;
     1.4  #define LIST_TO_PAGE(l) ( list_entry(l, struct page, list) )
     1.5  #define UNLIST_PAGE(p)  ( list_del(&p->list) )
     1.6  #define pte_offset_kernel pte_offset
     1.7 -#define subsys_initcall(_fn) __initcall(fn)
     1.8 +#define subsys_initcall(_fn) __initcall(_fn)
     1.9  #endif
    1.10  
    1.11  #define IPRINTK(fmt, args...) \
    1.12 @@ -300,14 +300,14 @@ static void balloon_ctrlif_rx(ctrl_msg_t
    1.13      switch ( msg->subtype )
    1.14      {
    1.15      case CMSG_MEM_REQUEST_SET:
    1.16 +    {
    1.17 +        mem_request_t *req = (mem_request_t *)&msg->msg[0];
    1.18          if ( msg->length != sizeof(mem_request_t) )
    1.19              goto parse_error;
    1.20 -        {
    1.21 -            mem_request_t *req = (mem_request_t *)&msg->msg[0];
    1.22 -            set_new_target(req->target);
    1.23 -            req->status = 0;
    1.24 -        }
    1.25 -        break;        
    1.26 +        set_new_target(req->target);
    1.27 +        req->status = 0;
    1.28 +    }
    1.29 +    break;        
    1.30      default:
    1.31          goto parse_error;
    1.32      }
    1.33 @@ -353,12 +353,11 @@ static int balloon_read(char *page, char
    1.34      len = sprintf(
    1.35          page,
    1.36          "Current allocation: %8lu kB\n"
    1.37 -        "Target allocation:  %8lu kB / %8lu kB (actual / requested)\n"
    1.38 -        "Unused heap space:  %8lu kB / %8lu kB (low-mem / high-mem)\n"
    1.39 +        "Requested target:   %8lu kB\n"
    1.40 +        "Low-mem balloon:    %8lu kB\n"
    1.41 +        "High-mem balloon:   %8lu kB\n"
    1.42          "Xen hard limit:     ",
    1.43 -        K(current_pages),
    1.44 -        K(current_target()), K(target_pages),
    1.45 -        K(balloon_low), K(balloon_high));
    1.46 +        K(current_pages), K(target_pages), K(balloon_low), K(balloon_high));
    1.47  
    1.48      if ( hard_limit != ~0UL )
    1.49          len += sprintf(