qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH]: fix QEMU SCSI lock up
Date: Wed, 24 Sep 2008 18:38:23 -0500	[thread overview]
Message-ID: <48DACF6F.40301@us.ibm.com> (raw)
In-Reply-To: <20080924225946.GA28588@dmt.cnet>

Marcelo Tosatti wrote:
> From: Matteo Frigo <athena@fftw.org>
> Date: Wed, 02 Apr 2008 20:41:24 -0400
> To: qemu-devel@nongnu.org
> 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: qemu-devel@nongnu.org
>
> 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	other threads:[~2008-09-24 23:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-24 22:59 [Qemu-devel] [PATCH]: fix QEMU SCSI lock up Marcelo Tosatti
2008-09-24 23:38 ` Anthony Liguori [this message]
2008-09-25  8:00   ` [Qemu-devel] " Avi Kivity
2008-10-16 15:25     ` Avi Kivity
2008-10-21 14:57       ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48DACF6F.40301@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).