qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 0/3] Multithread TCG async_safe_work part.
@ 2015-07-10 15:19 fred.konrad
  2015-07-10 15:19 ` [Qemu-devel] [RFC PATCH 1/3] cpus: protect queued_work_* with work_mutex fred.konrad
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: fred.konrad @ 2015-07-10 15:19 UTC (permalink / raw)
  To: qemu-devel, mttcg
  Cc: mark.burton, a.rigo, guillaume.delbergue, pbonzini, alex.bennee,
	fred.konrad

From: KONRAD Frederic <fred.konrad@greensocs.com>

This is the async_safe_work introduction bit of the Multithread TCG work.
Rebased on current upstream (6169b60285fe1ff730d840a49527e721bfb30899).

It can be cloned here:
http://git.greensocs.com/fkonrad/mttcg.git branch async_work

The first patch introduces a mutex to protect the existing queued_work_*
CPUState members against multiple (concurent) access.

The second patch introduces a tcg_executing_flag which will be 1 when we are
inside cpu_exec(). This is required as safe work need to be sure that's all vCPU
are outside cpu_exec().

The last patch introduces async_safe_work. It allows to add some work which will
be done asynchronously but only when all vCPUs are outside cpu_exec(). The tcg
thread will wait that no vCPUs have any pending safe work before reentering
cpu-exec().

KONRAD Frederic (3):
  cpus: protect queued_work_* with work_mutex.
  cpus: add a tcg_executing flag.
  cpus: introduce async_run_safe_work_on_cpu.

 cpu-exec.c        |   7 +++
 cpus.c            | 160 ++++++++++++++++++++++++++++++++++++++++--------------
 include/qom/cpu.h |  28 ++++++++++
 qom/cpu.c         |   2 +
 4 files changed, 157 insertions(+), 40 deletions(-)

-- 
1.9.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-07-10 15:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-10 15:19 [Qemu-devel] [RFC PATCH 0/3] Multithread TCG async_safe_work part fred.konrad
2015-07-10 15:19 ` [Qemu-devel] [RFC PATCH 1/3] cpus: protect queued_work_* with work_mutex fred.konrad
2015-07-10 15:22   ` Paolo Bonzini
2015-07-10 15:32     ` Frederic Konrad
2015-07-10 15:34       ` Paolo Bonzini
2015-07-10 15:43         ` Frederic Konrad
2015-07-10 15:19 ` [Qemu-devel] [RFC PATCH 2/3] cpus: add a tcg_executing flag fred.konrad
2015-07-10 15:19 ` [Qemu-devel] [RFC PATCH 3/3] cpus: introduce async_run_safe_work_on_cpu fred.konrad
2015-07-10 15:23   ` Paolo Bonzini

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).