qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 1/4] qapi: Add a 'coroutine' flag for commands


From: Kevin Wolf
Subject: Re: [PATCH v4 1/4] qapi: Add a 'coroutine' flag for commands
Date: Wed, 22 Jan 2020 11:10:21 +0100
User-agent: Mutt/1.12.1 (2019-06-15)

Am 22.01.2020 um 07:32 hat Markus Armbruster geschrieben:
> Kevin Wolf <address@hidden> writes:
> 
> > This patch adds a new 'coroutine' flag to QMP command definitions that
> > tells the QMP dispatcher that the command handler is safe to be run in a
> > coroutine.
> 
> I'm afraid I missed this question in my review of v3: when is a handler
> *not* safe to be run in a coroutine?

That's a hard one to answer fully.

Basically, I think the biggest problem is with calling functions that
change their behaviour if run in a coroutine compared to running them
outside of coroutine context. In most cases the differences like having
a nested event loop instead of yielding are just fine, but they are
still subtly different.

I know this is vague, but I can assure you that problematic cases exist.
I hit one of them with my initial hack that just moved everything into a
coroutine. It was related to graph modifications and bdrv_drain and
resulted in a hang. For the specifics, I would have to try and reproduce
the problem again.

Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]