[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 09/13] block: Drain throttling queue with Bdr
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [PATCH v2 09/13] block: Drain throttling queue with BdrvChild callback |
Date: |
Mon, 9 May 2016 14:17:06 +0100 |
User-agent: |
Mutt/1.6.0 (2016-04-01) |
On Fri, Apr 22, 2016 at 07:42:38PM +0200, Kevin Wolf wrote:
> This removes the last part of I/O throttling from block/io.c and moves
> it to the BlockBackend.
>
> Instead of having knowledge about throttling inside io.c, we can call a
> BdrvChild callback .drained_begin/end, which happens to drain the
> throttled requests for BlockBackend parents.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block/block-backend.c | 32 +++++++++++++++++++++++++++-----
> block/io.c | 39 ++++++++++++++++++---------------------
> include/block/block_int.h | 8 +++-----
> 3 files changed, 48 insertions(+), 31 deletions(-)
I'm confused about the naming. BdrvChildRole.drained_begin/end and
bdrv_parent_drained_begin/end have nothing to do with
bdrv_drained_begin()/bdrv_drained_end()?
If these were callbacks that happened at bdrv_drained_begin/end time
then I could understand, but that doesn't seem to be the case.
What are the semantics of these callbacks? Maybe we can find a clearer
name. I think the point is not to "drain" (in the sense of completing
requests) but simply to restart queued requests?
signature.asc
Description: PGP signature