[libvirt] [PATCH 09/13] conf: Pre-calculate initial memory size instead of always calculating it
Michal Privoznik
mprivozn at redhat.com
Tue Sep 22 12:29:10 UTC 2015
On 21.09.2015 19:21, Peter Krempa wrote:
> Add 'initial_memory' member to struct virDomainMemtune so that the
> memory size can be pre-calculated once instead of inferring it always
> again and again.
>
> Separating of the fields will also allow finer granularity of decisions
> in later patches where it will allow to keep the old initial memory
> value in cases where we are handling incomming migration from older
> versions that did not always update the size from NUMA as the code did
> previously.
>
> The change also requires modification of the qemu memory alignment
> function since at the point where we are modifying the size of NUMA
> nodes the total size needs to be recalculated too.
>
> The refactoring done in this patch also fixes a crash in the hyperv
> driver that did not properly initialize def->numa and thus
> virDomainNumaGetMemorySize(def->numa) crashed.
>
> In summary this patch should have no functional impact at this point.
> ---
> src/conf/domain_conf.c | 52 +++++++++++++++++++++++++++++-------------------
> src/conf/domain_conf.h | 3 +++
> src/libvirt_private.syms | 1 +
> src/qemu/qemu_domain.c | 15 +++++++++-----
> 4 files changed, 46 insertions(+), 25 deletions(-)
ACK
Michal
More information about the libvir-list
mailing list