New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: improving communication between squeezed and guest #5030
Comments
The general approach looks reasonable to me, I only have nitpicks:
|
Yes this would be the best place for this protocol, I'm checking here first whether this would get traction, and to make sure I did not miss something crucial.
Yes, blindly trusting the guest is likely not a good idea. Note the current squeezed behaviour already has a problem there, as it is already waiting for a signal that the guest reached the initial target, and guest signaling too early will yield a wrong toolstack calibration. We should likely keep the "timeout" logic on toolstack side, where a guest would be flagged as balloon-unresponsive While this clearly needs more detailed thought, the maximum impact must not be worse than getting a non-ballooned guest.
I would guess
I'm not sure if the questions refer to this statement - that assumption is about driver and squeezed. For now the prototype Rust agent does not attempt to do more than the current Go one - it is while pondering if something ought to be improved that I came to this more global proposal. |
Another thing to dig: the squeezed logs make me suspicious that it's not exactly doing what the doc claims:
|
From what I understand of the way
squeezed
communicates with the guest, I feel a couple of points could be improved:~/memory/target
for the in-guest balloon driver, and considers the request applied iftotpages
(fromget_domain_info
) matches the request modulo a calibration offset, and marks the domain's balloon as unresponsive if this does not happen in a given timeframe (5sec without any progress): this seems inefficient in itself (see below)~/memory/target
value, andtotpages
at the time~/control/feature-balloon
is set: today the latter is created by thexe-daemon
guest utility, which has no knowledge at all of the balloon driver state, so does not seem to offer any guarantee the balloon driver has indeed reached its target, so it would seem more correct to have this control node written by the ballooning driver insteadThinking further from there, I'm wondering why
squeezed
really has to do this tracking by itself. Assuming that the balloon driver has less assumptions to make thansqueezed
to determine if it has reached its target, I'd think that something along those lines should do the job:~/control/ballooning
entry as empty~/memory/target
, it then sets~/control/ballooning
to1
and starts working towards the new target~/control/ballooning
to0
This way:
totpages - memory_target
is fixed during a domain's lifetimeObviously it would need to modify both squeezed and the balloon drivers for various guest OS, and a migration path needs to be defined:
~/control/ballooning
stays empty, and toolstack can fallback to its previous behaviour~/control/ballooning
node, and can fallback to their previous behaviourThe text was updated successfully, but these errors were encountered: