[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 2/2] x86/dom0: improve paging memory usage calculations
>>> On 12.12.18 at 11:16, <roger.pau@xxxxxxxxxx> wrote: > There are also further issues that I wanted to discuss in a separate > thread, what about foreign mappings? Dom0 will likely map a non > trivial amount of grants and foreign mappings, which will also require > p2m/IOMMU page table entries. Hmm, good point. Then again this is a runtime requirement, whereas here we want to get the boot time estimate right. At runtime lack of memory for P2M tables will simply result in -ENOMEM. > Should we maybe size Dom0 p2m/iommu internal paging structures to be > able to map up to max_page at least? Well, max_page is a gross over-estimate of RAM (especially with dom0_mem= in effect) and doesn't help at all with MMIO or the foreign/grant maps you mention. I wonder whether for Dom0 we don't need to change the entire approach of how we set it up in PVH mode: Instead of a single paging_set_allocation(), why don't we call the function repeatedly whenever we run out of space, shrinking what we actually give to Dom0 accordingly (and incrementally). For the PCI BAR mappings this would require doing so when the Dom0 kernel is already running, but I think that's acceptable. PCI device add would fail with -ENOMEM when the allocation pools can't be suitably grown. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |