[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 05/50] docs/devel: add plugins.rst design doc
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH v3 05/50] docs/devel: add plugins.rst design document |
Date: |
Thu, 20 Jun 2019 14:38:28 +0100 |
User-agent: |
mu4e 1.3.2; emacs 26.1 |
Pranith Kumar <address@hidden> writes:
<snip>
>> +
>> +Plugin Life cycle
>> +=================
>> +
>> +First the plugin is loaded and the public qemu_plugin_install function
>> +is called. The plugin with then register callbacks for various plugin
>
> s/with/will/
>
>> +events. Generally at least the atexit_cb is registered so the plugin
>> +can dump its information at the end of a run.
>
> Is that a hard requirement?
Not really although for a lot of plugins it is a natural point to dump
the results of the experiment.
<snip>
>> +
>> +As a result registering/unregistering callbacks is "slow", since it
>> +takes a lock. But this is very infrequent; we want performance when
>> +calling (or not calling) callbacks, not when registering them. Using
>> +RCU is great for this.
>> +
>> +We support the uninstallation of a plugin at any time (e.g. from plugin
>> +callbacks). This means some callbacks might still be called after the
>> uninstall
>> +function returns. The plugin isn't completely uninstalled until the
>> +safe work has executed while all vCPUs are quiescent.
>
> Isn't this when the atexit callback is invoked? Might add that to make
> it clearer.
No we can uninstall at any time, I've amended to:
We support the uninstallation of a plugin at any time (e.g. from
plugin callbacks). This allows plugins to remove themselves if they no
longer want to instrument the code. This operation is asynchronous
which means callbacks may still occur after the uninstall operation is
requested. The plugin isn't completely uninstalled until the safe work
has executed while all vCPUs are quiescent.
--
Alex Bennée
- Re: [Qemu-devel] [PATCH v3 01/50] trace: expand mem_info:size_shift to 3 bits, (continued)
[Qemu-devel] [PATCH v3 04/50] translate-all: use cpu_in_exclusive_work_context() in tb_flush, Alex Bennée, 2019/06/14
[Qemu-devel] [PATCH v3 06/50] configure: add --enable-plugins (MOVE TO END), Alex Bennée, 2019/06/14
[Qemu-devel] [PATCH v3 03/50] cpu: introduce cpu_in_exclusive_work_context(), Alex Bennée, 2019/06/14
[Qemu-devel] [PATCH v3 05/50] docs/devel: add plugins.rst design document, Alex Bennée, 2019/06/14
[Qemu-devel] [PATCH v3 12/50] cputlb: introduce get_page_addr_code_hostp, Alex Bennée, 2019/06/14
[Qemu-devel] [PATCH v3 14/50] tcg: add tcg_gen_st_ptr, Alex Bennée, 2019/06/14
[Qemu-devel] [PATCH v3 10/50] queue: add QTAILQ_REMOVE_SEVERAL, Alex Bennée, 2019/06/14
[Qemu-devel] [PATCH v3 07/50] plugin: add user-facing API, Alex Bennée, 2019/06/14
[Qemu-devel] [PATCH v3 09/50] plugin: add implementation of the api, Alex Bennée, 2019/06/14
[Qemu-devel] [PATCH v3 08/50] plugin: add core code, Alex Bennée, 2019/06/14