From: Paolo Bonzini <pbonzini@redhat.com>
To: Pavel Dovgalyuk <pavel.dovgaluk@gmail.com>, qemu-devel@nongnu.org
Cc: dovgaluk@ispras.ru, pavel.dovgaluk@ispras.ru, rth@twiddle.net
Subject: Re: [PATCH] replay: check other timers for icount limit
Date: Fri, 20 Dec 2019 14:14:17 +0100 [thread overview]
Message-ID: <ea2791a7-c280-3798-d246-a7bda57377fe@redhat.com> (raw)
In-Reply-To: <157675958855.14346.18049977447896411847.stgit@pasha-Precision-3630-Tower>
On 19/12/19 13:46, Pavel Dovgalyuk wrote:
> Record/replay can stall when there are no virtual devices that generate
> events - it just uses all the time for vCPU thread. Therefore main loop
> has to wait too much for the vCPU thread, because they are synchronized
> in rr mode.
> This patch does not let creating too long vCPU executions without
> interrupting to main loop. It checks realtime timers that always exits
> to control user input.
>
> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
> ---
> cpus.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/cpus.c b/cpus.c
> index 63bda152f5..7dba4fa414 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -1388,6 +1388,10 @@ static int64_t tcg_get_icount_limit(void)
> */
> deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL,
> QEMU_TIMER_ATTR_ALL);
> + /* Check realtime timers, because they help with input processing */
> + deadline = qemu_soonest_timeout(deadline,
> + qemu_clock_deadline_ns_all(QEMU_CLOCK_REALTIME,
> + QEMU_TIMER_ATTR_ALL));
>
> /* Maintain prior (possibly buggy) behaviour where if no deadline
> * was set (as there is no QEMU_CLOCK_VIRTUAL timer) or it is more than
>
Queued, thanks.
Paolo
prev parent reply other threads:[~2019-12-20 13:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-19 12:46 [PATCH] replay: check other timers for icount limit Pavel Dovgalyuk
2019-12-20 13:14 ` Paolo Bonzini [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=ea2791a7-c280-3798-d246-a7bda57377fe@redhat.com \
--to=pbonzini@redhat.com \
--cc=dovgaluk@ispras.ru \
--cc=pavel.dovgaluk@gmail.com \
--cc=pavel.dovgaluk@ispras.ru \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).