qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH]: fix QEMU SCSI lock up


From: Anthony Liguori
Subject: [Qemu-devel] Re: [PATCH]: fix QEMU SCSI lock up
Date: Wed, 24 Sep 2008 18:38:23 -0500
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

Marcelo Tosatti wrote:
From: Matteo Frigo <address@hidden>
Date: Wed, 02 Apr 2008 20:41:24 -0400
To: address@hidden
Subject: [Qemu-devel] QEMU/KVM SCSI lock up
X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4)
X-Mailman-Approved-At: Thu, 03 Apr 2008 00:59:59 -0400
Reply-To: address@hidden

kvm-64 hangs under heavy disk I/O with scsi disks.  To reproduce,
create a fresh qcow2 disk, boot linux, and execute

  dd if=/dev/sdX of=/dev/null bs=1M

on the fresh disk.  See also 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1895893&group_id=180599

I have attached a patch that appears to fix the problem.  The bug
seems to be the following.  scsi_read_data() does the following

    bdrv_aio_read()
    r->sector += n;
    r->sector_count -= n;

For reasons that I do not fully understand, bdrv_aio_read() does
not return immediately, but instead it calls scsi_read_data()
recursively.

This bothers me. bdrv_aio_read() should never immediately invoke the callback to prevent exactly this sort of problem. Perhaps this was a bug that has since been fixed? Is this still reproducible?

Regards,

Anthony Liguori




reply via email to

[Prev in Thread] Current Thread [Next in Thread]