From: "Gaurav Dhiman" Subject: Balloon Driver Internals Date: Tue, 23 May 2006 18:48:48 -0700 Message-ID: <5bd3c56f0605231848u29515f5cvbba1ca3e1bb7afd@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0816467922==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============0816467922== Content-Type: multipart/alternative; boundary="----=_Part_215145_5593772.1148435328449" ------=_Part_215145_5593772.1148435328449 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi All, I am quite new to Xen and am trying to understand the way balloon driver works in XenoLinux. I have the following observations and questions; please correct me if I am wrong: 1. Balloon driver adds pages between xen_start_info->nr_pages and max_pfn t= o the ballooned list. While nr_pages is derived from the 'memory' parameter specified while creating the domain, how is the value of max_pfn evaluated/specified? 2. The memory/target in the xenstore on domain0 indicates the target number of pages for each domain. If the value changes, watch_target function of th= e balloon driver gets invoked. Right? Accordingly the balloon driver increases/decreases the number of pages (using increase_reservation/decrease_reservation). 3. It seems that increasing/decreasing reservation happens manually by modifying memory/target in xenstore. What all needs to be done to have a dynamic scenario where the domains can increase/decrease their reservation according to their requirements? Would this require modification to memory manager of guest OS? Consider the following scenario: - we just have 2 domains (say domain0 and domain1) each with 200MB of allocated memory (total physical memory is 1GB). - we do not modify memory/target in xenstore. - if domain1 uses up it's share (200MB), pages will get swapped out to disk even though a lot of physical memory is free. - cant we have a case where domain1 requests increase in reservation to make use of surplus physical memory? - or does it already happen? if yes, then how? Kindly provide your views, it would be really helpful!! Sorry for the long mail. Thanks in advance, Gaurav ------=_Part_215145_5593772.1148435328449 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi All,

I am quite new to Xen and am trying to understand the way ba= lloon driver works in XenoLinux. I have the following observations and ques= tions; please correct me if I am wrong:

1. Balloon driver adds pages= between xen_start_info->nr_pages and max_pfn to the ballooned list. Whi= le nr_pages is derived from the 'memory' parameter specified while creating= the domain, how is the value of max_pfn evaluated/specified?

2. The memory/target in the xenstore on domain0 indicates the targe= t number of pages for each domain. If the value changes, watch_target funct= ion of the balloon driver gets invoked. Right? Accordingly the balloon driv= er increases/decreases the number of pages (using increase_reservation/decr= ease_reservation).

3.  It seems that increasing/decreasing reservation happens ma= nually by modifying memory/target in xenstore. What all needs to be done to= have a dynamic scenario where the domains can increase/decrease their rese= rvation according to their requirements? Would this require modification to= memory manager of guest OS?
Consider the following scenario:
  • we just have 2 domains (say= domain0 and domain1) each with 200MB of allocated memory (total physical m= emory is 1GB).
  • we do not modify memory/target in xenstore.
  • if domain1 uses up it's share (200MB), pages will get swapped out = to disk even though a lot of physical memory is free.
  • cant we have = a case where domain1 requests increase in reservation to make use of surplu= s physical memory?
  • or does it already happen? if yes, then how?
Kindly p= rovide your views, it would be really helpful!!

Sorry for the long = mail.

Thanks in advance,
Gaurav

------=_Part_215145_5593772.1148435328449-- --===============0816467922== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0816467922==--