[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] delte PAGE_ORDER_1G in pod
On 26/04/16 12:05, Zhang, Chunyu wrote: > >> On 26/04/16 11:49, Zhang, Chunyu wrote: >>> >>>> On 26/04/16 08:27, zhangcy wrote: >>>>> PoD does not have cache list for 1GB pages. >>>>> >>>>> Signed-off-by: zhangcy <zhangcy@xxxxxxxxxxxxxx> >>>> >>>> Thanks for the patch. FYI we normally tag the area in the title in a >>>> structured way; I probably would have used something like the following: >>>> >>>> xen/pod: Remove code handling PAGE_ORDER_1G from p2m_pod_cache_add >>> got it, thanks. >>>> >>>> But with regards to the patch itself: The question isn't whether we have >>>> a cache list for 1G pages; the question is whether p2m_pod_cache_add() >>>> will ever be called with order == PAGE_ORDER_1G. >>>> >>>> Taking a quick glance around, it looks like in theory if a guest called >>>> decrease_reservation with order == PAGE_ORDER_1G, you could conceivably >>>> get to p2m_pod_cache_add() with order == PAGE_ORDER_1G. >>> i just think like this: >>> >>> p2m_pod_decrease_reservation >>> - if ( steal_for_cache && p2m_is_ram(t) ) >>> - p2m_pod_cache_add(p2m, page, cur_order) >>> i think p2m_is_ram(t) , ram also from pod cache, >> >> No, that's memory from the guest's p2m table. The p2m table can have 1G > right.. > sorry , i did not write clearly. > i mean: ram come like this: > - pod cache is 4K or 2M > - ram get from pod cache > - set ram to p2m table. > so i think p2m table is 4K or 2M. Oh, right, I see -- a guest booted in PoD mode would normally only have 2M or 4k entries, since that's how they get filled in. But there's nothing preventing someone coming up with a new domain builder that comes with some 1G entries filled in already. Nor is there anything stopping a guest ballooning out a 1G region, then ballooning it back in (hoping to get a full 1G entry), and then ballooning it out again, causing Xen to potentially leak memory. I haven't checked to see whether any of that is actually feasible or not, but four lines of code is a small price to pay to not have to worry about it. :-) -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |