qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: fred.konrad@greensocs.com
Cc: mttcg@listserver.greensocs.com, mark.burton@greensocs.com,
	qemu-devel@nongnu.org, a.rigo@virtualopensystems.com,
	guillaume.delbergue@greensocs.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [RFC PATCH V3 0/3] Multithread TCG async_safe_work part.
Date: Mon, 20 Jul 2015 17:20:25 +0100	[thread overview]
Message-ID: <87io9eu7g6.fsf@linaro.org> (raw)
In-Reply-To: <1437144337-21442-1-git-send-email-fred.konrad@greensocs.com>


fred.konrad@greensocs.com writes:

> 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).
>
> (Currently untested as I need to rebase MTTCG first.)

Wouldn't it make sense for this to be re-based onto the current rc
independent of MTTCG and then have those patches based ontop of this
series? (see other mail).

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

Not seeing this at the moment, can you re-push please?

>
> The first patch introduces a mutex to protect the existing queued_work_*
> CPUState members against multiple (concurent) access.
>
> The second patch introduces a tcg_exec_flag which will be 1 when we are inside
> cpu_exec(), -1 when we must not enter the cpu execution and 0 when we are
> allowed to do so. 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().
>
> Changes V2 -> V3:
>   * Check atomically we are not in the executiong loop to fix the race condition
>     which might happen.
> Changes V1 -> V2:
>   * Release the lock while running the callback for both async and safe work.
>
> KONRAD Frederic (3):
>   cpus: protect queued_work_* with work_mutex.
>   cpus: add tcg_exec_flag.
>   cpus: introduce async_run_safe_work_on_cpu.
>
>  cpu-exec.c        |  10 ++++
>  cpus.c            | 160 ++++++++++++++++++++++++++++++++++++++++--------------
>  include/qom/cpu.h |  57 +++++++++++++++++++
>  qom/cpu.c         |  20 +++++++
>  4 files changed, 207 insertions(+), 40 deletions(-)

-- 
Alex Bennée

  parent reply	other threads:[~2015-07-20 16:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17 14:45 [Qemu-devel] [RFC PATCH V3 0/3] Multithread TCG async_safe_work part fred.konrad
2015-07-17 14:45 ` [Qemu-devel] [RFC PATCH V3 1/3] cpus: protect queued_work_* with work_mutex fred.konrad
2015-07-20 16:22   ` Alex Bennée
2015-07-17 14:45 ` [Qemu-devel] [RFC PATCH V3 2/3] cpus: add tcg_exec_flag fred.konrad
2015-07-17 14:45 ` [Qemu-devel] [RFC PATCH V3 3/3] cpus: introduce async_run_safe_work_on_cpu fred.konrad
2015-07-20 16:20 ` Alex Bennée [this message]
2015-07-20 17:36 ` [Qemu-devel] [RFC PATCH V3 0/3] Multithread TCG async_safe_work part Alex Bennée
2015-07-20 17:46   ` Frederic Konrad

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=87io9eu7g6.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=a.rigo@virtualopensystems.com \
    --cc=fred.konrad@greensocs.com \
    --cc=guillaume.delbergue@greensocs.com \
    --cc=mark.burton@greensocs.com \
    --cc=mttcg@listserver.greensocs.com \
    --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).