aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/virtio/kvm_virtio.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2015-07-01 11:07:09 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-07-13 23:17:18 +0300
commit4de7255f7d2be5e51664c6ac6011ffd6e5463571 (patch)
tree625b30fbabffe479856e066d83857011aebc64e0 /drivers/s390/virtio/kvm_virtio.c
parent9p/trans_virtio: reset virtio device on remove (diff)
downloadlinux-dev-4de7255f7d2be5e51664c6ac6011ffd6e5463571.tar.xz
linux-dev-4de7255f7d2be5e51664c6ac6011ffd6e5463571.zip
vhost: extend memory regions allocation to vmalloc
with large number of memory regions we could end up with high order allocations and kmalloc could fail if host is under memory pressure. Considering that memory regions array is used on hot path try harder to allocate using kmalloc and if it fails resort to vmalloc. It's still better than just failing vhost_set_memory() and causing guest crash due to it when a new memory hotplugged to guest. I'll still look at QEMU side solution to reduce amount of memory regions it feeds to vhost to make things even better, but it doesn't hurt for kernel to behave smarter and don't crash older QEMU's which could use large amount of memory regions. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/s390/virtio/kvm_virtio.c')
0 files changed, 0 insertions, 0 deletions