[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v2 05/15] Make qcow2_open synchronous
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC v2 05/15] Make qcow2_open synchronous |
Date: |
Wed, 4 Sep 2013 13:39:27 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Aug 29, 2013 at 01:43:02PM +0100, Charlie Shepherd wrote:
> On 29/08/2013 13:33, Stefan Hajnoczi wrote:
> >On Fri, Aug 09, 2013 at 07:43:55PM +0200, Charlie Shepherd wrote:
> >>The previous patch convert all .bdrv_open functions to run from a coroutine
> >>context. However
> >>qcow2's open method is also called from qcow2_invalidate_cache.
> >>bdrv_invalidate_cache is mainly
> >>called by migration.c, which doesn't run in coroutine context, so rather
> >>than propagating
> >>coroutine_fn annotations up the call chain, turn qcow2_open into a
> >>synchronous wrapper.
> >I think it would be cleaner to make .bdrv_open a coroutine function and
> >push the synchronous wrapper out to the callers. That way we can either
> >keep synchronous wrappers where necessary, or we can eventually convert
> >that synchronous code to coroutine code.
> >
> >If you hide the synchronous wrapper inside qcow2 it blocks coroutine
> >callers who could otherwise use the event loop.
>
> So you want this approach for all synchronous wrappers?
For .bdrv_*() functions, yes. In other cases the trade-off may be worth
it.
Stefan
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [RFC v2 05/15] Make qcow2_open synchronous,
Stefan Hajnoczi <=