qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-2.12 v2] monitor: bind dispatch bh to iohand


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH for-2.12 v2] monitor: bind dispatch bh to iohandler context
Date: Tue, 10 Apr 2018 07:48:28 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 04/10/2018 12:01 AM, Stefan Hajnoczi wrote:
> On Tue, Apr 10, 2018 at 12:49:42PM +0800, Peter Xu wrote:
>> Eric Auger reported the problem days ago that OOB broke ARM when running
>> with libvirt:
>>
>> http://lists.gnu.org/archive/html/qemu-devel/2018-03/msg06231.html
>>
>> The problem was that the monitor dispatcher bottom half was bound to
>> qemu_aio_context now, which could be polled unexpectedly in block code.
> 
> And TPM and 9P code, who all use nested event loops.

I'll tweak the commit message to mention that.

> 
>> We should keep the dispatchers run in iohandler_ctx just like what we
>> did before the Out-Of-Band series (chardev uses qio, and qio binds
>> everything with iohandler_ctx).
>>

>> ---
>> v2:
>> - enhanced commit message

Thanks for that.  As you are learning, the hardest part of writing a
patch is often not the code itself, but figuring out the most efficient
way to get reviewers to understand why the patch is important.  The
better you get at writing GOOD commit messages, the easier it is for
your patches to be accepted!

>> ---
>>  monitor.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/monitor.c b/monitor.c
>> index 51f4cf480f..39f8ee17ba 100644
>> --- a/monitor.c
>> +++ b/monitor.c
>> @@ -4467,7 +4467,7 @@ static void monitor_iothread_init(void)
>>       * have assumption to be run on main loop thread.  It would be
>>       * nice that one day we can remove this assumption in the future.
>>       */
>> -    mon_global.qmp_dispatcher_bh = aio_bh_new(qemu_get_aio_context(),
>> +    mon_global.qmp_dispatcher_bh = aio_bh_new(iohandler_get_aio_context(),
>>                                                monitor_qmp_bh_dispatcher,
>>                                                NULL);
> 
> Reviewed-by: Stefan Hajnoczi <address@hidden>

Reviewed-by: Eric Blake <address@hidden>

and queuing through my qapi tree, pull request for -rc3 going out shortly

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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