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] Re: [Xen-devel] Xen - Guest memory allocation

To: "dinesh chandrasekaran" <dinesh_chan8@xxxxxxxxxxx>
Subject: Re: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
From: "Derek Murray" <Derek.Murray@xxxxxxxxxxxx>
Date: Mon, 16 Jun 2008 23:09:31 +0100
Cc: xen developers community <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen users community <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 16 Jun 2008 15:09:59 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :sender:to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=Vod09xUwDcjMHWjY2lxh7z5pWsmec4V3OyuuDlzOGEw=; b=eI7b4tM8LrYGxqqu/XB1KUsos9HNGIUem2Yx75d7ocXhGtLF8fZ2oCDehQtRbt+GoI rwohCgA1HCj3n3L9Kxhv7CccghIpXg1uc/u1YoeoFuBc8SAn14ffDT6rqjF4V3BMKJxI 5EXRO/DjBE6gVqDsV/MUXdlu19UlLA3PgD74Y=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=BmXdU1mcHmKfEGzZQPVdujTAVRU9w7pLm10kPwQoi9+ovzXnOee13LVOjHxjlG2+TM hn/VPobrBea4xkZMUhjGakVUac0S3ZW67aXE9YrYetKgKuxOyDMoFvUTrhrflxvuOBVY v7x3kJYA2p80VG3tJioi5ck3n4Ce1at0WrHTU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <BAY111-W484A64E0B9431AFA1E6A6FB1A90@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <BAY111-W484A64E0B9431AFA1E6A6FB1A90@xxxxxxx>
Reply-to: Derek.Murray@xxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Dinesh,

The pages that are used for a DomU's memory are allocated when the
domain builder (in Dom0) calls xc_domain_populate_physmap(), which
executes a hypercall and ultimately calls populate_physmap() in
xen/common/memory.c.

I'm not terribly familiar with this code, but it looks like it might
be possible to hack in a replacement to achieve your desired effect.

Regards,

Derek Murray.

On Mon, Jun 16, 2008 at 10:52 PM, dinesh chandrasekaran
<dinesh_chan8@xxxxxxxxxxx> wrote:
>
>>> by default, dom0 gets all the available memory (usable physical memory-
>>> xen hypervisor). Then, when domU starts up, xen will decrease
>>> dom0'sallocation >> via ballooning and allocate them to domU.
>
> Yes weiming you are correct. But ballooning could be disabled.
>
>>>Do you want to specify the exact physical memory address space used by
>>> domU?
>
> Yes absolutly. Could that be done? (Hope by physical address you mean the
> real/machine/RAM  address)
> If so should I have to edit xen source or Dom0 source.
>
> Thanks,
> Dinesh C
>
>
> ________________________________
> Date: Mon, 16 Jun 2008 15:39:13 -0400
> From: zephyr.zhao@xxxxxxxxx
> To: dinesh_chan8@xxxxxxxxxxx
> Subject: Re: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
> CC: xen-devel@xxxxxxxxxxxxxxxxxxx; xen-users@xxxxxxxxxxxxxxxxxxx
>
> by default, dom0 gets all the available memory (usable physical memory - xen
> hypervisor). Then, when domU starts up, xen will decrease  dom0's allocation
> via ballooning and allocate them to domU.
>
> Do you want to specify the exact physical memory address space used by domU?
>
> On Mon, Jun 16, 2008 at 2:37 PM, dinesh chandrasekaran
> <dinesh_chan8@xxxxxxxxxxx> wrote:
>
> Yes, ofcourse dom0 can see this range.
>
> But all the domUs memory has to fall in this restricted memory range (as
> specified by mypci_usabe)?
>
> for example,
> If I start three virtual machines, say VM1, VM2, VM3 with 64MB memory each,
> how could I make sure that, the total 192MB for three VMs lie somewhere in
> mypci_usable range only and not anywhere else.
>
> Thanks,
> Dinesh C
>
> ________________________________
> Date: Thu, 12 Jun 2008 22:37:17 -0400
> From: zephyr.zhao@xxxxxxxxx
> To: dinesh_chan8@xxxxxxxxxxx
> Subject: Re: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
> CC: xen-devel@xxxxxxxxxxxxxxxxxxx; xen-users@xxxxxxxxxxxxxxxxxxx
>
> Can dom0 address the whole memory space if no other domU running? If so, it
> can freely allocate memory to other guests.
>
> On Thu, Jun 12, 2008 at 3:34 PM, dinesh chandrasekaran
> <dinesh_chan8@xxxxxxxxxxx> wrote:
>
> Thanks Weiming,
>
>                             But did the same by editing the e820.c. That is,
> after xen boots up, if I type 'xm dmesg' I could find my output which is
> (000000000fff000000 - 00000000ffffffff (mypci_usable)).
>
> I couldn't find the exact place in xen source where the memory allocation
> for DomU guests are performed.
>
> Now how can I make XEN use the above (mypci_usable) memory range to allocate
> memory for all its DomU guests.
>
> Thanks in advance
> Dinesh C
>
>
> ________________________________
> Date: Fri, 6 Jun 2008 15:12:49 -0400
> From: zephyr.zhao@xxxxxxxxx
> To: dinesh_chan8@xxxxxxxxxxx
> CC: xen-devel@xxxxxxxxxxxxxxxxxxx; xen-users@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
>
> I'm not very sure about your problem. Can the Hypervisor address the whole
> 5GB space? If yes, it can then allocate any of them to guests.
>
> Or you can modify the 'start info' passed to Guest OS. You can change the
> page_nr, a machine-PFN translation table to enable the guest to address the
> memory space that you want. It's weird.
>
> On Fri, Jun 6, 2008 at 2:57 PM, dinesh chandrasekaran
> <dinesh_chan8@xxxxxxxxxxx> wrote:
>
> YES.
>
>         But if I want to add memory of type E820_USABLE to xen memory map
> during boot up (as per xen/e820.c) where the memory to be added lies behind
> a PCI device?
>
> For ex,
> If a PCI device reports it has 1GB of memory behind it.
> And XEN has identified th RAM memory to be 4GB.
>
> How can the PCI - 1GB can be added as usable memory to XEN's memory pool to
> get a cumulative size of 5GB;
>
> thanks,
> Dinesh C
>
> On Fri, Jun 6, 2008 at 3:00 PM, Weiming wrote:
>
> AFAIK, In para virtualization, when guest boots, it reads the memorylayout
> from a special page (start info page) instead of from bios.
> If your guest os is a PV Linux, you can check its source code (e.g.
> start_kernel(), etc.)
>
> Thanks,
> Weiming
>
> On Fri, Jun 6, 2008 at 2:00 PM, dinesh chandrasekaran
> <dinesh_chan8@xxxxxxxxxxx> wrote:
>
>
>
> ________________________________
> CoolHotmail : Your crazy personality deserves a unique email identity like
> yourname@xxxxxxxxxxxx Choose from this and hundreds other unique email ids
> now Try it!
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>
>
>
> ________________________________
> CoolHotmail : Your crazy personality deserves a unique email identity like
> yourname@xxxxxxxxxxxx Choose from this and hundreds other unique email ids
> now Try it!
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>
>
>
> ________________________________
> Skydrive - Get 5GB online space for FREE!. Store and share music, photos and
> documents online with ease. Try it now!
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>
>
>
> ________________________________
> Placements ? No Problem. Register Here! Try it!
>
> ________________________________
> WL Messenger : Stay connected to friends and family with the New Windows
> Live Messenger. Get it now. Try it now!
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>
>

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