qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org, "Eduardo Habkost" <eduardo@habkost.net>,
	"Alexandre Iooss" <erdnaxe@crans.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Mahmoud Mandour" <ma.mandourr@gmail.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v3 00/17] TCG Plugin inline operation enhancement
Date: Wed, 7 Feb 2024 22:21:25 +0400	[thread overview]
Message-ID: <a182d76c-21cc-4d59-ab7c-4af2bc8c0f5c@linaro.org> (raw)
In-Reply-To: <87h6ikl0ni.fsf@draig.linaro.org>

On 2/7/24 20:06, Alex Bennée wrote:
> Alex Bennée <alex.bennee@linaro.org> writes:
> 
>> Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:
>>
>>> This series adds a new thread-safe API to declare inline operation
>>> inside plugins. As well, it removes the existing non thread-safe API,
>>> and migrates all existing plugins to use it.
>>
>> I've cherry-picked 3 and 4 into plugins/next so I can re-base the
>> registers work. I'll have a look at the rest of the series once I'm back
>> at my desk.
> 
> Actually belay that, I'm caught in a circular dependency because this is
> based on the registers series. I'll sort it out tomorrow.
> 

You'll need 1 and 2 too, which allows to get number of cpus init, used 
in 4. You can as well submit this as part of register series if you 
prefer, so there won't be any conflict.

>>
>>>
>>> Tested on Linux (user, system) for i386, x86_64 and aarch64.
>>>
>>> To give some context, this a long term series of work around plugins,
>>> with the goal to be able to do basic operations in a more performant and
>>> accurate way. This will mean to add more inline operations and
>>> conditional callbacks.
>>>
>>> One final target of this work is to implement a plugin that implements
>>> the icount=auto feature, and allow QEMU to run at a given "frequency"
>>> based on number of instructions executed, without QEMU needing to keep
>>> track of this.
>>>
>>> Another final target is to be able to detect control flow changes in an
>>> efficient and elegant way, by combining inline operation and conditional
>>> callbacks.
>>>
>>> v2
>>> --
>>>
>>> Implement scoreboard API (cpu local storage), so plugins don't have to deal
>>> with how many cpus are used.
>>>
>>> Since plugins have been modified again, I didn't transfer any reviewed-by on
>>> those commits.
>>>
>>> v3
>>> --
>>>
>>> - introduce qemu_plugin_num_vcpus (how many cpus were initialized)
>>> - fix order of plugin init/idle/resume callbacks
>>> - scoreboard:
>>>    - renamed qemu_plugin_u64_t -> qemu_plugin_u64
>>>    - some functions rename for scoreboard api
>>>    - qemu_plugin_u64 has only value based function (vs address before)
>>> - various cleanup thanks to review of previous series
>>>
>>> Based-on: 20240122145610.413836-1-alex.bennee@linaro.org
>>>
>>>   Version number: 3
>>>   Branches:
>>>            base:  plugin_registers_v3_20240122145610.413836-1-alex.bennee@linaro.org
>>>            topic: plugin_inline_per_vcpu
>>>
>>>   To: qemu-devel@nongnu.org
>>>
>>>   Pierrick Bouvier (17):
>>>         plugins: remove previous n_vcpus functions from API
>>>         plugins: add qemu_plugin_num_vcpus function
>>>         plugins: fix order of init/idle/resume callback
>>>         cpu: call plugin init hook asynchronously
>>>         plugins: scoreboard API
>>>         docs/devel: plugins can trigger a tb flush
>>>         plugins: implement inline operation relative to cpu_index
>>>         plugins: add inline operation per vcpu
>>>         tests/plugin: add test plugin for inline operations
>>>         tests/plugin/mem: migrate to new per_vcpu API
>>>         tests/plugin/insn: migrate to new per_vcpu API
>>>         tests/plugin/bb: migrate to new per_vcpu API
>>>         contrib/plugins/hotblocks: migrate to new per_vcpu API
>>>         contrib/plugins/howvec: migrate to new per_vcpu API
>>>         plugins: remove non per_vcpu inline operation from API
>>>         plugins: cleanup codepath for previous inline operation
>>>         MAINTAINERS: Add myself as reviewer for TCG Plugins
>>>
>>>    MAINTAINERS                     |   1 +
>>>    docs/devel/multi-thread-tcg.rst |   1 +
>>>    include/qemu/plugin.h           |   6 ++
>>>    include/qemu/qemu-plugin.h      | 151 ++++++++++++++++++++++++--------
>>>    plugins/plugin.h                |  24 ++++--
>>>    accel/tcg/plugin-gen.c          |  65 +++++++++++---
>>>    contrib/plugins/cache.c         |   2 +-
>>>    contrib/plugins/hotblocks.c     |  50 ++++++-----
>>>    contrib/plugins/howvec.c        |  53 ++++++++----
>>>    hw/core/cpu-common.c            |   9 +-
>>>    plugins/api.c                   | 121 ++++++++++++++++----------
>>>    plugins/core.c                  | 104 +++++++++++++++++++---
>>>    tests/plugin/bb.c               |  63 ++++++--------
>>>    tests/plugin/inline.c           | 186 ++++++++++++++++++++++++++++++++++++++++
>>>    tests/plugin/insn.c             | 106 +++++++++++------------
>>>    tests/plugin/mem.c              |  40 +++++----
>>>    plugins/qemu-plugins.symbols    |  16 ++--
>>>    tests/plugin/meson.build        |   2 +-
>>>    18 files changed, 745 insertions(+), 255 deletions(-)
>>>
>>> Pierrick Bouvier (17):
>>>    plugins: remove previous n_vcpus functions from API
>>>    plugins: add qemu_plugin_num_vcpus function
>>>    plugins: fix order of init/idle/resume callback
>>>    cpu: call plugin init hook asynchronously
>>>    plugins: scoreboard API
>>>    docs/devel: plugins can trigger a tb flush
>>>    plugins: implement inline operation relative to cpu_index
>>>    plugins: add inline operation per vcpu
>>>    tests/plugin: add test plugin for inline operations
>>>    tests/plugin/mem: migrate to new per_vcpu API
>>>    tests/plugin/insn: migrate to new per_vcpu API
>>>    tests/plugin/bb: migrate to new per_vcpu API
>>>    contrib/plugins/hotblocks: migrate to new per_vcpu API
>>>    contrib/plugins/howvec: migrate to new per_vcpu API
>>>    plugins: remove non per_vcpu inline operation from API
>>>    plugins: cleanup codepath for previous inline operation
>>>    MAINTAINERS: Add myself as reviewer for TCG Plugins
>>>
>>>   MAINTAINERS                     |   1 +
>>>   docs/devel/multi-thread-tcg.rst |   1 +
>>>   include/qemu/plugin.h           |   6 ++
>>>   include/qemu/qemu-plugin.h      | 151 ++++++++++++++++++++------
>>>   plugins/plugin.h                |  24 +++--
>>>   accel/tcg/plugin-gen.c          |  65 +++++++++--
>>>   contrib/plugins/cache.c         |   2 +-
>>>   contrib/plugins/hotblocks.c     |  50 +++++----
>>>   contrib/plugins/howvec.c        |  53 ++++++---
>>>   hw/core/cpu-common.c            |   9 +-
>>>   plugins/api.c                   | 121 +++++++++++++--------
>>>   plugins/core.c                  | 104 ++++++++++++++++--
>>>   tests/plugin/bb.c               |  63 +++++------
>>>   tests/plugin/inline.c           | 186 ++++++++++++++++++++++++++++++++
>>>   tests/plugin/insn.c             | 106 +++++++++---------
>>>   tests/plugin/mem.c              |  40 ++++---
>>>   plugins/qemu-plugins.symbols    |  16 ++-
>>>   tests/plugin/meson.build        |   2 +-
>>>   18 files changed, 745 insertions(+), 255 deletions(-)
>>>   create mode 100644 tests/plugin/inline.c
> 

      reply	other threads:[~2024-02-07 18:23 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06  9:24 [PATCH v3 00/17] TCG Plugin inline operation enhancement Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 01/17] plugins: remove previous n_vcpus functions from API Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 02/17] plugins: add qemu_plugin_num_vcpus function Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 03/17] plugins: fix order of init/idle/resume callback Pierrick Bouvier
2024-02-07  2:59   ` Richard Henderson
2024-02-06  9:24 ` [PATCH v3 04/17] cpu: call plugin init hook asynchronously Pierrick Bouvier
2024-02-07  3:00   ` Richard Henderson
2024-02-06  9:24 ` [PATCH v3 05/17] plugins: scoreboard API Pierrick Bouvier
2024-02-07  3:21   ` Richard Henderson
2024-02-07  5:59     ` Pierrick Bouvier
2024-02-11  0:41       ` Richard Henderson
2024-02-11 14:26         ` Pierrick Bouvier
2024-02-11 19:13           ` Richard Henderson
2024-02-12  6:24             ` Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 06/17] docs/devel: plugins can trigger a tb flush Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 07/17] plugins: implement inline operation relative to cpu_index Pierrick Bouvier
2024-02-07  3:42   ` Richard Henderson
2024-02-07  6:01     ` Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 08/17] plugins: add inline operation per vcpu Pierrick Bouvier
2024-02-07  3:45   ` Richard Henderson
2024-02-07  6:05     ` Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 09/17] tests/plugin: add test plugin for inline operations Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 10/17] tests/plugin/mem: migrate to new per_vcpu API Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 11/17] tests/plugin/insn: " Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 12/17] tests/plugin/bb: " Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 13/17] contrib/plugins/hotblocks: " Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 14/17] contrib/plugins/howvec: " Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 15/17] plugins: remove non per_vcpu inline operation from API Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 16/17] plugins: cleanup codepath for previous inline operation Pierrick Bouvier
2024-02-06  9:24 ` [PATCH v3 17/17] MAINTAINERS: Add myself as reviewer for TCG Plugins Pierrick Bouvier
2024-02-07 15:45 ` [PATCH v3 00/17] TCG Plugin inline operation enhancement Alex Bennée
2024-02-07 16:06   ` Alex Bennée
2024-02-07 18:21     ` Pierrick Bouvier [this message]

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=a182d76c-21cc-4d59-ab7c-4af2bc8c0f5c@linaro.org \
    --to=pierrick.bouvier@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=eduardo@habkost.net \
    --cc=erdnaxe@crans.org \
    --cc=ma.mandourr@gmail.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=wangyanan55@huawei.com \
    /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).