Bug 808302

Summary: one guest steal time not aroud 50% when bonding two guests to same cpu
Product: Red Hat Enterprise Linux 6 Reporter: langfang <flang>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, bsarathy, chayang, dyasny, flang, juzhang, michen, mkenneth, qzhang, shu, sluo, virt-maint, wdai, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-30 06:34:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description langfang 2012-03-30 05:46:57 UTC
Description of problem:
bonding two guests to same cpu,one guest steal time  not aroud 50%

Version-Release number of selected component (if applicable):
host: 
#uname -r
2.6.32-252.el6.x86_64
# rpm -qa |grep qemu-kvm
qemu-kvm-0.12.1.2-2.265.el6.x86_64

guest:
#uname -r
2.6.32-251.el6.x86_64
# rpm -qa |grep qemu-kvm
qemu-kvm-0.12.1.2-2.246.el6.x86_64


How reproducible:
70%

Steps to Reproduce:
1.boot two guests with same cpu 
one guest: 
#taskset -c 1 /usr/libexec/qemu-kvm -m 2G -smp 1 -cpu Penryn,+x2apic,-kvmclock -usbdevice tablet -drive file=/root/RHEL-Server-6.3-64-virtio.qcow2-newinstall4,format=qcow2,if=none,id=drive-ide0-0-0,werror=stop,rerror=stop,cache=none -device virtio-blk-pci,scsi=off,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,mac=00:10:20:2d:31:21,bus=pci.0,addr=0x4,id=net0 -boot order=cdn,once=n,menu=on -uuid 3290efd3-7c9e-44f9-b5f7-af0f3a1b3066 -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection  -monitor stdio -name rhel6.1 -spice port=1000,disable-ticketing -vga qxl -device virtio-balloon-pci,bus=pci.0,id=balloon0 -drive file=/root/RHEL6.3-20120313.2-Server-x86_64-DVD1.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,id=hostnet1,script=/etc/qemu-ifup -device rtl8139,netdev=hostnet1,mac=00:10:26:2d:39:25,bus=pci.0,addr=0x6,id=net1
another guest
#taskset -c 1 /usr/libexec/qemu-kvm -m 2G -smp 1 -cpu Penryn,+x2apic -usbdevice tablet -drive file=/root/RHEL-Server-6.3-64-virtio.qcow2-newinstall2,format=qcow2,if=none,id=drive-ide0-0-0,werror=stop,rerror=stop,cache=none -device virtio-blk-pci,scsi=off,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,mac=00:10:20:2d:31:21,bus=pci.0,addr=0x4,id=net0 -boot order=cdn,once=n,menu=on -uuid 3290efd3-7c9e-44f9-b5f7-af0f3a1b3066 -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection  -monitor stdio -name rhel6.1 -spice port=2000,disable-ticketing -vga qxl -device virtio-balloon-pci,bus=pci.0,id=balloon0 -drive file=/root/RHEL6.3-20120313.2-Server-x86_64-DVD1.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0
2.Add 100% cpu load in both guest.

    e.g run following command in guest:

         for ((;;)); do x=1; done
3.run top on both guest 
  one guest steal time is aroud 50%,another is around 0%
4.run top on host 
 #top
....
 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 4271 root      20   0 2927m 724m 5200 S 51.5 10.0   1:19.73  qemu-kvm                                                   
 4297 root      20   0 2738m 704m 5184 S 48.2  9.8   1:33.61 qemu-kvm       
...
Actual results:
one guest steal time is aroud 50%,another is aroud 0%

Expected results:
when run top command ,both guest steal time shoud be around 50%

Additional info:

Comment 2 langfang 2012-03-30 06:34:36 UTC

*** This bug has been marked as a duplicate of bug 612320 ***