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

Re: [Xen-devel] [PATCH 2/2] domain: use PGC_extra domheap page for shared_info

On 06.03.2020 12:59, Durrant, Paul wrote:
>> -----Original Message-----
>> From: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
>> Sent: 06 March 2020 11:53
>> To: Jan Beulich <jbeulich@xxxxxxxx>; Durrant, Paul <pdurrant@xxxxxxxxxxxx>
>> Cc: julien@xxxxxxx; andrew.cooper3@xxxxxxxxxx; sstabellini@xxxxxxxxxx; 
>> konrad.wilk@xxxxxxxxxx;
>> Volodymyr_Babchuk@xxxxxxxx; ian.jackson@xxxxxxxxxxxxx; wl@xxxxxxx; 
>> george.dunlap@xxxxxxxxxx; xen-
>> devel@xxxxxxxxxxxxxxxxxxxx
>> Subject: RE: [EXTERNAL][PATCH 2/2] domain: use PGC_extra domheap page for 
>> shared_info
>> On Fri, 2020-03-06 at 12:37 +0100, Jan Beulich wrote:
>>> I've started looking at the latest version of Paul's series, but I'm
>>> still struggling to see the picture: There's no true distinction
>>> between Xen heap and domain heap on x86-64 (except on very large
>>> systems). Therefore it is unclear to me what "those pages" is actually
>>> referring to above. Surely new Xen can't be given any pages in use
>>> _in any way_ by old Xen, no matter whether it's ones assigned to
>>> domains, or ones used internally to (old) Xen.
>> Old and new Xen do not coexist. There is a kexec (via kexec_reloc.S and
>> purgatory) from old to new.
>> There are some pages which new Xen MUST NOT scribble on, because they
>> actually belong to the domains being preserved. That includes the EPT
>> (or at least IOMMU) page tables.
>> I suppose new Xen also mustn't scribble on the pages in which old Xen
>> has placed the migration information for those domains either. At
>> least, not until it's consumed the data.
>> Anything else, however, is fine for new Xen to scribble on. Fairly much
>> anything that the old Xen had allocated from its xenheap (and not
>> subsequently shared to a guest, qv) is no longer required and can be
>> treated as free memory by the new Xen, which now owns the machine.
> ... so getting rid of shared xenheap pages altogether just makes life easier.

How do you tell pages in use by domains from ones free to re-use?
Because of the overloading of struct page_info, I expect you can't
judge by just looking at a page's struct page_info instance. Are
you peeking into the migration streams for the domains to collect
all the pages? And are you walking IOMMU structures to collect the
ones used for but not accessible by the domains?


Xen-devel mailing list



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