qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC v1 0/2] tcg-cpus: split into 3 tcg variants
@ 2020-10-14  7:36 Claudio Fontana
  2020-10-14  7:36 ` [RFC v1 1/2] accel/tcg: split CpusAccel into three TCG variants Claudio Fontana
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Claudio Fontana @ 2020-10-14  7:36 UTC (permalink / raw)
  To: Richard Henderson, Alex Bennée; +Cc: Claudio Fontana, qemu-devel

The purpose of this series is to split the tcg-cpus into
3 variants:

tcg_cpus_mttcg    (multithreaded tcg vcpus)
tcg_cpus_rr       (single threaded round robin vcpus)
tcg_cpus_icount   (same as RR, but using icount)

Alex, I read the comment in tcg_start_vcpu_thread saying:

    /*
     * Initialize TCG regions--once. Now is a good time, because:
     * (1) TCG's init context, prologue and target globals have been set up.
     * (2) qemu_tcg_mttcg_enabled() works now (TCG init code runs before the
     *     -accel flag is processed, so the check doesn't work then).
     */

Is this actually current?

I tried to refactor this (see patch 2), and it seems to work to do
the init of regions in tcg_init, and it seems that mttcg_enabled is known
already at that point..

Ciao,

Claudio

Claudio Fontana (2):
  accel/tcg: split CpusAccel into three TCG variants
  accel/tcg: split tcg_start_vcpu_thread

 accel/tcg/meson.build       |   9 +-
 accel/tcg/tcg-all.c         |  13 +-
 accel/tcg/tcg-cpus-icount.c | 145 +++++++++++
 accel/tcg/tcg-cpus-icount.h |  20 ++
 accel/tcg/tcg-cpus-mttcg.c  | 142 ++++++++++
 accel/tcg/tcg-cpus-mttcg.h  |  25 ++
 accel/tcg/tcg-cpus-rr.c     | 305 ++++++++++++++++++++++
 accel/tcg/tcg-cpus-rr.h     |  26 ++
 accel/tcg/tcg-cpus.c        | 500 +-----------------------------------
 accel/tcg/tcg-cpus.h        |   9 +-
 softmmu/icount.c            |   2 +-
 11 files changed, 697 insertions(+), 499 deletions(-)
 create mode 100644 accel/tcg/tcg-cpus-icount.c
 create mode 100644 accel/tcg/tcg-cpus-icount.h
 create mode 100644 accel/tcg/tcg-cpus-mttcg.c
 create mode 100644 accel/tcg/tcg-cpus-mttcg.h
 create mode 100644 accel/tcg/tcg-cpus-rr.c
 create mode 100644 accel/tcg/tcg-cpus-rr.h

-- 
2.26.2



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

end of thread, other threads:[~2020-10-14 11:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-14  7:36 [RFC v1 0/2] tcg-cpus: split into 3 tcg variants Claudio Fontana
2020-10-14  7:36 ` [RFC v1 1/2] accel/tcg: split CpusAccel into three TCG variants Claudio Fontana
2020-10-14  7:58   ` Philippe Mathieu-Daudé
2020-10-14  7:36 ` [RFC v1 2/2] accel/tcg: split tcg_start_vcpu_thread Claudio Fontana
2020-10-14  8:00 ` [RFC v1 0/2] tcg-cpus: split into 3 tcg variants Philippe Mathieu-Daudé
2020-10-14 10:14 ` Alex Bennée
2020-10-14 10:21   ` Claudio Fontana
2020-10-14 11:21   ` Philippe Mathieu-Daudé

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