Re: [Qemu-devel] [PATCH 3/5] Convert BlockDriver to explicit coroutine annotations

2013-08-07 Thread Gabriel Kerneis
On Wed, Aug 07, 2013 at 09:30:25PM +0200, Stefan Hajnoczi wrote: > I have mixed feelings about removing coroutine_fn annotations from a > function when it does not yield or call other coroutine_fn functions. > > These functions were probably written as part of a coroutine code path. > The coroutin

Re: [Qemu-devel] [PATCH 3/5] Convert BlockDriver to explicit coroutine annotations

2013-08-07 Thread Charlie Shepherd
On 07/08/2013 20:30, Stefan Hajnoczi wrote: On Mon, Aug 05, 2013 at 08:33:10PM +0100, Charlie Shepherd wrote: On 05/08/2013 20:23, Gabriel Kerneis wrote: On Mon, Aug 05, 2013 at 08:44:05PM +0200, Charlie Shepherd wrote: diff --git a/include/block/coroutine_int.h b/include/block/coroutine_int.h

Re: [Qemu-devel] [PATCH 3/5] Convert BlockDriver to explicit coroutine annotations

2013-08-07 Thread Charlie Shepherd
On 06/08/2013 10:24, Kevin Wolf wrote: Am 05.08.2013 um 20:44 hat Charlie Shepherd geschrieben: This patch converts the .bdrv_open, .bdrv_file_open and .bdrv_create members of struct BlockDriver to be explicitly annotated as coroutine_fn, rather than yielding dynamically depending on whether t

Re: [Qemu-devel] [PATCH 3/5] Convert BlockDriver to explicit coroutine annotations

2013-08-07 Thread Stefan Hajnoczi
On Mon, Aug 05, 2013 at 08:33:10PM +0100, Charlie Shepherd wrote: > On 05/08/2013 20:23, Gabriel Kerneis wrote: > >On Mon, Aug 05, 2013 at 08:44:05PM +0200, Charlie Shepherd wrote: > >>diff --git a/include/block/coroutine_int.h b/include/block/coroutine_int.h > >>index f133d65..d0ab27d 100644 > >>-

Re: [Qemu-devel] [PATCH 3/5] Convert BlockDriver to explicit coroutine annotations

2013-08-06 Thread Kevin Wolf
Am 05.08.2013 um 20:44 hat Charlie Shepherd geschrieben: > This patch converts the .bdrv_open, .bdrv_file_open and .bdrv_create members > of struct BlockDriver > to be explicitly annotated as coroutine_fn, rather than yielding dynamically > depending on whether > they are executed in a coroutine

Re: [Qemu-devel] [PATCH 3/5] Convert BlockDriver to explicit coroutine annotations

2013-08-06 Thread Kevin Wolf
Am 05.08.2013 um 22:05 hat Gabriel Kerneis geschrieben: > On Mon, Aug 05, 2013 at 08:33:10PM +0100, Charlie Shepherd wrote: > > Yes that does merit some explanation. > > Thanks for the details. > > > qemu_co_queue_run_restart is a bit different. It is only called from > > coroutine_swap in qemu-c

Re: [Qemu-devel] [PATCH 3/5] Convert BlockDriver to explicit coroutine annotations

2013-08-05 Thread Gabriel Kerneis
On Mon, Aug 05, 2013 at 08:33:10PM +0100, Charlie Shepherd wrote: > Yes that does merit some explanation. Thanks for the details. > qemu_co_queue_run_restart is a bit different. It is only called from > coroutine_swap in qemu-coroutine.c, and it enters coroutines that > were waiting but have now

Re: [Qemu-devel] [PATCH 3/5] Convert BlockDriver to explicit coroutine annotations

2013-08-05 Thread Charlie Shepherd
On 05/08/2013 20:23, Gabriel Kerneis wrote: On Mon, Aug 05, 2013 at 08:44:05PM +0200, Charlie Shepherd wrote: This patch converts the .bdrv_open, .bdrv_file_open and .bdrv_create members of struct BlockDriver to be explicitly annotated as coroutine_fn, rather than yielding dynamically dependin

Re: [Qemu-devel] [PATCH 3/5] Convert BlockDriver to explicit coroutine annotations

2013-08-05 Thread Gabriel Kerneis
Hi Charlie, Many thanks for this patch series. On Mon, Aug 05, 2013 at 08:44:05PM +0200, Charlie Shepherd wrote: > This patch converts the .bdrv_open, .bdrv_file_open and .bdrv_create members > of struct BlockDriver > to be explicitly annotated as coroutine_fn, rather than yielding dynamically

[Qemu-devel] [PATCH 3/5] Convert BlockDriver to explicit coroutine annotations

2013-08-05 Thread Charlie Shepherd
This patch converts the .bdrv_open, .bdrv_file_open and .bdrv_create members of struct BlockDriver to be explicitly annotated as coroutine_fn, rather than yielding dynamically depending on whether they are executed in a coroutine context or not. --- block.c | 16 +++