From: "Pavel Dovgaluk" <Pavel.Dovgaluk@ispras.ru>
To: 'Paolo Bonzini' <pbonzini@redhat.com>
Cc: peter.maydell@linaro.org, igor.rubinov@gmail.com,
mark.burton@greensocs.com, qemu-devel@nongnu.org, hines@cert.org,
'Peter Crosthwaite' <peter.crosthwaite@petalogix.com>,
maria.klimushenkova@ispras.ru, real@ispras.ru,
batuzovk@ispras.ru, alex.bennee@linaro.org,
fred.konrad@greensocs.com
Subject: Re: [Qemu-devel] [PATCH v16 00/21] Deterministic replay core
Date: Thu, 27 Aug 2015 16:04:50 +0300 [thread overview]
Message-ID: <000401d0e0c8$f5207350$df6159f0$@Dovgaluk@ispras.ru> (raw)
In-Reply-To: <55D1C1FA.2040109@redhat.com>
> From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo Bonzini
> unfortunately I do have some more review comments; that can happen when
> going back to the code after a few months, and it's also a good thing
> because it means that the code _is_ actually getting cleaner.
Thanks for review.
> However, I am fairly sure that v17 is going to be the good one and will
> be in 2.5 if I get it by mid September when I'll be back from vacation.
>
> In particular:
>
> * patch 3 seems to be unnecessary (for now at least)
Done.
> * replay_next_event_is is modified in patch 8 ("cpu: replay instructions
> sequence") after it's introduced in patch 6 ("replay: introduce icount
> event"). Please fold the change in patch 6.
Done.
> * replay_add_event is not used; please remove it, rename
> replay_add_event_internal to replay_add_event, and add an assertion that
> the rr mode is the right one (e.g. RECORD only?)
Done.
> * a couple of comments say "grteater" instead of "greater"
Done.
> * the replay_save_clock and replay_read_clock stubs should abort
Done.
> * please inline replay_input_event into qemu_input_event_send and
> replay_input_sync_event into qemu_input_event_sync, so that the
> corresponding *_impl functions can be static; this also means moving the
> prototypes of replay_add_input_event and replay_add_input_sync_event to
> replay/replay.h (I acknowledge this might undo a request from a previous
> review of mine; I don't remember)
I can't. *_impl functions are called to process input events, when they are
waiting in the events queue.
> * most stubs are unnecessary (replay_get_current_step,
> replay_checkpoint, qemu_system_shutdown_request,
> qemu_input_event_send_impl, qemu_input_event_sync_impl)
replay_checkpiont is required by qemu-timer.c
>
> * please squash this in "replay: checkpoints"
Ok.
> And a few questions. The first three are the "if the answer is yes,
> please do this" kind to questions, the others can have more
> open/subjective answers:
>
> * does it make sense to call replay_check_error from
> replay_finish_event, and remove the call from replay_read_next_clock?
No, read errors are checked just after file read operations.
replay_finish_event usually is not coupled with any reads.
> * should qemu_clock_use_for_deadline always return false in replay mode?
> The clocks are all deterministic, so it doesn't make sense to take them
> into account in the poll() deadline.
It could be host clock or virtual_rt. In both cases qemu_soonest_timeout
will write some clock reads into the events log. In play we should read
these clocks to avoid inconsistency.
> * now that qemu_clock_warp has to be called in main_loop_wait, should
> the icount_warp_timer have a dummy callback? icount_warp_rt is then
> only called from qemu_clock_warp. If so, this (adding the call to
> qemu_clock_warp in main_loop_wait, making the icount_warp_timer dummy,
> removing the now-unnecessary argument of icount_warp_rt) should be a
> separate patch before "replay: checkpoints"
It seems that icount_warp_rt may be called without timer.
I'll prepare a patch.
> * can you explain why both CHECKPOINT_INIT and CHECKPOINT_RESET are
> needed? What events are typically found in each of them?
'Init' and 'reset' checkpoints is used to split initialization and
resetting functions. Some of them interact with log file (e.g., write clock
values). These saved events may be used by other function than should
be in normal execution. Checkpoints prevent reading more clock values
than needed by polling functions, called when initializing the hardware.
> * would it make sense to test "replay_mode != REPLAY_MODE_NONE &&
> !runstate_is_running()" in replay_checkpoint, for all checkpoints, like
>
> if (replay_mode != REPLAY_MODE_NONE && !runstate_is_running()) {
> return false;
> }
It could be useful in case when machine is stopped just before
checkpoint. I'll fix this.
> * do we need an event for suspend?
Maybe, but the difference probably won't exhibit itself on a diskless system.
Pavel Dovgalyuk
prev parent reply other threads:[~2015-08-27 13:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-04 8:43 [Qemu-devel] [PATCH v16 00/21] Deterministic replay core Pavel Dovgalyuk
2015-08-04 8:43 ` [Qemu-devel] [PATCH v16 01/21] i386: partial revert of interrupt poll fix Pavel Dovgalyuk
2015-08-04 8:44 ` [Qemu-devel] [PATCH v16 02/21] replay: global variables and function stubs Pavel Dovgalyuk
2015-08-04 8:44 ` [Qemu-devel] [PATCH v16 03/21] sysemu: system functions for replay Pavel Dovgalyuk
2015-08-04 8:44 ` [Qemu-devel] [PATCH v16 04/21] replay: internal functions for replay log Pavel Dovgalyuk
2015-08-04 8:44 ` [Qemu-devel] [PATCH v16 05/21] replay: introduce mutex to protect the " Pavel Dovgalyuk
2015-08-04 8:44 ` [Qemu-devel] [PATCH v16 06/21] replay: introduce icount event Pavel Dovgalyuk
2015-08-04 8:44 ` [Qemu-devel] [PATCH v16 07/21] cpu-exec: allow temporary disabling icount Pavel Dovgalyuk
2015-08-04 8:44 ` [Qemu-devel] [PATCH v16 08/21] cpu: replay instructions sequence Pavel Dovgalyuk
2015-08-04 8:44 ` [Qemu-devel] [PATCH v16 09/21] i386: interrupt poll processing Pavel Dovgalyuk
2015-08-04 8:44 ` [Qemu-devel] [PATCH v16 10/21] replay: interrupts and exceptions Pavel Dovgalyuk
2015-08-04 8:44 ` [Qemu-devel] [PATCH v16 11/21] replay: asynchronous events infrastructure Pavel Dovgalyuk
2015-08-04 8:44 ` [Qemu-devel] [PATCH v16 12/21] replay: recording and replaying clock ticks Pavel Dovgalyuk
2015-08-04 8:45 ` [Qemu-devel] [PATCH v16 13/21] replay: shutdown event Pavel Dovgalyuk
2015-08-04 8:45 ` [Qemu-devel] [PATCH v16 14/21] replay: checkpoints Pavel Dovgalyuk
2015-08-04 8:45 ` [Qemu-devel] [PATCH v16 15/21] bottom halves: introduce bh call function Pavel Dovgalyuk
2015-08-04 8:45 ` [Qemu-devel] [PATCH v16 16/21] replay: ptimer Pavel Dovgalyuk
2015-08-04 8:45 ` [Qemu-devel] [PATCH v16 17/21] typedef: add typedef for QemuOpts Pavel Dovgalyuk
2015-08-04 8:45 ` [Qemu-devel] [PATCH v16 18/21] replay: initialization and deinitialization Pavel Dovgalyuk
2015-08-04 8:45 ` [Qemu-devel] [PATCH v16 19/21] replay: replay blockers for devices Pavel Dovgalyuk
2015-08-04 8:45 ` [Qemu-devel] [PATCH v16 20/21] replay: command line options Pavel Dovgalyuk
2015-08-04 8:45 ` [Qemu-devel] [PATCH v16 21/21] replay: recording of the user input Pavel Dovgalyuk
2015-08-15 9:57 ` [Qemu-devel] [PATCH v16 00/21] Deterministic replay core Pavel Dovgalyuk
2015-08-15 10:03 ` Paolo Bonzini
2015-08-17 11:14 ` Paolo Bonzini
2015-08-27 13:04 ` Pavel Dovgaluk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000401d0e0c8$f5207350$df6159f0$@Dovgaluk@ispras.ru' \
--to=pavel.dovgaluk@ispras.ru \
--cc=alex.bennee@linaro.org \
--cc=batuzovk@ispras.ru \
--cc=fred.konrad@greensocs.com \
--cc=hines@cert.org \
--cc=igor.rubinov@gmail.com \
--cc=maria.klimushenkova@ispras.ru \
--cc=mark.burton@greensocs.com \
--cc=pbonzini@redhat.com \
--cc=peter.crosthwaite@petalogix.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=real@ispras.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).