qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Pavel Dovgalyuk" <dovgaluk@ispras.ru>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, peter.maydell@linaro.org,
	stefanha@redhat.com, famz@redhat.com, kwolf@redhat.com
Subject: [Qemu-devel] Bottom halves VS timers
Date: Tue, 22 Jan 2019 10:15:03 +0300	[thread overview]
Message-ID: <000601d4b222$323d0900$96b71b00$@ru> (raw)

Hi!

 

I recently debugged record/replay for some platform which uses PIO access for IDE.

Handlers for these operations are called through BHs.

Scheduling new BH does not create a signal for the vCPU to suspend the execution and

process the main loop events (in record/replay we synchronize these two threads).

Therefore vCPU may execute 10000000 instruction until BH processing and the guest

software may get a timeout.

 

I thought about replacing BH to the timers with period=0. This solution has the following
properties:

1.       Avoid code duplication (BH and timers do virtually the same operations)

2.       Timers affect the vCPU - adding new virtual timer suspends the execution to process the
callback

3.       Timers are deterministic in record/replay mode (virtual ones of course). We have similar
deterministic concept for BHs, but selecting between virtual and realtime should be more familiar
for other developers.

4.       Timers require a little bit more code, but this could be solved with better interfaces

 

What do you think about this?

Did I miss anything?

 

Pavel Dovgalyuk

 

             reply	other threads:[~2019-01-22  7:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22  7:15 Pavel Dovgalyuk [this message]
2019-01-22  8:49 ` [Qemu-devel] Bottom halves VS timers Paolo Bonzini
2019-01-22 11:31   ` Pavel Dovgalyuk

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='000601d4b222$323d0900$96b71b00$@ru' \
    --to=dovgaluk@ispras.ru \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).