[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] Enhance memory exchange to support foreign domain -- Was RE: [Xen-devel] [PATCH 6/6] Change MMU_PT_UPDATE_RESERVE_AD to support update page table for foreign domain
On 30/06/2009 10:40, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx> wrote: >> B. Your adjustment of tot_pages is confusing. I can't >> convince myself the >> arithmetic is correct. Furthermore messing with tot_pages >> outside of the >> d->page_alloc_lock is not allowed. > > The idea of the adjustment is: > > In each loop, we remove some pages (the in_chunk_list) without decrease the > tot_pages. Then when we get domain is dying when assign pages (the > out_chunk_list), we need decrease the count. For those page that has been > assigned, it should be covered by domain_relinquish_resources(), so what we > need decrease is: > the number that has been removed - the number that has been assigned already. There's still quite a logical leap to the arithmetic in your code. Spell it out in a comment. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |