All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Pisarenko <artem.k.pisarenko@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3] Optimize record/replay checkpointing for all clocks it applies to
Date: Fri, 19 Oct 2018 00:34:53 +0600	[thread overview]
Message-ID: <CANzW0mv6sTyinMw7fdZe4aKnKGzOgcJMXq-M1uCF9bTMCnkV_A@mail.gmail.com> (raw)
In-Reply-To: <f3fb302a-cc58-30b6-e59a-4f1ba9445054@redhat.com>

>чт, 18 окт. 2018 г., 23:25 Paolo Bonzini:
>On 18/10/2018 19:10, Artem Pisarenko wrote:
>>
>>> 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.
>
> Or you just get a unlock/lock pair for QEMU_CLOCK_REALTIME (which should
> really never happen if e.g. you have no UI).

And still have duplication (just smaller in this case).


>> Why do you want to split up such tightly coupled code?
>
> Because it's *too* coupled and not very readable.

Tightly coupled code in my understanding is property having its roots in
design, which usually has wider context than piece of code in question. So
we canot avoid this by definition (limiting changes only to this code).
Trying to improve it is just like a playing with bubble wrap - pressing
each bubble causes another bubble to pop up.

In our particular case it's because of overall rr design, qemu architecture
and a way how rr integrated in timers. The best we can do in this case is
to localise/quarantine ugly aspects as much as possible, carefully and
plenteously comment and try don't touch them... never... I consider
'timerlist_run_timers()' is already totally infected and we're just late to
save anyone of its residents (by isolating others).

  reply	other threads:[~2018-10-18 18:35 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 [this message]
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
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=CANzW0mv6sTyinMw7fdZe4aKnKGzOgcJMXq-M1uCF9bTMCnkV_A@mail.gmail.com \
    --to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.