-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 25-05-23 20:04:08, Marek Marczykowski-Górecki wrote:
> On Fri, May 23, 2025 at 05:12:38PM -0000, qubist wrote:
> > Thanks.
> > 
> > I understand it is a balancing algorithm. Still, I can't answer my own
> > question.
> > 
> > Suppose:
> > 
> > - there is plenty of available RAM (tens of gigabytes)
> > - there are not VMs competing for all of it, i.e. there is enough RAM
> >   for one VM to get its maxmem (e.g. 1 gigabyte)
> > 
> > At which particular moment does that one VM get its maxmem?
> 
> There is no particular event. The Linux balloon driver will at some
> point reach it when it's available. If you really want, I guess you can
> wait for it in a loop (observing /proc/meminfo or such). But as said in
> the initial response, it looks like a fundamentally wrong direction to
> take...

Atrate on Github gave a solution:

https://github.com/QubesOS/qubes-issues/issues/8936

I use this:

        if test -f /var/run/qubes-service/meminfo-writer; then
            mem_KiB="$(xenstore-read -- memory/hotplug-max)"
        else
            mem_KiB="$(xenstore-read -- memory/static-max)"
        fi

Yes, there is nothing that can assure it will reach the `maxmem` and if
it can't reach, it will probably crash the program that requires a lot
of memory.

- -- 
Benjamin Grande
-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQRklnEdsUUe50UmvUUbcxS/DMyWhwUCaDC7igAKCRAbcxS/DMyW
h4giAQCGuIU18UkipWRfoHuiDZZcfC1p/WQ81zb1N4QQtPgyXgEAn46JOMzBQCLJ
qsd0z/pdtGteMzy34yl1gu4mBsr0sgs=
=JC4p
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/qubes-devel/aDC7jyN-ca9V0NtG%408CjfHu8-.

Reply via email to