[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 1/9] gnttab: defer allocation of maptrack frames table
On 06.09.2021 16:05, Andrew Cooper wrote: > On 26/08/2021 11:09, Jan Beulich wrote: >> By default all guests are permitted to have up to 1024 maptrack frames, >> which on 64-bit means an 8k frame table. Yet except for driver domains >> guests normally don't make use of grant mappings. Defer allocating the >> table until a map track handle is first requested. >> >> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> > > Nack. This creates new dynamic failures outside the VM's control, > therefore regressing Xen's usability. As with the v2 status frames tracking array, the memory demand of the actual table will typically be quite a bit higher than that of the frame tracking table. Therefore guests already are at risk of observing failures from these paths; the increase of that risk from the change here is typically quite small. > The maptrack array (and frames for that matter) should be allocated at > domain creation time, like we do for most other structures in the > hypervisor. Structures we allocate at domain creation time are typically ones which we know will get used (to at least some degree), or where allocation can't be done later because paths this would be needed on have no way to indicate respective failure. Neither of this is true for the maptrack frame table (or the v2 status frame table, for that matter). This said, I could see us _switch_ to a policy like the one you describe, or even allow either behavior depending on some kind of setting. But then this needs to be done consistently for all forms of resources (e.g. also the gnttab v2 frames, not just the frame table). > Furthermore, seeing as this has come up on multiple community calls, I > will remind you that it is not just Citrix as a downstream which is > firmly of this opinion. No-one but you has voiced such an opinion, so far. > This entire patch should be replaced with one that... > >> --- >> I continue to be unconvinced that it is a good idea to allow all DomU-s >> 1024 maptrack frames by default. > > ... defaults to something smaller for plain domUs, because this improves > the general case without leaving VMs more liable to crash at runtime. Just to continue to waste memory? Or to force the admin to know very precisely how many maptrack entries a guest may need to create, such that they will neither cause large amounts of unused memory nor risk the guest running out of handles? Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |