WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Balloon Driver Documentation/Description

To: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Subject: Re: [Xen-users] Balloon Driver Documentation/Description
From: Timo Benk <timo.benk@xxxxxx>
Date: Tue, 10 Oct 2006 08:36:21 +0200
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 09 Oct 2006 23:37:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200610091808.36062.mark.williamson@xxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Openpgp: id=67E2E5E9; url=http://m28s01.vlinux.de/timo_benk_gpg_key.asc
References: <4527F31C.4080609@xxxxxxxxxxxxx> <200610091808.36062.mark.williamson@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (X11/20060909)
Mark Williamson wrote:
>> i'm looking for some documentation on how the balloon driver works
>> internally.
>>
>> Can anybody give me a hint were i can find some good doku?
> 
> Basically, the balloon driver allocates memory using standard kernel 
> allocation functions, then gives it back to Xen.  The memory is no longer 
> available to use in the guest at this point, and the fact that it was 
> allocated by the balloon driver prevents the rest of the kernel from trying 
> to use it.
> 
> When the balloon driver reclaims memory, it gets it back from Xen and then 
> does a "free", allowing the kernel memory allocator to give it to other 
> drivers for normal use.
> 

That is my understanding of the balloon driver. What i do not understand
is, if the balloon driver consists just of a frontend part in DomU that
is allocating some memory, and a backend driver in Dom0, that gives that
memory back, why is the output of the free command correct?

What i want to say is the following:

xendom1:~ # free
             total       used       free
Mem:        786432     117104     669328

xendom1:~ # echo -n "536870912" > /proc/xen/balloon

xendom1:~ # free
             total       used       free
Mem:        524288     116664     407624

Why is the total amount of RAM also changing. If the balloon driver just
allocates the memory, the used value should raise, but the total value
should stay.

I am not a kernel hacker, but i think i need to take a look into the
code to understand that.

Greetings,
-timo

-- 
Timo Benk - Jabber ID: fry@xxxxxxxxxx - ICQ ID: #241877854
PGP Public Key: http://m28s01.vlinux.de/timo_benk_gpg_key.asc


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