qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Cc: Marcelo Tosatti <mtosatti@redhat.com>, Avi Kivity <avi@qumranet.com>
Subject: Re: [Qemu-devel] Re: [PATCH]: fix QEMU SCSI lock up
Date: Tue, 21 Oct 2008 09:57:50 -0500	[thread overview]
Message-ID: <48FDEDEE.9000501@codemonkey.ws> (raw)
In-Reply-To: <48F75D05.3010601@redhat.com>

Avi Kivity wrote:
> Avi Kivity wrote:
>> Anthony Liguori wrote:
>>  
>>>> 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?
>>>     
>>
>> qcow2 metadata is synchronous, and if the disk is empty, there will be
>> no data I/O, so bdrv_aio_read() will never be invoked.
>>
>> Maybe we should fix this in qcow2 (and the other block formats) by
>> scheduling a BH.
>>   
>
> FWIW, I was told this reproduces on kvm-77 (which has the latest qemu 
> scsi bits).

qemu_aio_wait() will run bottom halves when emulating synchronous IO.  I 
don't think this is exploitable practically speaking but it seems to me 
like a major flaw.  I think the proper fix is what you describe, 
modifying qcow2 to schedule a bottom half to read metadata.  Better yet, 
a full conversion to make the meta data reading/writing asynchronous.

Regards,

Anthony Liguori

      reply	other threads:[~2008-10-21 14:57 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 ` [Qemu-devel] " Anthony Liguori
2008-09-25  8:00   ` Avi Kivity
2008-10-16 15:25     ` Avi Kivity
2008-10-21 14:57       ` Anthony Liguori [this message]

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=48FDEDEE.9000501@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=avi@qumranet.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).