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 13:04:46 +0200 [thread overview]
Message-ID: <4B56E34E.7010001@redhat.com> (raw)
In-Reply-To: <201001201757.02289.sheng@linux.intel.com>
On 01/20/2010 11:57 AM, Sheng Yang wrote:
>
>>> No protection for ring->first and ring->last? Seems it can writing the
>>> same element pointed by ring->first twice, then skip one element at
>>> (ring->first + 1)...
>>>
>> ring->first is owned by userspace, while ring->last is owned by the
>> kernel, so no protection is necessary except for the memory barrier.
>> Can you elaborate on how it would fail?
>>
>>
> This piece of code can only be executed on one thread/vcpu at same time? I
> think different vcpus accessing/modifying ring->first at the same time would
> cause problem.
>
Yes, it's protected by qemu_lock.
> But for a separate iothread which handle all userspace accessing, it should be
> fine.
>
coalesced mmio processing can happen as part of vcpu processing (due to
an mmio exit) or by the iothread (forced by the display refresh timer
for example), but still serialized by qemu_lock.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2010-01-20 11:04 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
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 [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=4B56E34E.7010001@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