Skip to content

Reduce storage overhead of memory core

Avi Kivity qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20memory: allow MemoryListeners to observe a specific address spaceexec.c hw/vhost.c kvm-all.c +3 more+46 -110 replies
2/20xen: ignore I/O memory regionsxen-all.c+1 -10 replies
3/20memory: split memory listener for the two address spacesexec.c+66 -140 replies
4/20memory: support stateless memory listenersexec.c hw/vhost.c kvm-all.c +3 more+88 -00 replies
5/20memory: change memory registration to rebuild the memory map on each changeexec.c+49 -10 replies
6/20memory: remove first level of l1_phys_mapexec.c+8 -210 replies
7/20memory: unify phys_map last level with intermediate levelsexec.c+35 -430 replies
8/20memory: store MemoryRegionSection pointers in phys_mapexec.c+107 -806 replies
9/20memory: compress phys_map node pointers to 16 bitsexec.c+45 -90 replies
10/20memory: fix RAM subpages in newly initialized pagesexec.c+10 -120 replies
11/20memory: unify the two branches of cpu_register_physical_memory_log()exec.c+15 -340 replies
12/20memory: move tlb flush to MemoryListener commit callbackexec.c+8 -80 replies
13/20memory: make phys_page_find() return a MemoryRegionSectionexec.c+160 -1390 replies
14/20memory: give phys_page_find() its own tree search loopexec.c+13 -40 replies
15/20memory: simplify multipage/subpage registrationexec.c+65 -550 replies
16/20memory: replace phys_page_find_alloc() with phys_page_set()exec.c+4 -110 replies
17/20memory: switch phys_page_set() to a recursive implementationexec.c+41 -260 replies
18/20memory: change phys_page_set() to set multiple pagesexec.c+23 -180 replies
19/20memory: unify PhysPageEntry::node and ::leafexec.c+18 -200 replies
20/20memory: allow phys_map tree paths to terminate earlyexec.c+17 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 00/20] Reduce storage overhead of memory core

Currently the memory core requires 16 bytes per guest page (0.4% overhead). This patchset, building on the patches posted last week, reduces the overhead to practically nothing. Assuming a 4k page size, contiguous aligned 4k, 4M, and 4G regions each occupy just 2 bytes. Since most guest memory is physically contiguous, we can describe a guest with just a few dozen kilobytes.

Please review carefully, especially patch 13, and test carefully, especially things like rom/device.

Also available in

git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/core

Avi Kivity (20):
memory: allow MemoryListeners to observe a specific address space
xen: ignore I/O memory regions
memory: split memory listener for the two address spaces
memory: support stateless memory listeners
memory: change memory registration to rebuild the memory map on each
change
memory: remove first level of l1_phys_map
memory: unify phys_map last level with intermediate levels
memory: store MemoryRegionSection pointers in phys_map
memory: compress phys_map node pointers to 16 bits
memory: fix RAM subpages in newly initialized pages
memory: unify the two branches of cpu_register_physical_memory_log()
memory: move tlb flush to MemoryListener commit callback
memory: make phys_page_find() return a MemoryRegionSection
memory: give phys_page_find() its own tree search loop
memory: simplify multipage/subpage registration
memory: replace phys_page_find_alloc() with phys_page_set()
memory: switch phys_page_set() to a recursive implementation
memory: change phys_page_set() to set multiple pages
memory: unify PhysPageEntry::node and ::leaf
memory: allow phys_map tree paths to terminate early

 exec.c     |  828 +++++++++++++++++++++++++++++++++++++----------------------
 hw/vhost.c |   18 ++-
 kvm-all.c  |   18 ++-
 memory.c   |   50 ++++-
 memory.h   |    7 +-
 xen-all.c  |   18 ++-
 6 files changed, 620 insertions(+), 319 deletions(-)
Signature · 1 line
1.7.9