From: Paolo Bonzini <pbonzini@redhat.com>
To: Fiona Ebner <f.ebner@proxmox.com>, Kevin Wolf <kwolf@redhat.com>
Cc: Hanna Czenczek <hreitz@redhat.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org,
John Snow <jsnow@redhat.com>,
Thomas Lamprecht <t.lamprecht@proxmox.com>
Subject: Re: [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH
Date: Mon, 13 Mar 2023 14:09:17 +0100 [thread overview]
Message-ID: <f060c5ab-f60e-a0a4-6415-f4ace8db479e@redhat.com> (raw)
In-Reply-To: <9bc7a6d8-744e-9593-1de0-88f19a1e1bc1@proxmox.com>
On 3/13/23 13:29, Fiona Ebner wrote:
>> In fact, shouldn't request queuing was enabled at the _end_ of
>> bdrv_drained_begin (once the BlockBackend has reached a quiescent
>> state on its own terms), rather than at the beginning (which leads to
>> deadlocks like this one)?
>
> Couldn't this lead to scenarios where a busy or malicious guest, which
> continues to submit new requests, slows down draining or even prevents
> it from finishing?
Possibly, but there is also a .drained_begin/.drained_end callback that
can be defined in order to apply backpressure. (For some other devices,
there's also aio_disable_external/aio_enable_external that do the
equivalent of request queuing but without the deadlocks)
Since starting the queuing of requests at the end of bdrv_drained_begin
wouldn't hurt correctness, and it would fix this kind of deadlock, I
think it would be worth giving it a try.
Paolo
next prev parent reply other threads:[~2023-03-13 13:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 11:44 [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH Hanna Czenczek
2023-03-09 12:05 ` Paolo Bonzini
2023-03-09 12:08 ` Paolo Bonzini
2023-03-09 12:31 ` Hanna Czenczek
2023-03-09 13:59 ` Paolo Bonzini
2023-03-09 17:46 ` Kevin Wolf
2023-03-10 13:05 ` Fiona Ebner
2023-03-10 14:25 ` Kevin Wolf
2023-03-10 15:13 ` Paolo Bonzini
2023-03-13 12:29 ` Fiona Ebner
2023-03-13 13:09 ` Paolo Bonzini [this message]
2023-03-13 16:32 ` Kevin Wolf
2023-03-14 9:42 ` Paolo Bonzini
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=f060c5ab-f60e-a0a4-6415-f4ace8db479e@redhat.com \
--to=pbonzini@redhat.com \
--cc=f.ebner@proxmox.com \
--cc=hreitz@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=t.lamprecht@proxmox.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).