Bug 727076

Summary: guest call trace when i/o is slow
Product: Red Hat Enterprise Linux 6 Reporter: Suqin Huang <shuang>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: mkenneth, tburke, virt-maint
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: 2011-08-11 21:46:08 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 Suqin Huang 2011-08-01 09:38:20 UTC
Description of problem:
limit guest throttle to 1K with cgroup, and run dd in guest, which will cause call trace.

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.172.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. #mount -t cgroup -o blkio blkio /cgroup
2. #mkdir /cgroup/blkio1
3. create lvm
# qemu-img create -f raw cgroup.raw 10G
# losetup /dev/loop0 cgroup.raw
# pvcreate /dev/loop0
# vgcreate vg /dev/loop0
# lvcreate -L 5G -n lv vg
4. limit throttle
# echo 253:3 1024 > blkio.throttle.read_bps_device
# echo 253:3 1024 > blkio.throttle.write_bps_device
5. boot guest 
6. echo `pidof qemu-kvm` > tasks (contain threads)
7. run dd in guest
#dd if=/dev/zero of=/dev/vdb bs=1M count=1000


Actual results:


Expected results:


Additional info:
1. guest: rhel5.7.64 2.6.18-274.el5
2. host:
2.6.32-171.el6.x86_64
qemu-kvm-0.12.1.2-2.172.el6.x86_64

3. call trace
Kernel 2.6.18-274.el5 on an x86_64

localhost.localdomain login: INFO: task dd:2714 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
dd            D ffff81000a53eaa0     0  2714   2636                     (NOTLB)
 ffff81003054db98 0000000000000086 0000000000000000 ffffffff8001c452
 ffff81003060e440 0000000000000007 ffff81007be63860 ffff81007ffb8100
 00000034f171f496 000000000018ff26 ffff81007be63a48 000000018006e649
Call Trace:
 [<ffffffff8001c452>] generic_make_request+0x211/0x228
 [<ffffffff8006ec8f>] do_gettimeofday+0x40/0x90
 [<ffffffff800637ce>] io_schedule+0x3f/0x67
 [<ffffffff800f7fb6>] __blockdev_direct_IO+0x8d5/0xa88
 [<ffffffff800e885d>] blkdev_direct_IO+0x32/0x37
 [<ffffffff800e8795>] blkdev_get_blocks+0x0/0x96
 [<ffffffff800c8ea6>] generic_file_direct_IO+0x108/0x122
 [<ffffffff8001f144>] generic_file_direct_write+0x60/0xf2
 [<ffffffff800166d9>] __generic_file_aio_write_nolock+0x2b8/0x3b6
 [<ffffffff800c902b>] generic_file_aio_write_nolock+0x20/0x6c
 [<ffffffff800c9402>] generic_file_write_nolock+0x8f/0xa8
 [<ffffffff800a2e5d>] autoremove_wake_function+0x0/0x2e
 [<ffffffff801aaf34>] read_zero+0x1cc/0x225
 [<ffffffff800e761f>] blkdev_file_write+0x1a/0x1f
 [<ffffffff80016b92>] vfs_write+0xce/0x174
 [<ffffffff8001745b>] sys_write+0x45/0x6e
 [<ffffffff8005d28d>] tracesys+0xd5/0xe0

Comment 2 Dor Laor 2011-08-11 21:46:08 UTC
What did you expect to happen...