From: Liu Ping Fan <qemulist@gmail.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Anthony Liguori <anthony@codemonkey.ws>
Subject: [Qemu-devel] [PATCH v1 3/6] mem: fold tcg listener's logic into core memory listener
Date: Wed, 29 May 2013 10:11:06 +0800 [thread overview]
Message-ID: <1369793469-30883-4-git-send-email-qemulist@gmail.com> (raw)
In-Reply-To: <1369793469-30883-1-git-send-email-qemulist@gmail.com>
From: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
We can do the tcg listener's logic in core memory listener. And this
will help us concentrate the rcu updater.
Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
---
exec.c | 19 +++++--------------
1 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/exec.c b/exec.c
index e5335f5..eb69a98 100644
--- a/exec.c
+++ b/exec.c
@@ -1761,6 +1761,7 @@ static void release_dispatch_map(AllocInfo *info)
*/
static void core_commit(MemoryListener *listener)
{
+ CPUArchState *env;
AllocInfo *info = cur_alloc_info;
info->map = cur_map_nodes;
info->sections = cur_phys_sections;
@@ -1772,20 +1773,15 @@ static void core_commit(MemoryListener *listener)
cur_phys_sections = next_phys_sections;
cur_alloc_info = next_alloc_info;
- /* Fix me, will changed to call_rcu */
- release_dispatch_map(info);
-}
-
-static void tcg_commit(MemoryListener *listener)
-{
- CPUArchState *env;
-
/* since each CPU stores ram addresses in its TLB cache, we must
reset the modified entries */
/* XXX: slow ! */
- for(env = first_cpu; env != NULL; env = env->next_cpu) {
+ for (env = first_cpu; env != NULL; env = env->next_cpu) {
tlb_flush(env, 1);
}
+
+ /* Fix me, will changed to call_rcu */
+ release_dispatch_map(info);
}
static void core_log_global_start(MemoryListener *listener)
@@ -1830,10 +1826,6 @@ static MemoryListener io_memory_listener = {
.priority = 0,
};
-static MemoryListener tcg_memory_listener = {
- .commit = tcg_commit,
-};
-
void address_space_init_dispatch(AddressSpace *as)
{
AddressSpaceDispatch *d = g_new(AddressSpaceDispatch, 1);
@@ -1870,7 +1862,6 @@ static void memory_map_init(void)
memory_listener_register(&core_memory_listener, &address_space_memory);
memory_listener_register(&io_memory_listener, &address_space_io);
- memory_listener_register(&tcg_memory_listener, &address_space_memory);
}
MemoryRegion *get_system_memory(void)
--
1.7.4.4
next prev parent reply other threads:[~2013-05-29 2:11 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 ` Liu Ping Fan [this message]
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
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=1369793469-30883-4-git-send-email-qemulist@gmail.com \
--to=qemulist@gmail.com \
--cc=anthony@codemonkey.ws \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).