On 20.11.2019 12:18, Durrant, Paul wrote: >> -----Original Message----- >> From: Jan Beulich <jbeul...@suse.com> >> Sent: 20 November 2019 12:09 >> To: Durrant, Paul <pdurr...@amazon.com> >> Cc: Roger Pau Monné <roger....@citrix.com>; xen-devel@lists.xenproject.org >> Subject: Re: [Xen-devel] grant table size >> >> On 20.11.2019 11:49, Durrant, Paul wrote: >>>> From: Roger Pau Monné <roger....@citrix.com> >>>> Sent: 20 November 2019 11:06 >>>> >>>> Do you have in mind to signal this somehow to guests, or the >>>> expectation is that the guest will have to poll GNTTABOP_query_size >>>> and at some point the size will increase? >>> >>> I don't think the guest need care until its grant table grows to the >>> max. At that point, rather than giving up, the guest would re-query >>> the max value to see if there is now more headroom and then re-size >>> its internal data structures accordingly. >> >> If we consider dynamic adjustments, what about shrinking of the >> table? This would of course require some form of guest consent, >> but it would be nice if the option would at least be accounted >> for when working out how all of this should behave, even if the >> case may not get handled right now. >> > > Well, perhaps we could have a set_size gnttab op where a guest would > be allowed to call it with a value less than (or equal to) its current > max, so that it can voluntarily yield its headroom, but only a > privileged guest would be allowed to call it with an increased max > value?
Ah yes, this sounds good. > I'm not sure what mechanism would be best for requesting a guest > reduction though, I guess probably xenstore... something akin to > balloon target pages? Perhaps. > A guest reduction of max is of pretty limited value though AFAICT as > only in-use frames really use any memory. The (active/shared/status) > arrays could, of course, be reduced in size but that only gets you a > few bytes back. Well, if this really was about just "a few bytes", why wouldn't we allow arbitrary size grant tables to begin with? Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel