[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH 01/29] qed: Use bottom half to resu
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH 01/29] qed: Use bottom half to resume waiting requests |
Date: |
Wed, 31 May 2017 13:16:53 +0100 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Fri, May 26, 2017 at 10:21:42PM +0200, Kevin Wolf wrote:
> The qed driver serialises allocating write requests. When the active
> allocation is finished, the AIO callback is called, but after this, the
> next allocating request is immediately processed instead of leaving the
> coroutine. Resuming another allocation request in the same request
> coroutine means that the request now runs in the wrong coroutine.
>
> The following is one of the possible effects of this: The completed
> request will generally reenter its request coroutine in a bottom half,
> expecting that it completes the request in bdrv_driver_pwritev().
> However, if the second request actually yielded before leaving the
> coroutine, the reused request coroutine is in an entirely different
> place and is reentered prematurely. Not a good idea.
>
> Let's make sure that we exit the coroutine after completing the first
> request by resuming the next allocating request only with a bottom
> half.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block/qed.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
Reviewed-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH 00/29] qed: Convert to coroutines, Kevin Wolf, 2017/05/26
- [Qemu-devel] [PATCH 01/29] qed: Use bottom half to resume waiting requests, Kevin Wolf, 2017/05/26
- [Qemu-devel] [PATCH 02/29] qed: Make qed_read_table() synchronous, Kevin Wolf, 2017/05/26
- [Qemu-devel] [PATCH 03/29] qed: Remove callback from qed_read_table(), Kevin Wolf, 2017/05/26
- [Qemu-devel] [PATCH 04/29] qed: Remove callback from qed_read_l2_table(), Kevin Wolf, 2017/05/26
- [Qemu-devel] [PATCH 05/29] qed: Remove callback from qed_find_cluster(), Kevin Wolf, 2017/05/26