numam-spdk/lib/virtio
Darek Stojaczyk 148eda65c1 virtio: don't reinitialize entire virtqueues on mem hotplug
One of the messages we send on memory hotplug event is
SET_VRING_BASE, which tells vhost e.g. the position in
a vring it should start processing requests from. Sending
this message with any outstanding I/O could cause that
I/O to be never processed as it could be at a vring
position that won't be practically polled.

To fix the above, we don't send SET_VRING_BASE message
on memory hotplug event anymore since it's completely
unnecessary. It was sent together with a couple other
messages that would reinitialize the vring, but we know
vrings occupy a memory buffer that won't be hotremoved
during vring lifetime. We also know that vring GPAs will
never change. Hence we can initialize the vrings just
once on device start now.

We still need to send SET_VRING_ADDR after updating the
memory table, as rte_vhost depends on it to apply that
new memory table. Luckily, this single message doesn't
cause us any trouble.

Change-Id: I2125099f1cf3f8c76e8160ec819bd1a9a3e7823c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439436
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-01-28 18:56:52 +00:00
..
virtio_user virtio: support dynamic memory registrations 2018-10-23 18:02:12 +00:00
Makefile virtio: add new library virtio 2017-12-26 13:03:29 -05:00
virtio_pci.c memory: replace all hardcoded 0x200000 with a define 2019-01-13 00:47:26 +00:00
virtio_user.c virtio: don't reinitialize entire virtqueues on mem hotplug 2019-01-28 18:56:52 +00:00
virtio.c vtophys: add length parameter to the vtophys function 2019-01-09 08:24:59 +00:00