From: Paolo Bonzini <pbonzini@redhat.com>
To: liu ping fan <qemulist@gmail.com>
Cc: qemu-devel@nongnu.org, Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH v1 6/6] mem: change tcg code to rcu style
Date: Wed, 29 May 2013 11:03:02 +0200 [thread overview]
Message-ID: <51A5C446.8090305@redhat.com> (raw)
In-Reply-To: <CAJnKYQkzwwR61DM31PcuUH5WqRrW4HY8FfwcBseY7LKRaOFsiQ@mail.gmail.com>
Il 29/05/2013 11:00, liu ping fan ha scritto:
>> Remember that this code is running under the BQL, so there is no need to
>> protect the TLB flushes otherwise. There is also no need to do anything
>
> Do you mean that cpu_exec() can not be out of BQL like kvm path? If
> it is true, then there is no changes needed for tcg code, right?
Indeed. When/if a fine-grained lock is introduced, it will protect TLB
accesses vs. TLB flushes. For now, the BQL will do.
Making TCG multi-threaded is a wholly different problem, and a superset
of what's needed for KVM.
(Xen instead is almost the same, only the mapcache has to be protected
by its own mutex).
>> as long as you ref the regions that are entered in the map, and unref
>> them when you destroy the map. Those refs will protect TCG's TLB too.
>>
> Worry about whether the TLB is the right index in the right
> phys_sections, if the mem topology changes between tlb_set_page() and
> instruction emulated.
That's not possible because of BQL protection.
>> In the end, all of TCG's execution consists of a large RCU critical section.
>
> Even stronger? If it runs with BQL protection.
Yes.
Paolo
prev parent reply other threads:[~2013-05-29 9:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-29 2:11 [Qemu-devel] [PATCH v1 0/6] make memory listener prepared for rcu style Liu Ping Fan
2013-05-29 2:11 ` [Qemu-devel] [PATCH v1 1/6] mem: change variable to macro Liu Ping Fan
2013-05-29 9:06 ` Paolo Bonzini
2013-05-29 2:11 ` [Qemu-devel] [PATCH v1 2/6] mem: make global dispatch table ready for rcu Liu Ping Fan
2013-05-29 7:07 ` Paolo Bonzini
2013-05-29 2:11 ` [Qemu-devel] [PATCH v1 3/6] mem: fold tcg listener's logic into core memory listener Liu Ping Fan
2013-05-29 2:11 ` [Qemu-devel] [PATCH v1 4/6] mem: concenter the root of each AddressSpaceDispatch Liu Ping Fan
2013-05-29 7:03 ` Paolo Bonzini
2013-05-29 7:48 ` liu ping fan
2013-05-29 8:31 ` Paolo Bonzini
2013-05-29 9:24 ` liu ping fan
2013-05-29 11:30 ` Paolo Bonzini
2013-05-29 2:11 ` [Qemu-devel] [PATCH v1 5/6] mem: make dispatch path satify rcu style Liu Ping Fan
2013-05-29 7:06 ` Paolo Bonzini
2013-05-29 7:15 ` Paolo Bonzini
2013-05-29 2:11 ` [Qemu-devel] [PATCH v1 6/6] mem: change tcg code to " Liu Ping Fan
2013-05-29 7:22 ` Paolo Bonzini
2013-05-29 9:00 ` liu ping fan
2013-05-29 9:03 ` 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=51A5C446.8090305@redhat.com \
--to=pbonzini@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
--cc=qemulist@gmail.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).