qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 00/45] tcg: support for multiple TCG contexts
@ 2017-07-16 20:03 Emilio G. Cota
  2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 01/45] vl: fix breakage of -tb-size Emilio G. Cota
                   ` (44 more replies)
  0 siblings, 45 replies; 93+ messages in thread
From: Emilio G. Cota @ 2017-07-16 20:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: Richard Henderson

v1:
  https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg02059.html

Thanks all for your comments on v1.

This v2 patchset applies on top of stefanha's tracing tree (9212a18e371):
  https://github.com/stefanha/qemu/tree/tracing
That tree has some changes (per-vcpu TCG tracing) that would conflict
with many of the patches in this series. So I based the series on that
tree.

To ease review/testing, you can pull this series from:
  https://github.com/cota/qemu/tree/multi-tcg-v2

Note: patches 1 and 2 are already on master, but not yet on stefanha's tree.
So I'm leaving them here.

Note: I cannot even compile-test _WIN32 bits, help appreciated! See
patches 40-41.

Changes from v1:
- Added R-b tags
- Added comments to the commit logs about the atomic_set/read thing.
- Renamed have_tb_lock to acquired_tb_lock in tb_find
- Merged tb->invalid into tb->cflags
  - Cleaned up the checking of the tb->invalid field
- Consolidated TB lookups into a common tb_lookup__cpu_state function
  - Removed addr argument from lookup_tb_ptr
- Defined CF_PARALLEL, and used it for hashing. Incorporated Richard's
  feedback on the previous patch, including:
  - Removed use of parallel_cpus from target/*
  - Removed use of parallel_cpus from tcg/*
  - Moved down the exclusive region in cpu_exec_step_atomic
    - Brought cpu_exec_step into cpu_exec_step_atomic
- Defined and used DEBUG_*_GATE in translate-all
  - Introduced TB_PAGE_ADDR_FMT
- Defined struct tb_tc to bring together tb->tc_{ptr,search,size}
  - Used the struct for g_tree comparisons
  - The struct has now a 4-byte hole, but really given the added
    tb->trace_vcpu_dstate field (a u32) we probably can just live
    with it.
- renamed tb_free to tb_remove
- Use size_t everywhere when counting TB's and code size
- Moved tci_regs to tcg_qemu_tb_exec's stack
- Defined tcg_init_ctx and made tcg_ctx a pointer
- Switched to dynamic allocation of TCG optimizer globals
  - Folded them into TCGContext
- Introduced an array of *tcg_ctx's (instead of a list) to keep track
  of TCGContexts.
- Wrapped a macro with do..while(0) in the TCGProf patch to please checkpatch
- Moved qemu_real_host_page_size/mask to osdep
  - Introduced qemu_mprotect_rwx/none in osdep
    - Used these helpers instead of local inlines in translate-all.c
- TCG regions:
  - tcg_region_init takes a desired number of regions, not a desired
    region size.
      - TCG region sizes are a multiple of the host's page size
  - Add a guard page at the end of each region
    - Do not allocate a guard page when allocating code_gen_buffer
  - switched tcg_region_alloc to positive logic (return true on error)
  - Document non-trivial functions (N.B. some doc added in the region
    patch, but quite a bit more is added in the "multiple TCG context"
    patch)
  - Simplified initialization: child TCG threads just have to call
    tcg_register_thread(). All other initialization is done by the
    parent thread.
  - Changed the place at which we call tcg_region_init in softmmu,
    so that we can check whether mttcg is enabled when deciding
    how many regions to have.
    - Use 1 region when !mttcg.
- Dropped the "do not hold tb_lock" patch for now; the patchset is
  already too long, and to do a good job there takes more than just
  one patch. I have already started working on that though, based
  on the feedback from v1.

Thanks,

		Emilio

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

end of thread, other threads:[~2017-07-18 23:43 UTC | newest]

Thread overview: 93+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-16 20:03 [Qemu-devel] [PATCH v2 00/45] tcg: support for multiple TCG contexts Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 01/45] vl: fix breakage of -tb-size Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 02/45] translate-all: remove redundant !tcg_enabled check in dump_exec_info Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 03/45] cputlb: bring back tlb_flush_count under !TLB_DEBUG Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 04/45] tcg: fix corruption of code_time profiling counter upon tb_flush Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 05/45] exec-all: fix typos in TranslationBlock's documentation Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 06/45] translate-all: make have_tb_lock static Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 07/45] cpu-exec: rename have_tb_lock to acquired_tb_lock in tb_find Emilio G. Cota
2017-07-17 22:39   ` Richard Henderson
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 08/45] tcg/i386: constify tcg_target_callee_save_regs Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 09/45] tcg/mips: " Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 10/45] translate-all: guarantee that tb_hash only holds valid TBs Emilio G. Cota
2017-07-17 22:55   ` Richard Henderson
2017-07-18  0:27     ` Emilio G. Cota
2017-07-18  3:40       ` Richard Henderson
2017-07-18  4:54         ` Emilio G. Cota
2017-07-18  5:29           ` Richard Henderson
2017-07-18 23:30             ` Emilio G. Cota
2017-07-18 23:43               ` Richard Henderson
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 11/45] exec-all: bring tb->invalid into tb->cflags Emilio G. Cota
2017-07-17 23:07   ` Richard Henderson
2017-07-18  0:28     ` Emilio G. Cota
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 12/45] tcg: remove addr argument from lookup_tb_ptr Emilio G. Cota
2017-07-17 23:25   ` Richard Henderson
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 13/45] tcg: consolidate TB lookups in tb_lookup__cpu_state Emilio G. Cota
2017-07-17 23:41   ` Richard Henderson
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 14/45] tcg: define CF_PARALLEL and use it for TB hashing Emilio G. Cota
2017-07-17 23:46   ` Richard Henderson
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 15/45] target/arm: check CF_PARALLEL instead of parallel_cpus Emilio G. Cota
2017-07-17 23:46   ` Richard Henderson
2017-07-16 20:03 ` [Qemu-devel] [PATCH v2 16/45] target/hppa: " Emilio G. Cota
2017-07-17 23:47   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 17/45] target/i386: " Emilio G. Cota
2017-07-17 23:47   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 18/45] target/m68k: " Emilio G. Cota
2017-07-17 23:52   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 19/45] target/s390x: " Emilio G. Cota
2017-07-17 23:53   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 20/45] target/sparc: " Emilio G. Cota
2017-07-17 23:54   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 21/45] tcg: " Emilio G. Cota
2017-07-17 23:55   ` Richard Henderson
2017-07-18  0:34     ` Emilio G. Cota
2017-07-18  3:42       ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 22/45] cpu-exec: lookup/generate TB outside exclusive region during step_atomic Emilio G. Cota
2017-07-18  0:01   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 23/45] translate-all: define and use DEBUG_TB_FLUSH_GATE Emilio G. Cota
2017-07-18  0:01   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 24/45] exec-all: introduce TB_PAGE_ADDR_FMT Emilio G. Cota
2017-07-18  0:02   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 25/45] translate-all: define and use DEBUG_TB_INVALIDATE_GATE Emilio G. Cota
2017-07-18  0:02   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 26/45] translate-all: define and use DEBUG_TB_CHECK_GATE Emilio G. Cota
2017-07-18  0:03   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 27/45] exec-all: extract tb->tc_* into a separate struct tc_tb Emilio G. Cota
2017-07-18  0:04   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 28/45] translate-all: use a binary search tree to track TBs in TBContext Emilio G. Cota
2017-07-18  0:05   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 29/45] exec-all: rename tb_free to tb_remove Emilio G. Cota
2017-07-18  0:05   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 30/45] translate-all: report correct avg host TB size Emilio G. Cota
2017-07-18  0:06   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 31/45] tci: move tci_regs to tcg_qemu_tb_exec's stack Emilio G. Cota
2017-07-18  0:08   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 32/45] tcg: take tb_ctx out of TCGContext Emilio G. Cota
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 33/45] tcg: take .helpers " Emilio G. Cota
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 34/45] tcg: define tcg_init_ctx and make tcg_ctx a pointer Emilio G. Cota
2017-07-18  0:09   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 35/45] gen-icount: fold exitreq_label into TCGContext Emilio G. Cota
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 36/45] tcg: dynamically allocate optimizer globals + fold " Emilio G. Cota
2017-07-18  3:53   ` Richard Henderson
2017-07-18  4:33     ` Emilio G. Cota
2017-07-18  4:38       ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 37/45] tcg: introduce **tcg_ctxs to keep track of all TCGContext's Emilio G. Cota
2017-07-18  4:17   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 38/45] tcg: distribute profiling counters across TCGContext's Emilio G. Cota
2017-07-18  4:20   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 39/45] osdep: move qemu_real_host_page_size/mask to osdep Emilio G. Cota
2017-07-18  4:22   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 40/45] osdep: introduce qemu_mprotect_rwx/none Emilio G. Cota
2017-07-18  4:26   ` Richard Henderson
2017-07-18  4:57     ` Emilio G. Cota
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 41/45] translate-all: use qemu_protect_rwx/none helpers Emilio G. Cota
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 42/45] tcg: define TCG_HIGHWATER Emilio G. Cota
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 43/45] tcg: introduce regions to split code_gen_buffer Emilio G. Cota
2017-07-18  5:09   ` Richard Henderson
2017-07-18 17:44     ` Emilio G. Cota
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 44/45] translate-all: do not allocate a guard page for code_gen_buffer Emilio G. Cota
2017-07-18  4:35   ` Richard Henderson
2017-07-16 20:04 ` [Qemu-devel] [PATCH v2 45/45] tcg: enable multiple TCG contexts in softmmu Emilio G. Cota
2017-07-18  5:25   ` Richard Henderson
2017-07-18 17:52     ` Emilio G. Cota
2017-07-18 18:26       ` Richard Henderson

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