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

Re: [Xen-devel] Design question for PV superpage support

On 03/02/09 17:37, Jeremy Fitzhardinge wrote:
Dave McCracken wrote:
My understanding of save/restore is that it will save your carefully selected 2M pages, cheerfully restore them onto a random set of mfns, then expect your guest to continue running. I haven't studied it enough to know whether your guest at least gets a chance to intervene and fix things after the restore.

Since restore already requires quite a lot of reset, e.g., grant table mappings, on the part of the guest, it seems that checking the validity of any large page mappings should be possible at the same time. Obviously you could get in a big mess if you mapped the code that is going to do the fixup on a large page, but that is unlikely and easily avoidable.
Your guest would need to be in the position to allocate an extra 512 L1 pte pages to replace each shattered 2M page, which could be awkward - and wouldn't have any realistic way to continue if it fails to do so. Perhaps some kind of special pool of pages could be provided to the domain to help it satisfy its memory needs in recovering from a restore-shattered large page.
In general, I think the guest should assume that large page mappings are merely an optimization that (a) might not be possible on domain start due to machine memory fragmentation and (b) that this condition might also occur on restore. Given these, it must always be prepared to function with 4K pages, which implies that it would need to preserve enough page table frame memory to be able revert from large to small pages.


Xen-devel mailing list



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