From: Avi Kivity <avi@redhat.com>
To: Sheng Yang <sheng@linux.intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: Ensure the exit frequency to QEmu for coalesced MMIO
Date: Wed, 20 Jan 2010 11:11:51 +0200 [thread overview]
Message-ID: <4B56C8D7.1010202@redhat.com> (raw)
In-Reply-To: <1263976559-15480-1-git-send-email-sheng@linux.intel.com>
On 01/20/2010 10:35 AM, Sheng Yang wrote:
> The default action of calesced MMIO is, cache the writing in buffer, until:
> 1. The buffer is full.
> 2. Or the exit to QEmu due to other reasons.
>
> But this would result in a very late writing in some condition.
> 1. The each time write to MMIO content is small.
> 2. The writing interval is big.
> 3. No need for input or accessing other devices frequently.
>
> This issue was observed in a experimental embbed system. The test image simply
> print "test" every 1 seconds. The output in QEmu meets expectation, but the
> output in KVM is delayed for seconds.
>
> To solve this issue, a timeout is added, to ensure userspace exit freqency is
> high enough(mostly target for video now) to write the buffered MMIO data.
> Current the maximum exit interval is 1/25s(so 25 times exit to userspace per
> second at least, pretty low compared to normal environment), and reused
> KVM_EXIT_IRQ_WINDOW_OPEN as exit reason, for it would doing nothing at all in
> userspace handler.
>
This can be done from userspace, by scheduling a SIGALRM in the desired
frequency. This way, userspace has control over the update frequency
(for example, if the SDL window is minimized or VNC is disconnected, we
don't need to poll).
I think we can even do this from the I/O thread, without stopping a
vcpu, since the colaesced mmio page is not tied to a vcpu but is a vm
property.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-01-20 9:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 8:35 [PATCH] KVM: Ensure the exit frequency to QEmu for coalesced MMIO Sheng Yang
2010-01-20 8:38 ` Sheng Yang
2010-01-20 9:11 ` Avi Kivity [this message]
2010-01-20 9:34 ` Sheng Yang
2010-01-20 9:47 ` Avi Kivity
2010-01-20 9:57 ` Sheng Yang
2010-01-20 11:04 ` Avi Kivity
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=4B56C8D7.1010202@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=sheng@linux.intel.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