From: Stefan Hajnoczi <stefanha@gmail.com>
To: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
Cc: ohmura.kei@lab.ntt.co.jp, mtosatti@redhat.com,
stefanha@linux.vnet.ibm.com, kvm@vger.kernel.org,
dlaor@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org,
Blue Swirl <blauwirbel@gmail.com>,
avi@redhat.com, vatsa@linux.vnet.ibm.com,
psuriset@linux.vnet.ibm.com, ananth@in.ibm.com
Subject: Re: [Qemu-devel] [PATCH 00/21] Kemari for KVM 0.2
Date: Mon, 29 Nov 2010 10:17:17 +0000 [thread overview]
Message-ID: <AANLkTi=rH1L8AE8de2GE+sKBa0kadVe51dxhtKFWbC6M@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimAJb1pC4NBaQ7t6N0Nn0w3P-KQ-Xy_LyrJaAUj@mail.gmail.com>
On Sat, Nov 27, 2010 at 1:11 PM, Yoshiaki Tamura
<tamura.yoshiaki@lab.ntt.co.jp> wrote:
> 2010/11/27 Stefan Hajnoczi <stefanha@gmail.com>:
>> On Sat, Nov 27, 2010 at 8:53 AM, Yoshiaki Tamura
>> <tamura.yoshiaki@lab.ntt.co.jp> wrote:
>>> 2010/11/27 Stefan Hajnoczi <stefanha@gmail.com>:
>>>> On Sat, Nov 27, 2010 at 4:29 AM, Yoshiaki Tamura
>>>> <tamura.yoshiaki@lab.ntt.co.jp> wrote:
>>>>> 2010/11/27 Blue Swirl <blauwirbel@gmail.com>:
>>>>>> On Thu, Nov 25, 2010 at 6:06 AM, Yoshiaki Tamura
>>>>>> <tamura.yoshiaki@lab.ntt.co.jp> wrote:
>>>>>> Somehow I find some similarities to instrumentation patches. Perhaps
>>>>>> the instrumentation framework could be used (maybe with some changes)
>>>>>> for Kemari as well? That could be beneficial to both.
>>>>>
>>>>> Yes. I had the same idea but I'm not sure how tracing works. I think
>>>>> Stefan Hajnoczi knows it better.
>>>>>
>>>>> Stefan, is it possible to call arbitrary functions from the trace
>>>>> points?
>>>>
>>>> Yes, if you add code to ./tracetool. I'm not sure I see the
>>>> connection between Kemari and tracing though.
>>>
>>> The connection is that it may be possible to remove Kemari
>>> specific hook point like in ioport.c and exec.c, and let tracing
>>> notify Kemari instead.
>>
>> I actually think the other way. Tracing just instruments and stashes
>> away values. It does not change inputs or outputs, it does not change
>> control flow, it does not affect state.
>>
>> Going down the route of side-effects mixes two different things:
>> hooking into a subsystem and instrumentation. For hooking into a
>> subsystem we should define proper interfaces. That interface can
>> explicitly support modifying inputs/outputs or changing control flow.
>>
>> Tracing is much more ad-hoc and not a clean interface. It's also
>> based on a layer of indirection via the tracetool code generator.
>> That's okay because it doesn't affect the code it is called from and
>> you don't need to debug trace events (they are simple and have almost
>> no behavior).
>>
>> Hooking via tracing is just taking advantage of the cheap layer of
>> indirection in order to get at interesting events in a subsystem.
>> It's easy to hook up and quick to develop, but it's not a proper
>> interface and will be hard to understand for other developers.
>>
>>>> One question I have about Kemari is whether it adds new constraints to
>>>> the QEMU codebase? Fault tolerance seems like a cross-cutting concern
>>>> - everyone writing device emulation or core QEMU code may need to be
>>>> aware of new constraints. For example, "you are not allowed to
>>>> release I/O operations to the outside world directly, instead you need
>>>> to go through Kemari code which makes I/O transactional and
>>>> communicates with the passive host". You have converted e1000,
>>>> virtio-net, and virtio-blk. How do we make sure new devices that are
>>>> merged into qemu.git don't break Kemari? How do we go about
>>>> supporting the existing hw/* devices?
>>>
>>> Whether Kemari adds constraints such as you mentioned, yes. If
>>> the devices (including existing ones) don't call Kemari code,
>>> they would certainly break Kemari. Altough using proxies looks
>>> explicit, to make it unaware from people writing device
>>> emulation, it's possible to remove proxies and put changes only
>>> into the block/net layer as Blue suggested.
>>
>> Anything that makes it hard to violate the constraints is good.
>> Otherwise Kemari might get broken in the future and no one will know
>> until a failover behaves incorrectly.
>
> Blue and Paul prefer to put it into block/net layer, and you
> think it's better to provide API.
Sorry, I wasn't clear. I agree that event tap behavior should be in
generic block and net layer code. That way we're guaranteeing that
all net and block I/O goes through event tap.
>> Could you formulate the constraints so developers are aware of them in
>> the future and can protect the codebase. How about expanding the
>> Kemari wiki pages?
>
> If you like the idea above, I'm happy to make the list also on
> the wiki page.
Here's a different question: what requirements must an emulated device
meet in order to be added to the Kemari supported whitelist? That's
what I want to know so that I don't break existing devices and can add
new devices that work with Kemari :).
Stefan
next prev parent reply other threads:[~2010-11-29 10:17 UTC|newest]
Thread overview: 112+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-25 6:06 [Qemu-devel] [PATCH 00/21] Kemari for KVM 0.2 Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 01/21] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer() Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 02/21] Introduce read() to FdMigrationState Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 03/21] Introduce skip_header parameter to qemu_loadvm_state() Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 04/21] qemu-char: export socket_set_nodelay() Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 05/21] virtio: modify save/load handler to handle inuse varialble Yoshiaki Tamura
2010-11-28 9:28 ` [Qemu-devel] " Michael S. Tsirkin
2010-11-28 11:27 ` Yoshiaki Tamura
2010-11-28 11:46 ` Michael S. Tsirkin
2010-12-01 8:03 ` Yoshiaki Tamura
2010-12-02 12:02 ` Michael S. Tsirkin
2010-12-03 6:28 ` Yoshiaki Tamura
2010-12-16 7:36 ` Yoshiaki Tamura
2010-12-16 9:51 ` Michael S. Tsirkin
2010-12-16 14:28 ` Yoshiaki Tamura
2010-12-16 14:40 ` Michael S. Tsirkin
2010-12-16 15:59 ` Yoshiaki Tamura
2010-12-17 16:22 ` Yoshiaki Tamura
2010-12-24 9:27 ` Michael S. Tsirkin
2010-12-24 11:42 ` Yoshiaki Tamura
2010-12-24 13:21 ` Michael S. Tsirkin
2010-12-26 9:05 ` Michael S. Tsirkin
2010-12-26 10:14 ` Yoshiaki Tamura
2010-12-26 10:46 ` Michael S. Tsirkin
2010-12-26 10:50 ` Yoshiaki Tamura
2010-12-26 10:49 ` Michael S. Tsirkin
2010-12-26 10:57 ` Yoshiaki Tamura
2010-12-26 12:01 ` Michael S. Tsirkin
2010-12-26 12:16 ` Yoshiaki Tamura
2010-12-26 12:17 ` Michael S. Tsirkin
2010-11-25 6:06 ` [Qemu-devel] [PATCH 06/21] vl: add a tmp pointer so that a handler can delete the entry to which it belongs Yoshiaki Tamura
2010-12-08 7:03 ` Isaku Yamahata
2010-12-08 8:11 ` Yoshiaki Tamura
2010-12-08 14:22 ` Anthony Liguori
2010-11-25 6:06 ` [Qemu-devel] [PATCH 07/21] Introduce fault tolerant VM transaction QEMUFile and ft_mode Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 08/21] savevm: introduce util functions to control ft_trans_file from savevm layer Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 09/21] Introduce event-tap Yoshiaki Tamura
2010-11-29 11:00 ` [Qemu-devel] " Stefan Hajnoczi
2010-11-30 9:50 ` Yoshiaki Tamura
2010-11-30 10:04 ` Stefan Hajnoczi
2010-11-30 10:20 ` Yoshiaki Tamura
2011-01-04 11:02 ` Yoshiaki Tamura
2011-01-04 11:14 ` Stefan Hajnoczi
2011-01-04 11:19 ` Michael S. Tsirkin
2011-01-04 12:20 ` Yoshiaki Tamura
2011-01-04 13:10 ` Michael S. Tsirkin
2011-01-04 13:45 ` Yoshiaki Tamura
2011-01-04 14:42 ` Michael S. Tsirkin
2011-01-06 8:47 ` Yoshiaki Tamura
2011-01-06 9:36 ` Michael S. Tsirkin
2011-01-06 9:41 ` Yoshiaki Tamura
[not found] ` <20101130011914.GA9015@amt.cnet>
2010-11-30 9:28 ` Yoshiaki Tamura
2010-11-30 10:25 ` Marcelo Tosatti
2010-11-30 10:35 ` Yoshiaki Tamura
2010-11-30 13:11 ` Marcelo Tosatti
2010-11-25 6:06 ` [Qemu-devel] [PATCH 10/21] Call init handler of event-tap at main() in vl.c Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 11/21] ioport: insert event_tap_ioport() to ioport_write() Yoshiaki Tamura
2010-11-28 9:40 ` [Qemu-devel] " Michael S. Tsirkin
2010-11-28 12:00 ` Yoshiaki Tamura
2010-12-16 7:37 ` Yoshiaki Tamura
2010-12-16 9:22 ` Michael S. Tsirkin
2010-12-16 9:50 ` Yoshiaki Tamura
2010-12-16 9:54 ` Michael S. Tsirkin
2010-12-16 16:27 ` Stefan Hajnoczi
2010-12-17 16:19 ` Yoshiaki Tamura
2010-12-18 8:36 ` Stefan Hajnoczi
2010-11-25 6:06 ` [Qemu-devel] [PATCH 12/21] Insert event_tap_mmio() to cpu_physical_memory_rw() in exec.c Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 13/21] dma-helpers: replace bdrv_aio_writev() with bdrv_aio_writev_proxy() Yoshiaki Tamura
2010-11-28 9:33 ` [Qemu-devel] " Michael S. Tsirkin
2010-11-28 11:55 ` Yoshiaki Tamura
2010-11-28 12:28 ` Michael S. Tsirkin
2010-11-29 9:52 ` Kevin Wolf
2010-11-29 12:56 ` Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 14/21] virtio-blk: replace bdrv_aio_multiwrite() with bdrv_aio_multiwrite_proxy() Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 15/21] virtio-net: replace qemu_sendv_packet_async() with qemu_sendv_packet_async_proxy() Yoshiaki Tamura
2010-11-28 9:31 ` [Qemu-devel] " Michael S. Tsirkin
2010-11-28 11:43 ` Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 16/21] e1000: replace qemu_send_packet() with qemu_send_packet_proxy() Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 17/21] savevm: introduce qemu_savevm_trans_{begin, commit} Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 18/21] migration: introduce migrate_ft_trans_{put, get}_ready(), and modify migrate_fd_put_ready() when ft_mode is on Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 19/21] migration-tcp: modify tcp_accept_incoming_migration() to handle ft_mode, and add a hack not to close fd when ft_mode is enabled Yoshiaki Tamura
2010-11-25 6:06 ` [Qemu-devel] [PATCH 20/21] Introduce -k option to enable FT migration mode (Kemari) Yoshiaki Tamura
2010-11-25 6:07 ` [Qemu-devel] [PATCH 21/21] migration: add a parser to accept FT migration incoming mode Yoshiaki Tamura
2010-11-26 18:39 ` [Qemu-devel] [PATCH 00/21] Kemari for KVM 0.2 Blue Swirl
2010-11-27 4:29 ` Yoshiaki Tamura
2010-11-27 7:23 ` Stefan Hajnoczi
2010-11-27 8:53 ` Yoshiaki Tamura
2010-11-27 11:03 ` Blue Swirl
2010-11-27 12:21 ` Yoshiaki Tamura
2010-11-27 11:54 ` Stefan Hajnoczi
2010-11-27 13:11 ` Yoshiaki Tamura
2010-11-29 10:17 ` Stefan Hajnoczi [this message]
2010-11-29 13:00 ` Paul Brook
2010-11-29 13:13 ` Yoshiaki Tamura
2010-11-29 13:19 ` Paul Brook
2010-11-29 13:41 ` Yoshiaki Tamura
2010-11-29 14:12 ` Paul Brook
2010-11-29 14:37 ` Yoshiaki Tamura
2010-11-29 14:56 ` Paul Brook
2010-11-29 15:00 ` Yoshiaki Tamura
2010-11-29 15:56 ` Paul Brook
2010-11-29 16:23 ` Stefan Hajnoczi
2010-11-29 16:41 ` Dor Laor
2010-11-29 16:53 ` Paul Brook
2010-11-29 17:05 ` Anthony Liguori
2010-11-29 17:18 ` Paul Brook
2010-11-29 17:33 ` Anthony Liguori
2010-11-30 7:13 ` Yoshiaki Tamura
2010-11-30 6:43 ` Yoshiaki Tamura
2010-11-30 9:13 ` Takuya Yoshikawa
2010-11-27 11:20 ` Paul Brook
2010-11-27 12:35 ` Yoshiaki Tamura
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='AANLkTi=rH1L8AE8de2GE+sKBa0kadVe51dxhtKFWbC6M@mail.gmail.com' \
--to=stefanha@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=ananth@in.ibm.com \
--cc=avi@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=dlaor@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=ohmura.kei@lab.ntt.co.jp \
--cc=psuriset@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.com \
--cc=tamura.yoshiaki@lab.ntt.co.jp \
--cc=vatsa@linux.vnet.ibm.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).