On 17/06/2015 17:10, Michael S. Tsirkin wrote: > > Actually memory_region_add_subregion(cannot fail) will continue to casue > > problems > > in case one of the listeners fails and has no way to propagate error up the > > stack. > > It could be that vhost_set_memory() or kvm_set_memslots() aren't able to > > allocate > > memory for replacement table in low memory conditions and without > > way to report back QEMU is left with option to die. > > mmap reserving memory just adds it to a data structure somewhere > within glibc, doesn't it? Looks like it's highly unlikely to fail, > so maybe killing QEMU if it does isn't a big deal.
It's in the kernel, but yes, a MAP_NORESERVE mmap is highly unlikely to fail. Paolo