qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/4] events doubts


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 4/4] events doubts
Date: Wed, 7 Oct 2015 10:52:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 07/10/2015 10:21, Pavel Dovgaluk wrote:
> There are two kinds of events:
> - read from the log and injected immediately (user input, network input)
> - read from the log and wait for corresponding event in the queue (BH)
> 
> We cannot inject BH event immediately because we do not have any information
> about callback

Actually we do (indirectly, through aio_bh_call).  But that may not be
the central issue, because...

> and to preserve consistency - BH cannot be processed before
> it is scheduled by qemu core.

... you are processing them differently anyway between record mode
(where the BH is scheduled by the core) and replay (where the BH is
called directly).

In fact, I don't understand what introduces the difference between
record and replay that requires special handling of ptimers' bottom
halves.  In both cases, the ptimer triggers at the desired time (based
on checkpoints) and then the bottom half is called as soon as possible.
 Why is a separate async event necessary?

Because we only care about bottom halves from ptimers, their order
should be the same for both record and replay.

If bottom halves async events could be removed, that would simplify a
lot the code, and it would make it a lot easier to understand for me.

Paolo



reply via email to

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