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

Re: [Xen-devel] grant table size


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Durrant, Paul" <pdurrant@xxxxxxxxxx>
  • Date: Wed, 20 Nov 2019 11:52:02 +0000
  • Accept-language: en-GB, en-US
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 20 Nov 2019 11:52:32 +0000
  • Ironport-sdr: PDAaG3njIpc8nvH3br5evACn/xRVT4KGRefwk8zVIT64b6nAliKU3mAFXCpH9bmrjrt0zvEyRr 35xYxeJLLnyQ==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AdWfhQwGXUKIxbF7Q62ckygVPo3ZWwABR/+AAAFd68AAAM6kAAAACm4AAAEhiIAAABiKwA==
  • Thread-topic: [Xen-devel] grant table size

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: 20 November 2019 12:42
> To: Durrant, Paul <pdurrant@xxxxxxxxxx>
> Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] grant table size
> 
> On 20.11.2019 12:18,  Durrant, Paul  wrote:
> >> -----Original Message-----
> >> From: Jan Beulich <jbeulich@xxxxxxxx>
> >> Sent: 20 November 2019 12:09
> >> To: Durrant, Paul <pdurrant@xxxxxxxxxx>
> >> Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx
> >> Subject: Re: [Xen-devel] grant table size
> >>
> >> On 20.11.2019 11:49,  Durrant, Paul  wrote:
> >>>> From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> >>>> 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?
> 

Well, another option would be to always set the value of max seen by the guest 
to be some really large value but actually apply a lower limit in Xen, which 
could then be increased by the toolstack. I don't believe that would require 
any guest-side modification either.

  Paul 

> Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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