grant table size
I've dealt with a few problems over the years where the root cause was a guest running out of grant table and so I'm wondering whether it would be a good idea to allow a toolstack to increase the table size of a running guest, e.g. when plugging in a new PV interface.
It would appear that current Linux guests would not be able to make use of this as it stands (but that could be fixed), but as far as I can tell a pvops kernel would not misbehave if the maximum table size were to increase. Similarly Windows PV drivers would need modification to make use of a dynamic maximum table size but would not misbehave as is. Does anyone have any objection to the idea?
Paul
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 1 line · Paul
I've dealt with a few problems over the years where the root cause was a guest running out of grant table and so I'm wondering whether it would be a good idea to allow a toolstack to increase the table size of a running guest, e.g. when plugging in a new PV interface.
I would rather have a new xl command that does the grant table increase (ie: xl set-max-grant-frames) instead of doing it when plugging new interfaces.
Quoted 2 lines
It would appear that current Linux guests would not be able to make use of this as it stands (but that could be fixed), but as far as I can tell a pvops kernel would not misbehave if the maximum table size were to increase. Similarly Windows PV drivers would need modification to make use of a dynamic maximum table size but would not misbehave as is. Does anyone have any objection to the idea?
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?
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 7 lines
-----Original Message-----
From: Roger Pau Monné <[email protected]>
Sent: 20 November 2019 11:06
To: Durrant, Paul <[email protected]>
Cc: [email protected]
Subject: Re: [Xen-devel] grant table size
Quoted 9 lines
Quoted 1 line · Paul
I've dealt with a few problems over the years where the root cause was a
guest running out of grant table and so I'm wondering whether it would be a good idea to allow a toolstack to increase the table size of a running guest, e.g. when plugging in a new PV interface.
I would rather have a new xl command that does the grant table increase (ie: xl set-max-grant-frames) instead of doing it when plugging new interfaces.
That would be ok too... Just thought it might be nicer if it were automatic but it would indeed be complete guess-work in libxl to come up with a per-interface grant table quota.
Quoted 11 lines
Quoted 1 line
It would appear that current Linux guests would not be able to make use
of this as it stands (but that could be fixed), but as far as I can tell a pvops kernel would not misbehave if the maximum table size were to increase. Similarly Windows PV drivers would need modification to make use of a dynamic maximum table size but would not misbehave as is.
Quoted 1 line
Does anyone have any objection to the idea?
Do you have in mind to signal this somehow to guests, or the expectation is that the guest will have to poll
GNTTABOP_query_sizeand 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.
Paul
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 11 lines · Paul
Quoted 6 lines
From: Roger Pau Monné <[email protected]>
Sent: 20 November 2019 11:06Do you have in mind to signal this somehow to guests, or the expectation is that the guest will have to poll
GNTTABOP_query_sizeand 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.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 20 lines
-----Original Message-----
From: Jan Beulich <[email protected]>
Sent: 20 November 2019 12:09
To: Durrant, Paul <[email protected]>
Cc: Roger Pau Monné <[email protected]>; [email protected]
Subject: Re: [Xen-devel] grant table sizeQuoted 11 lines · Paul
Quoted 6 lines
From: Roger Pau Monné <[email protected]>
Sent: 20 November 2019 11:06Do you have in mind to signal this somehow to guests, or the expectation is that the guest will have to poll
GNTTABOP_query_sizeand 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.
Quoted 6 lines
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? 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?
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.
Paul
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 27 lines · Paul
Quoted 20 lines
-----Original Message-----
From: Jan Beulich <[email protected]>
Sent: 20 November 2019 12:09
To: Durrant, Paul <[email protected]>
Cc: Roger Pau Monné <[email protected]>; [email protected]
Subject: Re: [Xen-devel] grant table sizeQuoted 11 lines · Paul
Quoted 6 lines
From: Roger Pau Monné <[email protected]>
Sent: 20 November 2019 11:06Do you have in mind to signal this somehow to guests, or the expectation is that the guest will have to poll
GNTTABOP_query_sizeand 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.
Quoted 6 lines
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.
Quoted 5 lines
Well, perhaps we could have a
set_sizegnttab 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.
Quoted 3 lines
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.
Quoted 4 lines
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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 50 lines
-----Original Message-----
From: Jan Beulich <[email protected]>
Sent: 20 November 2019 12:42
To: Durrant, Paul <[email protected]>
Cc: Roger Pau Monné <[email protected]>; [email protected]
Subject: Re: [Xen-devel] grant table sizeQuoted 5 lines · Paul
Quoted 5 lines
-----Original Message-----
From: Jan Beulich <[email protected]>
Sent: 20 November 2019 12:09
To: Durrant, Paul <[email protected]>
Cc: Roger Pau Monné <[email protected]>; xen-Quoted 22 lines
Quoted 15 lines
Subject: Re: [Xen-devel] grant table size
Quoted 11 lines · Paul
Quoted 6 lines
From: Roger Pau Monné <[email protected]>
Sent: 20 November 2019 11:06Do you have in mind to signal this somehow to guests, or the expectation is that the guest will have to poll
GNTTABOP_query_sizeand 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.
Quoted 6 lines
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.
Quoted 5 lines
Well, perhaps we could have a
set_sizegnttab 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.
Quoted 3 lines
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.
Quoted 8 lines
Quoted 4 lines
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
Quoted 1 line
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel