Re: [Qemu-devel] [RFC v2 10/11] tcg: drop global lock during TCG code execution

2016-05-25 Thread Paolo Bonzini
On 25/05/2016 13:07, Alex Bennée wrote: + * If called from generated code, iothread mutex must not be held. >>> >>> What does that mean? If iothread mutex is not required by the function >>> then why mention it here at all? >> >> If this function can take the iothread mutex itself, this woul

Re: [Qemu-devel] [RFC v2 10/11] tcg: drop global lock during TCG code execution

2016-05-25 Thread Alex Bennée
Paolo Bonzini writes: > On 24/05/2016 23:28, Sergey Fedorov wrote: >> On 05/04/16 18:32, Alex Bennée wrote: >>> diff --git a/cpu-exec.c b/cpu-exec.c >>> index bd50fef..f558508 100644 >>> --- a/cpu-exec.c >>> +++ b/cpu-exec.c >>> @@ -28,6 +28,7 @@ >>> #include "qemu/rcu.h" >>> #include "exec/tb

Re: [Qemu-devel] [RFC v2 10/11] tcg: drop global lock during TCG code execution

2016-05-25 Thread Paolo Bonzini
On 24/05/2016 23:28, Sergey Fedorov wrote: > On 05/04/16 18:32, Alex Bennée wrote: >> diff --git a/cpu-exec.c b/cpu-exec.c >> index bd50fef..f558508 100644 >> --- a/cpu-exec.c >> +++ b/cpu-exec.c >> @@ -28,6 +28,7 @@ >> #include "qemu/rcu.h" >> #include "exec/tb-hash.h" >> #include "exec/log.h

Re: [Qemu-devel] [RFC v2 10/11] tcg: drop global lock during TCG code execution

2016-05-24 Thread Sergey Fedorov
On 05/04/16 18:32, Alex Bennée wrote: > diff --git a/cpu-exec.c b/cpu-exec.c > index bd50fef..f558508 100644 > --- a/cpu-exec.c > +++ b/cpu-exec.c > @@ -28,6 +28,7 @@ > #include "qemu/rcu.h" > #include "exec/tb-hash.h" > #include "exec/log.h" > +#include "qemu/main-loop.h" > #if defined(TARGET_

[Qemu-devel] [RFC v2 10/11] tcg: drop global lock during TCG code execution

2016-04-05 Thread Alex Bennée
From: Jan Kiszka This finally allows TCG to benefit from the iothread introduction: Drop the global mutex while running pure TCG CPU code. Reacquire the lock when entering MMIO or PIO emulation, or when leaving the TCG loop. We have to revert a few optimization for the current TCG threading mode