Bug 707166 - Hot unplug virtio disk costs more than 4 secs
Summary: Hot unplug virtio disk costs more than 4 secs
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm
Version: 5.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Alex Williamson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: Rhel5KvmTier2
TreeView+ depends on / blocked
 
Reported: 2011-05-24 09:44 UTC by Mike Cao
Modified: 2011-05-26 02:36 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-26 02:36:31 UTC


Attachments (Terms of Use)

Description Mike Cao 2011-05-24 09:44:20 UTC
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 10:57:07 UTC
> 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-25 01:52:40 UTC
Meet the same problem when hot unplug/plug virtio disk/NIC for 300 times.

Comment 3 Glauber Costa 2011-05-25 17:19:58 UTC
Can you elaborate about the failure?

Any messages you see ?

Comment 5 Mike Cao 2011-05-26 02:28:59 UTC
(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-26 02:36:31 UTC
(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.