qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC v2 0/6] Fix QEMU crash during memory hotplug with vhost=on
@ 2015-06-08 15:19 Igor Mammedov
  2015-06-08 15:19 ` [Qemu-devel] [RFC v2 1/6] memory: get rid of memory_region_destructor_ram_from_ptr() Igor Mammedov
                   ` (5 more replies)
  0 siblings, 6 replies; 25+ messages in thread
From: Igor Mammedov @ 2015-06-08 15:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, mst

Changelog:
 v1->v2:
   * take into account Paolo's review comments
     * do not overload ram_addr
     * ifdef linux specific code
   * reseve HVA using API from exec.c instead of calling
     mmap() dircely from memory.c
   * support unmapping of HVA remapped region


Series still is RFC due to VHOST issues with small memory
amount (i.e. last patch 6/6 isn't usable yet), so I'm posting
series mainly for revewing memory API bits.

--
When more than ~50 pc-dimm devices are hotplugged with
vhost enabled, QEMU will assert in vhost vhost_commit()
due to backend refusing to accept too many memory ranges.

Series introduces Reserved HVA MemoryRegion container
where all hotplugged memory is remapped and passes
the single container range to vhost instead of multiple
memory ranges for each hotlugged pc-dimm device.

It's alternative approach to increasing backend supported
memory regions limit since what I've come up with
backend side approach is quite a bit more code so far.

With this approach it would be possible to extend it to
initial memory later and provide a single range for all
RAM to vhost, which should speed up its hot-path by replacing
current GPA<->HVA lookup loop with offset calculation.

Igor Mammedov (6):
  memory: get rid of memory_region_destructor_ram_from_ptr()
  memory: introduce MemoryRegion container with reserved HVA range
  memory: support unmapping of MemoryRegion mapped into HVA parent
  hostmem: return recreated MemoryRegion if current can't be reused
  pc: reserve hotpluggable memory range with
    memory_region_init_hva_range()
  pc: fix QEMU crashing when more than ~50 memory hotplugged

 backends/hostmem.c        |  6 ++++
 exec.c                    | 67 +++++++++++++++++++++++++++++-------------
 hw/i386/pc.c              |  4 +--
 hw/virtio/vhost.c         | 15 ++++++++--
 include/exec/cpu-common.h |  3 ++
 include/exec/memory.h     | 57 +++++++++++++++++++++++++++++++++--
 include/exec/ram_addr.h   |  1 -
 memory.c                  | 75 +++++++++++++++++++++++++++++++++++++++++++----
 8 files changed, 194 insertions(+), 34 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2015-06-17 16:30 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-08 15:19 [Qemu-devel] [RFC v2 0/6] Fix QEMU crash during memory hotplug with vhost=on Igor Mammedov
2015-06-08 15:19 ` [Qemu-devel] [RFC v2 1/6] memory: get rid of memory_region_destructor_ram_from_ptr() Igor Mammedov
2015-06-08 15:23   ` Paolo Bonzini
2015-06-08 16:08     ` Igor Mammedov
2015-06-08 16:09       ` Paolo Bonzini
2015-06-08 16:26         ` Igor Mammedov
2015-06-08 15:19 ` [Qemu-devel] [RFC v2 2/6] memory: introduce MemoryRegion container with reserved HVA range Igor Mammedov
2015-06-08 15:19 ` [Qemu-devel] [RFC v2 3/6] memory: support unmapping of MemoryRegion mapped into HVA parent Igor Mammedov
2015-06-08 15:26   ` Paolo Bonzini
2015-06-08 15:32   ` Paolo Bonzini
2015-06-08 16:13     ` Igor Mammedov
2015-06-08 16:25       ` Michael S. Tsirkin
2015-06-08 17:06         ` Paolo Bonzini
2015-06-09 10:08           ` Igor Mammedov
2015-06-17  8:14             ` Paolo Bonzini
2015-06-17 15:04               ` Igor Mammedov
2015-06-17 15:10                 ` Michael S. Tsirkin
2015-06-17 16:15                   ` Paolo Bonzini
2015-06-17 16:30                     ` Michael S. Tsirkin
2015-06-08 15:19 ` [Qemu-devel] [RFC v2 4/6] hostmem: return recreated MemoryRegion if current can't be reused Igor Mammedov
2015-06-08 15:30   ` Paolo Bonzini
2015-06-08 16:25     ` Igor Mammedov
2015-06-08 16:28       ` Paolo Bonzini
2015-06-08 15:19 ` [Qemu-devel] [RFC v2 5/6] pc: reserve hotpluggable memory range with memory_region_init_hva_range() Igor Mammedov
2015-06-08 15:19 ` [Qemu-devel] [RFC v2 6/6] pc: fix QEMU crashing when more than ~50 memory hotplugged Igor Mammedov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).