xapi-project/xen-api — pull request #1768 by djs55 (2014-05-23 15:08:56+00:00)
Title: CA-135934: use the same estimate of dom0 'static_max' everywhere

We sample the amount of free pages on a host and add an estimate
of dom0 'static_max' to it to create the boot_free_mem.

Later we substract a different estimate of dom0 'static_max' and
erroneously conclude there is free memory when there isn't.

Note there is no good estimate of dom0 'static_max' because dom0
doesn't really know how much memory it has: the xen command-line
says one thing; the domain_getinfo hypercall says another thing;
the "free" command-line says a 3rd thing; and the balloon driver
says a 4th thing. However the main property we need is that we use
the same estimate everywhere.

Signed-off-by: David Scott