qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	 "open list:Block layer core" <qemu-block@nongnu.org>,
	Hanna Reitz <hreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>,
	 Fam Zheng <fam@euphon.net>, Qing Wang <qinwang@redhat.com>,
	 Emanuele Giuseppe Esposito <eesposit@redhat.com>
Subject: Re: [PATCH] block-backend: fix virtio-scsi assertion failure with blk_drain_noref()
Date: Thu, 5 Jan 2023 12:59:21 +0100	[thread overview]
Message-ID: <CABgObfZ4-89bwi-LLddbw3Of-pYNHfjSo01G7Ej0J7__Yth0vg@mail.gmail.com> (raw)
In-Reply-To: <Y7a14QNkit3keLm1@fedora>

[-- Attachment #1: Type: text/plain, Size: 961 bytes --]

Il gio 5 gen 2023, 12:35 Stefan Hajnoczi <stefanha@redhat.com> ha scritto:

> On Wed, Jan 04, 2023 at 10:37:34PM +0100, Paolo Bonzini wrote:
> > blk_root_drained_end is not thread-safe too. I started looking at that
> with
> > https://www.mail-archive.com/qemu-devel@nongnu.org/msg925670.html;
> that's
> > certainly a prerequisite for this patch to be a full fix, but I have not
> > checked if it's enough because I don't have the QEMU sources at hand
> right
> > now.
>
> Thanks for letting me know.
>
> Do you think blk_drain_noref() makes sense at all, or should
> scsi_purge_requests() avoid calling blk_drain() somehow?
>

I think it makes sense as a stop gap measure.

Perhaps these iothread unrefs could also be changed to happen in a
main-loop BH, but I wouldn't rush that. Unref is also the main culprit for
functions that end up calling aio_poll from coroutine context (which should
be prohibited!) and Kevin was looking at that.

Paolo


> Stefan
>

[-- Attachment #2: Type: text/html, Size: 1758 bytes --]

  reply	other threads:[~2023-01-05 12:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04 19:56 [PATCH] block-backend: fix virtio-scsi assertion failure with blk_drain_noref() Stefan Hajnoczi
2023-01-04 21:37 ` Paolo Bonzini
2023-01-05 11:34   ` Stefan Hajnoczi
2023-01-05 11:59     ` Paolo Bonzini [this message]
2023-01-13 15:31 ` Kevin Wolf

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=CABgObfZ4-89bwi-LLddbw3Of-pYNHfjSo01G7Ej0J7__Yth0vg@mail.gmail.com \
    --to=pbonzini@redhat.com \
    --cc=eesposit@redhat.com \
    --cc=fam@euphon.net \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qinwang@redhat.com \
    --cc=stefanha@redhat.com \
    /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).