diff options
author | Paul Durrant <pdurrant@amazon.com> | 2019-12-11 16:29:56 +0100 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2019-12-20 13:44:45 +0100 |
commit | f4eef1b652eeb850a0f44e8f985cc4153a0c0265 (patch) | |
tree | 7e3ac85060e8a9e29ba590743eb6161ecf099e4e /lib/ubsan.c | |
parent | xen/interface: re-define FRONT/BACK_RING_ATTACH() (diff) | |
download | linux-f4eef1b652eeb850a0f44e8f985cc4153a0c0265.tar.xz linux-f4eef1b652eeb850a0f44e8f985cc4153a0c0265.zip |
xen-blkback: support dynamic unbind/bind
By simply re-attaching to shared rings during connect_ring() rather than
assuming they are freshly allocated (i.e assuming the counters are zero)
it is possible for vbd instances to be unbound and re-bound from and to
(respectively) a running guest.
This has been tested by running:
while true;
do fio --name=randwrite --ioengine=libaio --iodepth=16 \
--rw=randwrite --bs=4k --direct=1 --size=1G --verify=crc32;
done
in a PV guest whilst running:
while true;
do echo vbd-$DOMID-$VBD >unbind;
echo unbound;
sleep 5;
echo vbd-$DOMID-$VBD >bind;
echo bound;
sleep 3;
done
in dom0 from /sys/bus/xen-backend/drivers/vbd to continuously unbind and
re-bind its system disk image.
This is a highly useful feature for a backend module as it allows it to be
unloaded and re-loaded (i.e. updated) without requiring domUs to be halted.
This was also tested by running:
while true;
do echo vbd-$DOMID-$VBD >unbind;
echo unbound;
sleep 5;
rmmod xen-blkback;
echo unloaded;
sleep 1;
modprobe xen-blkback;
echo bound;
cd $(pwd);
sleep 3;
done
in dom0 whilst running the same loop as above in the (single) PV guest.
Some (less stressful) testing has also been done using a Windows HVM guest
with the latest 9.0 PV drivers installed.
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'lib/ubsan.c')
0 files changed, 0 insertions, 0 deletions