[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 7/7] block/nvme: support nested aio_poll()
From: |
Sergio Lopez |
Subject: |
Re: [PATCH 7/7] block/nvme: support nested aio_poll() |
Date: |
Mon, 25 May 2020 10:26:54 +0200 |
On Tue, May 19, 2020 at 06:11:38PM +0100, Stefan Hajnoczi wrote:
> QEMU block drivers are supposed to support aio_poll() from I/O
> completion callback functions. This means completion processing must be
> re-entrant.
>
> The standard approach is to schedule a BH during completion processing
> and cancel it at the end of processing. If aio_poll() is invoked by a
> callback function then the BH will run. The BH continues the suspended
> completion processing.
>
> All of this means that request A's cb() can synchronously wait for
> request B to complete. Previously the nvme block driver would hang
> because it didn't process completions from nested aio_poll().
>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
> block/nvme.c | 67 ++++++++++++++++++++++++++++++++++++++++------
> block/trace-events | 2 +-
> 2 files changed, 60 insertions(+), 9 deletions(-)
Reviewed-by: Sergio Lopez <address@hidden>
signature.asc
Description: PGP signature
- Re: [PATCH 2/7] block/nvme: drop tautologous assertion, (continued)
- [PATCH 3/7] block/nvme: don't access CQE after moving cq.head, Stefan Hajnoczi, 2020/05/19
- [PATCH 4/7] block/nvme: switch to a NVMeRequest freelist, Stefan Hajnoczi, 2020/05/19
- [PATCH 5/7] block/nvme: clarify that free_req_queue is protected by q->lock, Stefan Hajnoczi, 2020/05/19
- [PATCH 6/7] block/nvme: keep BDRVNVMeState pointer in NVMeQueuePair, Stefan Hajnoczi, 2020/05/19
- [PATCH 7/7] block/nvme: support nested aio_poll(), Stefan Hajnoczi, 2020/05/19
- Re: [PATCH 7/7] block/nvme: support nested aio_poll(),
Sergio Lopez <=