[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] Optimize record/replay checkpointing for all
From: |
Artem Pisarenko |
Subject: |
Re: [Qemu-devel] [PATCH v3] Optimize record/replay checkpointing for all clocks it applies to |
Date: |
Thu, 18 Oct 2018 23:10:26 +0600 |
> чт, 18 окт. 2018 г., 20:31 Paolo Bonzini:
>On 18/10/2018 15:23, Artem Pisarenko wrote:
>>> We can also move the switch statement to a separate function, it
>>> simplifies the code:
>>> ...
>>
>> When I prepared this patch my intuition said me to add note in advance:
>> "Paolo, please, don't try to move this to a separate function. I've
>> tried it already. It cannot be done correct, look nice and not decrease
>> performancy at the same time". But I've ignored it... :)
>> Change you did is correct and nice, but (compared to my version) it adds
>> extra unlock/lock pair for running each timer list when it isn't empty
>> and in non-rr mode (where we would ignore checkpoints and execution flow
>> would bypass whole "if (need_replay_checkpoint) {...}" block).
>> Maybe you're aware of it, but I don't think that such change worth it.
>
> No, you're right. The if should remain in the caller, or
> need_replay_checkpoint must be initialized with replay_mode.
If initialize 'need_replay_checkpoint', then it should also account for
clock != QEMU_CLOCK_REALTIME. And here we come to what if+switch block
actually (mostly) does in my version. Finally, you will get duplication of
this whole condition usage between source function and extracted function,
which isn't nice.
Why do you want to split up such tightly coupled code?
- Re: [Qemu-devel] [PATCH v3 4/4] Optimize record/replay checkpointing for all clocks it applies to, (continued)
[Qemu-devel] [PATCH v3 1/4] Revert some patches from recent [PATCH v6] "Fixing record/replay and adding reverse debugging", Artem Pisarenko, 2018/10/18
[Qemu-devel] [PATCH v3 3/4] Restores record/replay behavior related to special virtual clock processing for timers used in external subsystems., Artem Pisarenko, 2018/10/18
[Qemu-devel] [PATCH v3 2/4] Introduce attributes to qemu timer subsystem, Artem Pisarenko, 2018/10/18
[Qemu-devel] [PATCH v3] Optimize record/replay checkpointing for all clocks it applies to, Artem Pisarenko, 2018/10/18
Re: [Qemu-devel] [PATCH v3 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type, Artem Pisarenko, 2018/10/18
[Qemu-devel] [PATCH v3 4/4] Optimize record/replay checkpointing for all clocks it applies to, Artem Pisarenko, 2018/10/18