From: weiming Subject: Re: physmap deallocation on balloon? Date: Tue, 8 Apr 2008 20:52:03 -0400 Message-ID: References: <47FC102E.500@cs.binghamton.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0992733323==" Return-path: In-Reply-To: <47FC102E.500@cs.binghamton.edu> 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: mhines@cs.binghamton.edu Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============0992733323== Content-Type: multipart/alternative; boundary="----=_Part_8526_25359010.1207702323641" ------=_Part_8526_25359010.1207702323641 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I guess it's possible but the effect might be not obvious. When you shrink the reservation by one page (4K), you just save one entry. And currently, ballooning works as a kernel module which, from kernel's perspective, just simple allocates / frees pages. It makes the code simple and easier. Resizing the mapping table complicates it. And you'd better keep the table contiguous. It's nasty. Just my 2 cents. Correct me if I'm wrong. Thanks, Weiming On Tue, Apr 8, 2008 at 8:39 PM, Michael R. Hines wrote: > Greetings, > > Currently, as I understand PV memory allocation, > the Guest's pfn -> mfn physmap will get populated > on-demand as the guest uses more an more of its > memory reservation. > > Is it possible to also make this go in the reverse direction? > > For example: let's say we have a guest that is mostly idle > and has a great deal of free memory and we decide to balloon > down the domain. In addition to decreasing the domain's > reservation, is it also possible to remove the physmap entries > in an on-demand fashion as memory is freed up? > > -- > /* > Michael R. Hines > http://www.cs.binghamton.edu/~mhines/ > Live long and prosper... > */ > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > ------=_Part_8526_25359010.1207702323641 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,

I guess it's possible but the effect might be not obvious. When you shrink the reservation by one page (4K), you just save one entry.

And currently, ballooning works as a kernel module which, from kernel's perspective, just simple allocates / frees pages. It makes the code simple and easier. Resizing the mapping table complicates it. And you'd better keep the table contiguous. It's nasty.

Just my 2 cents. Correct me if I'm wrong.

Thanks,
Weiming

On Tue, Apr 8, 2008 at 8:39 PM, Michael R. Hines <mhines@cs.binghamton.edu> wrote:
Greetings,

Currently, as I understand PV memory allocation,
the Guest's pfn -> mfn physmap will get populated
on-demand as the guest uses more an more of its
memory reservation.

Is it possible to also make this go in the reverse direction?

For example: let's say we have a guest that is mostly idle
and has a great deal of free memory and we decide to balloon
down the domain. In addition to decreasing the domain's
reservation, is it also possible to remove the physmap entries
in an on-demand fashion as memory is freed up?

--
/*
Michael R. Hines
http://www.cs.binghamton.edu/~mhines/
Live long and prosper...
*/


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


------=_Part_8526_25359010.1207702323641-- --===============0992733323== 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 --===============0992733323==--