qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] chardev's and fd's in monitors


From: Markus Armbruster
Subject: Re: [Qemu-devel] chardev's and fd's in monitors
Date: Thu, 20 Oct 2016 12:45:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Marc-André Lureau <address@hidden> writes:

> Hi
>
> On Thu, Oct 20, 2016 at 11:38 AM Daniel P. Berrange <address@hidden>
> wrote:
>
>> On Wed, Oct 19, 2016 at 07:06:16PM +0100, Dr. David Alan Gilbert wrote:
>> > * Daniel P. Berrange (address@hidden) wrote:
[...]
>> > > If we make cur_mon a thread-local, then error_report() is equivalent
>> > > to fprintf(stderr) for the migration code, since the migration
>> > > code runs in a different thread thread, and so would always see
>> > > cur_mon == NULL.
>> >
>> > Yes, that would become safe; it does sound the best fix for the current
>> > worry.
>> >
>> > If we had that, then why not wire up error_report to pass errors back to 
>> > QMP
>> > as well?
>>
>> You have a problem of context - if you have multiple monitors, how do
>> you know which to send the error back to if you're not in the event
>> loop thread, and thus cur_mon is NULL. With Marc-Andre's series which
>> allows proper async command processing it gets even harder, because
>> there's potentially many outstanding commands associated with a monitor
>> and you need to decide which the error should be given to.
>>
>
> I would think the contrary, it gets potentially easier as it may actually
> keep the associated monitor (the one that triggered the command) with the
> 'async' context.

Finding the monitor where the asynchronous command was issued is
feasible, but you cannot use it to store an asynchronous command's
error, because the currently running command is already using it.



reply via email to

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