[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v8 09/37] linux-user: enable parallel code generatio
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v8 09/37] linux-user: enable parallel code generation on clone |
Date: |
Mon, 24 Oct 2016 10:39:20 -0700 |
From: Alex Bennée <address@hidden>
The variable parallel_cpus controls the generation of thread aware
atomic code. We only need to set it once we clone our first thread.
At this point any existing translations need to be thrown away.
Reviewed-by: Emilio G. Cota <address@hidden>
Signed-off-by: Alex Bennée <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
linux-user/syscall.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index db697c0..7b77503 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6164,6 +6164,14 @@ static int do_fork(CPUArchState *env, unsigned int
flags, abi_ulong newsp,
sigfillset(&sigmask);
sigprocmask(SIG_BLOCK, &sigmask, &info.sigmask);
+ /* If this is our first additional thread, we need to ensure we
+ * generate code for parallel execution and flush old translations.
+ */
+ if (!parallel_cpus) {
+ parallel_cpus = true;
+ tb_flush(cpu);
+ }
+
ret = pthread_create(&info.thread, &attr, clone_func, &info);
/* TODO: Free new CPU state if thread creation failed. */
--
2.7.4
- [Qemu-devel] [PATCH v8 00/37] cmpxchg atomic operations, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 02/37] atomics: add atomic_xor, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 03/37] atomics: add atomic_op_fetch variants, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 01/37] atomics: Add parameters to macros, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 05/37] exec: Avoid direct references to Int128 parts, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 07/37] int128: Add int128_make128, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 04/37] atomics: Add __nocheck atomic operations, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 06/37] int128: Use __int128 if available, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 09/37] linux-user: enable parallel code generation on clone,
Richard Henderson <=
- [Qemu-devel] [PATCH v8 11/37] cputlb: Move probe_write out of softmmu_template.h, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 10/37] cputlb: Replace SHIFT with DATA_SIZE, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 14/37] cputlb: Tidy some macros, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 19/37] target-i386: emulate LOCK'ed cmpxchg using cmpxchg helpers, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 18/37] tcg: Emit barriers with parallel_cpus, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 13/37] cputlb: Move most of iotlb code out of line, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 16/37] tcg: Add atomic128 helpers, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 20/37] target-i386: emulate LOCK'ed OP instructions using atomic helpers, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 12/37] cputlb: Remove includes from softmmu_template.h, Richard Henderson, 2016/10/24
- [Qemu-devel] [PATCH v8 17/37] tcg: Add CONFIG_ATOMIC64, Richard Henderson, 2016/10/24