[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-ia64-devel] [PATCH] Fix that guest can not get continuous memory for vhpt



On Mon, Mar 02, 2009 at 05:38:22PM +0800, Zhang, Yang wrote:
> Isaku Yamahata wrote:
> > As you described above, you used alloc_domheap_page(NULL, ) which
> > means that pages for vhpt aren't accounted for a given domain.
> > So the hunk in tools/python/xen/xend/image.py doesn't make sense,
> > does it? Or have you found any issues without the modification to
> > image.py? 
> When using balloon, it does not count the memory for the vhpt in the previous 
> version.
> So when balloon memory from dom0, the guest always can not be launched.
> because there does not have the enough memory for vhpt. And the hunk add in 
> image.py is 
> to fix this issue. this is different from the bug guest can not get 
> continuous memory. 
> Maybe i should split this hunk as an new patch.

So you want to account vhpt memory.
Then, pass the domain pointer as argument to alloc_domheap_page(d, ...)
and leave the hunk in image.py.
Maybe the code path which frees domain memory needs twist.


> > Hmm, the patch makes the allocating/freeing vhpt interface convoluted.
> > The gut of your patch is to make the function, init_domain_vhpt(),
> > not to allocate pages by preallocation. So what should be done is
> > not only to add preallocate pages logic, but also to revise
> > the related functions.
> > Revise init_domain_vhpt() (and free_domain_vhpt()?). Maybe the
> > underlying functions, thash_alloc(), thash_free() need to be
> > refactored. 
> Sorry, i cannot understand your meaning well. what revision should be done?
> I feel that the preallocation just provides a method for init_domain_vhpt to 
> get continuous
> memory.  And we should not to revise this fuctions.

The patch complicates the interface, thash_alloc().
That makes it ugly and difficult to understand.
Instead, introduce clean interface suitable for the purpose.
-- 
yamahata

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.