diff mbox series

[2/3] docs: document ~/control/feature-balloon

Message ID 20230510142011.1120417-3-yann.dirson@vates.fr (mailing list archive)
State New, archived
Headers show
Series officializing xenstore control/feature-balloon entry | expand

Commit Message

Yann Dirson May 10, 2023, 2:20 p.m. UTC
This flag has been in use by XAPI for a long time (was present at creation
of the github xen-api/squeezed repo in 2013), and could be used by other
toolstacks.

Signed-off-by: Yann Dirson <yann.dirson@vates.fr>
---
 docs/misc/xenstore-paths.pandoc | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Jan Beulich May 11, 2023, 9:21 a.m. UTC | #1
On 10.05.2023 16:20, Yann Dirson wrote:
> --- a/docs/misc/xenstore-paths.pandoc
> +++ b/docs/misc/xenstore-paths.pandoc
> @@ -509,6 +509,12 @@ This may be initialized to "" by the toolstack and may then be set
>  to 0 or 1 by a guest to indicate whether it is capable of responding
>  to a mode value written to ~/control/laptop-slate-mode.
>  
> +#### ~/control/feature-balloon
> +
> +This may be initialized to "" by the toolstack and may then be set to
> +0 or 1 by a guest to indicate whether it is capable of memory
> +ballooning, and responds to values written to ~/memory/target.

Besides correctly saying "may", I guess this wants to go further and also
clarify what the (intended) behavior is when the node is absent. Aiui PV
guests are always expected to have a balloon driver, so the assumed
value likely needs to be "1" there. Furthermore I'm afraid it doesn't
really become clear what value this node is if it's only optionally
present, while its absence doesn't really allow uniform assumptions
towards a default value.

Jan
Yann Dirson May 22, 2023, 8:32 a.m. UTC | #2
On 5/11/23 11:21, Jan Beulich wrote:
> On 10.05.2023 16:20, Yann Dirson wrote:
>> --- a/docs/misc/xenstore-paths.pandoc
>> +++ b/docs/misc/xenstore-paths.pandoc
>> @@ -509,6 +509,12 @@ This may be initialized to "" by the toolstack and may then be set
>>   to 0 or 1 by a guest to indicate whether it is capable of responding
>>   to a mode value written to ~/control/laptop-slate-mode.
>>   
>> +#### ~/control/feature-balloon
>> +
>> +This may be initialized to "" by the toolstack and may then be set to
>> +0 or 1 by a guest to indicate whether it is capable of memory
>> +ballooning, and responds to values written to ~/memory/target.
> 
> Besides correctly saying "may", I guess this wants to go further and also
> clarify what the (intended) behavior is when the node is absent. Aiui PV
> guests are always expected to have a balloon driver, so the assumed
> value likely needs to be "1" there. Furthermore I'm afraid it doesn't
> really become clear what value this node is if it's only optionally
> present, while its absence doesn't really allow uniform assumptions
> towards a default value.


Things are indeed more complicated than I originally identified,
the way this xenstore entry is used currently seems to make it difficult 
to introduce it in a backward-compatible manner

I guess this and a number of details ought to be discussed at the XAPI
level first.

Details: the squeezed assumption [1] is that a domain which has not set 
this to 1 is not ready yet to get ballooned, which implies the default 
has to be 0 whatever the guest type, as it requires to know the total 
number of pages used by the domain to be stable.  So I guess we can see 
it as not being "not just a feature flag".


[1] 
https://github.com/xapi-project/xen-api/tree/master/ocaml/squeezed/doc/design#environmental-assumptions
diff mbox series

Patch

diff --git a/docs/misc/xenstore-paths.pandoc b/docs/misc/xenstore-paths.pandoc
index a604f6b1c6..6c4e2c3da2 100644
--- a/docs/misc/xenstore-paths.pandoc
+++ b/docs/misc/xenstore-paths.pandoc
@@ -509,6 +509,12 @@  This may be initialized to "" by the toolstack and may then be set
 to 0 or 1 by a guest to indicate whether it is capable of responding
 to a mode value written to ~/control/laptop-slate-mode.
 
+#### ~/control/feature-balloon
+
+This may be initialized to "" by the toolstack and may then be set to
+0 or 1 by a guest to indicate whether it is capable of memory
+ballooning, and responds to values written to ~/memory/target.
+
 ### Domain Controlled Paths
 
 #### ~/data/* [w]