From: "Pavel Dovgalyuk" <dovgaluk@ispras.ru>
To: 'Artem Pisarenko' <artem.k.pisarenko@gmail.com>
Cc: 'qemu-devel' <qemu-devel@nongnu.org>,
'Pavel Dovgalyuk' <pavel.dovgaluk@ispras.ru>,
'Paolo Bonzini' <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type
Date: Thu, 17 Jan 2019 10:42:33 +0300 [thread overview]
Message-ID: <000601d4ae38$35431f60$9fc95e20$@ru> (raw)
In-Reply-To: <CANzW0mtVkiZJdYMytbDf2QwGDKTKL453zNbQDV6=xO=XvewmZg@mail.gmail.com>
> From: Artem Pisarenko [mailto:artem.k.pisarenko@gmail.com]
> ср, 16 янв. 2019 г. в 12:15, Pavel Dovgalyuk <dovgaluk@ispras.ru>:
> >
> > > From: Artem Pisarenko [mailto:artem.k.pisarenko@gmail.com]
> > > > It seems, that this approach is not always correct.
> > > > Now timerlist_deadline_ns uses all virtual timers for deadline calculation (including
> > > external
> > > > ones).
> > > > qemu_start_warp_timer uses the deadline for setting warp timer (which should be
> > > deterministic).
> > > > Therefore warp timer may become non-deterministic and replay may behave differently
> compared
> > > to
> > > > recording phase.
> > > >
> > > > We have to rollback these or improve somehow to avoid non-determinism.
> > >
> > > I dont understand how this approach would even introduce
> > > non-determinism. I'm not sure about aspects of timers subsystem you
> > > mentioned, assuming that maybe we missed something when tried to
> > > optimize. But this has nothing to do with determinism as long as we
> > > treat all virtual clock timers as deterministic, regardless of
> > > EXTERNAL attribute being set or not. They are intended to be used as
> > > such by design, aren't? This attribute was introduced purely to avoid
> > > extra events in log.
> >
> > Right, but deadline calculation and icount warp events (that are written into the log too)
> > depend on the active virtual timers. Therefore external ones may affect icount warp
> > operation sequence.
> >
> > Pavel Dovgalyuk
> >
>
> Sorry, but I still don't understand the source of non-determinism.
The source is the external timers, that depend on "outer world", e.g., slirp.
These timers are not recorded/replayed, but may affect the icount warping
(which should remain deterministic).
> From what you said I may understand that replay module actually has
> some additional non-trivial (for me) dependencies on EXTERNAL
> attribute other than one, introduced in 'timerlist_run_timers()' (i.e.
> it expects deadline calculations somewhere else to match decisions
> made in this function, or something like that). I would agree that
> these patch series might introduce some incorrect behavior. But it
> must be identical in all emulations running in same conditions,
> because deadline, warp timer and their effects are all dependent only
> on virtual timers, and, therefore, are deterministic too. Of course,
> it needs to be fixed. Did you find solution ?
Please check the new version of the series.
Patch 22
Pavel Dovgalyuk
next prev parent reply other threads:[~2019-01-17 7:42 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-18 11:04 [Qemu-devel] [PATCH v3 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type Artem Pisarenko
2018-10-18 11:04 ` [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 11:04 ` [Qemu-devel] [PATCH v3 2/4] Introduce attributes to qemu timer subsystem Artem Pisarenko
2018-10-18 15:26 ` Stefan Hajnoczi
2018-10-18 11:04 ` [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 11:04 ` [Qemu-devel] [PATCH v3 4/4] Optimize record/replay checkpointing for all clocks it applies to Artem Pisarenko
2018-10-19 5:55 ` Pavel Dovgalyuk
2018-10-19 6:30 ` Artem Pisarenko
2018-10-19 6:48 ` Paolo Bonzini
2018-10-18 11:16 ` [Qemu-devel] [PATCH v3] " Artem Pisarenko
2018-10-18 12:17 ` Paolo Bonzini
2018-10-18 13:23 ` Artem Pisarenko
2018-10-18 14:31 ` Paolo Bonzini
2018-10-18 17:10 ` Artem Pisarenko
2018-10-18 17:25 ` Paolo Bonzini
2018-10-18 18:34 ` Artem Pisarenko
2018-10-18 12:00 ` [Qemu-devel] [PATCH v3 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type Artem Pisarenko
2018-10-18 12:06 ` Paolo Bonzini
2018-10-18 12:15 ` [Qemu-devel] [PATCH v3 4/4] Optimize record/replay checkpointing for all clocks it applies to Artem Pisarenko
2019-01-10 13:30 ` [Qemu-devel] [PATCH v3 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type Pavel Dovgalyuk
2019-01-11 10:25 ` Paolo Bonzini
2019-01-14 5:59 ` Pavel Dovgalyuk
2019-01-11 13:00 ` Artem Pisarenko
2019-01-16 6:16 ` Pavel Dovgalyuk
2019-01-16 8:35 ` Artem Pisarenko
2019-01-17 7:42 ` Pavel Dovgalyuk [this message]
2019-01-17 13:19 ` Artem Pisarenko
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='000601d4ae38$35431f60$9fc95e20$@ru' \
--to=dovgaluk@ispras.ru \
--cc=artem.k.pisarenko@gmail.com \
--cc=pavel.dovgaluk@ispras.ru \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).