]> git.proxmox.com Git - mirror_qemu.git/commit - memory.c
memory: Share FlatView's and dispatch trees between address spaces
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Thu, 21 Sep 2017 08:51:04 +0000 (18:51 +1000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 21 Sep 2017 21:19:38 +0000 (23:19 +0200)
commit967dc9b1194a9281124b2e1ce67b6c3359a2138f
treec4a43ebddfafe78437e1b1fb7a0073132734eee2
parent02218487649558ed66c3689d4cc55250a42601d8
memory: Share FlatView's and dispatch trees between address spaces

This allows sharing flat views between address spaces (AS) when
the same root memory region is used when creating a new address space.
This is done by walking through all ASes and caching one FlatView per
a physical root MR (i.e. not aliased).

This removes search for duplicates from address_space_init_shareable() as
FlatViews are shared elsewhere and keeping as::ref_count correct seems
an unnecessary and useless complication.

This should cause no change and memory use or boot time yet.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-Id: <20170921085110.25598-13-aik@ozlabs.ru>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
memory.c