qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] RFC: async commands with QMP


From: Marc-André Lureau
Subject: Re: [Qemu-devel] RFC: async commands with QMP
Date: Wed, 29 Jul 2015 17:18:10 +0200

Hi Daniel

On Wed, Jul 29, 2015 at 5:05 PM, Daniel P. Berrange <address@hidden> wrote:
> When QMP was originally written there was some infrastructure for doing
> async commands, but over time this has all been ripped out because it
> was never really used, complicated the code and didn't work too well
> either. It seems we pretty much settled on the approach that all
> commands should be fast to execute, and where there is a long term
> job being run, we have commands to query its status, cancel it, and
> sometimes events too.  One of the benefits of this is that it means
> that libvirt can determine current status of ongoing background jobs
> when it restarts and reconnects to a previously launched QEMU, where
> as an async command approach is tied to the specific monitor connection
> that is open.

Thanks for the historic reasons, I ignored that.

Querying status is not incompatible with having async commands. It's
not because command return immediately that the job is finished, it's
async already! This proposal is about having a return when the job is
actually finished to avoid having to continuously query, that's the
main motivation. Today's return for async commands is pretty useless,
you can admit, it's just a ack that the command got accepted and
eventually started...

Also commands can be tight to the lifecycle of a client. Take memsave
or screendump, if you give them a client fd, you actually don't care
if the client is gone: there is no need to query about the status of
those commands. Instead, they should be cancelled when the client is
gone.

-- 
Marc-André Lureau



reply via email to

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