Bug 707166 - Hot unplug virtio disk costs more than 4 secs
Hot unplug virtio disk costs more than 4 secs
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.7
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Alex Williamson
Virtualization Bugs
:
Depends On:
Blocks: Rhel5KvmTier2
  Show dependency treegraph
 
Reported: 2011-05-24 05:44 EDT by Mike Cao
Modified: 2011-05-25 22:36 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-25 22:36:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike Cao 2011-05-24 05:44:20 EDT
Description of problem:
run a small scripts to hotplug/unplug virtio disk 300 times ,11 times the disk could not hot-unpluged in 4 secs

Version-Release number of selected component (if applicable):
# uname -r
2.6.18-262.el5
# rpm -q kvm
kvm-83-235.el5


How reproducible:
11/300

Steps to Reproduce:
1.start a RHEL5u7 guest
CLI:/usr/libexec/qemu-kvm -no-hpet -no-kvm-pit-reinjection -usbdevice tablet -rtc-td-hack -startdate now -usb -name RHEL6 -smp 4 -k en-us -m 8G -boot dnc -net nic,vlan=1,macaddr=00:1a:4a:42:49:00,model=virtio -net tap,vlan=1,script=/etc/qemu-ifup,downscript=no -drive file=/dev/stress/rhel5u7,media=disk,if=virtio,cache=off,boot=on,format=qcow2,werror=stop -cpu qemu64,+sse2 -M rhel5.6.0 -notify all -balloon none -monitor unix:/tmp/tt,server,nowait -spice disable-ticketing,port=5910,ic=on,host=0 -qxl 1
2.do hot-plug/hot-unplug virtio disk in a loop
for ((i=1;i<=300;i++));
do 
   echo pci_add pci_addr=00:00:6 storage file=/home /tt,if=virtio,format=qcow2,cache=none |nc -U /tmp/tt;  
   echo pci_del pci_addr=00:00:06 | nc -U /tmp/tt  ;
   sleep 4;
done
  
Actual results:
11 times virtio disks can not hot-unplug in 4 secs

Expected results:


Additional info:
Comment 1 juzhang 2011-05-24 06:57:07 EDT
> 2.do hot-plug/hot-unplug virtio disk in a loop
> for ((i=1;i<=300;i++));
> do 
>    echo pci_add pci_addr=00:00:6 storage file=/home
> /tt,if=virtio,format=qcow2,cache=none |nc -U /tmp/tt;  
>    echo pci_del pci_addr=00:00:06 | nc -U /tmp/tt  ;
>    sleep 4;
> done
Would you please have a  try adding sleep 2-4 after hot-add disks.

like

 echo pci_add pci_addr=00:00:6 storage file=/home
/tt,if=virtio,format=qcow2,cache=none |nc -U /tmp/tt;  
sleep 2-4;
echo pci_del pci_addr=00:00:06 | nc -U /tmp/tt  ;
   sleep 4;

or what's messages promoted when can not hot-unplug in 4 secs
Comment 2 Qunfang Zhang 2011-05-24 21:52:40 EDT
Meet the same problem when hot unplug/plug virtio disk/NIC for 300 times.
Comment 3 Glauber Costa 2011-05-25 13:19:58 EDT
Can you elaborate about the failure?

Any messages you see ?
Comment 5 Mike Cao 2011-05-25 22:28:59 EDT
(In reply to comment #3)
> Can you elaborate about the failure?
> 
> Any messages you see ?

if the device did not remove successfully (means 00:00:06 in use in this round ).in the next round when exec #echo pci_add pci_addr=00:00:6 storage file=/home
/tt,if=virtio,format=qcow2,cache=none |nc -U /tmp/tt; guest will assign the pci address to 00:00:7
Comment 6 Mike Cao 2011-05-25 22:36:31 EDT
(In reply to comment #1)
(In reply to comment #4)

Tried following simple scripts ,the issue has gone.

for ((i=1;i<=300;i++));
do 
   echo pci_add pci_addr=00:00:6 storage file=/home
/tt,if=virtio,format=qcow2,cache=none |nc -U /tmp/tt;
   sleep 1; //after hot plug sleep 1secs  
   echo pci_del pci_addr=00:00:06 | nc -U /tmp/tt  ;
   sleep 1; //after hot unplug sleep 1secs
done

I don't think it is a regression .It happened when pci_del executed before pci_add finish executed (in comment #0's scripts may cause it).


Based on above ,I will close it as not a bug .

Note You need to log in before you can comment on or make changes to this bug.