All of lore.kernel.org
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>,
	linux-kernel@vger.kernel.org,
	Herbert Xu <herbert@gondor.hengli.com.au>,
	Arnd Bergmann <arnd@arndb.de>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	yrl.pp-manager.tt@hitachi.com, qemu-devel@nongnu.org,
	Borislav Petkov <bp@amd64.org>,
	virtualization@lists.linux-foundation.org,
	"Franch Ch. Eigler" <fche@redhat.com>,
	Ingo Molnar <mingo@redhat.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Amit Shah <amit.shah@redhat.com>
Subject: Re: Re: [Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace
Date: Fri, 27 Jul 2012 18:58:48 +0000	[thread overview]
Message-ID: <CAAu8pHsUkk8i_KVJNZtQJ8EaeiVWVt80_rV+p-sVstrmQ_j5dw@mail.gmail.com> (raw)
In-Reply-To: <500FAB33.4060301@hitachi.com>

On Wed, Jul 25, 2012 at 8:15 AM, Masami Hiramatsu
<masami.hiramatsu.pt@hitachi.com> wrote:
> (2012/07/25 5:26), Blue Swirl wrote:>
>>> The following patch set provides a low-overhead system for collecting kernel
>>> tracing data of guests by a host in a virtualization environment.
>>>
>>> A guest OS generally shares some devices with other guests or a host, so
>>> reasons of any problems occurring in a guest may be from other guests or a
>>> host.
>>> Then, to collect some tracing data of a number of guests and a host is needed
>>> when some problems occur in a virtualization environment. One of methods to
>>> realize that is to collect tracing data of guests in a host. To do this,
>>> network
>>> is generally used. However, high load will be taken to applications on guests
>>> using network I/O because there are many network stack layers. Therefore,
>>> a communication method for collecting the data without using network is
>>> needed.
>>
>> I implemented something similar earlier by passing trace data from
>> OpenBIOS to QEMU using the firmware configuration device. The data
>> format was the same as QEMU used for simpletrace event structure
>> instead of ftrace. I didn't commit it because of a few problems.
>
> Sounds interesting :)
> I guess you traced BIOS events, right?

Yes, I converted a few DPRINTFs to tracepoints as a proof of concept.

>
>> I'm not familiar with ftrace, is it possible to trace two guest
>> applications (BIOS and kernel) at the same time?
>
> Since ftrace itself is a tracing feature in the linux kernel, it
> can trace two or more applications (processes) if those run on linux
> kernel. However, I think OpenBIOS runs *under* the guest kernel.
> If so, ftrace currently can't trace OpenBIOS from guest side.

No, OpenBIOS boots the machine and then passes control to boot loader
and that to kernel. The kernel will make a few calls to OpenBIOS at
start but not later. OpenBIOS is used by QEMU as Sparc and PowerPC
BIOS.

>
> I think it may need another enhancement on both OpenBIOS and linux
> kernel to trace BIOS event from linux kernel.
>

Ideally both OpenBIOS and Linux should be able to feed trace events
back to QEMU independently.

>> Or could this be
>> handled by opening two different virtio-serial pipes, one for BIOS and
>> the other for the kernel?
>
> Of course, virtio-serial itself can open multiple channels, thus, if
> OpenBIOS can handle virtio, it can pass trace data via another
> channel.

Currently OpenBIOS probes the PCI bus and identifies virtio devices
but ignores them, adding virtio-serial support shouldn't be too hard.
There's a time window between CPU boot and PCI probe when the the
device will not be available though.

>
>> In my version, the tracepoint ID would have been used to demultiplex
>> QEMU tracepoints from BIOS tracepoints, but something like separate ID
>> spaces would have been better.
>
> I guess your feature notifies events to QEMU and QEMU records that in
> their own buffer. Therefore it must have different tracepoint IDs.
> On the other hand, with this feature, QEMU just passes trace-data to
> host-side pipe. Since outer tracing tool separately collects trace
> data, we don't need to demultiplex the data.
>
> Perhaps, in the analyzing phase (after tracing), we have to mix events
> again. At that time, we'll add some guest-ID for each event-ID, but
> it can be done offline.

Yes, the multiplexing/demultiplexing is only needed in my version
because the feeds are not independent.

>
> Best Regards,
>
> --
> Masami HIRAMATSU
> Software Platform Research Dept. Linux Technology Center
> Hitachi, Ltd., Yokohama Research Laboratory
> E-mail: masami.hiramatsu.pt@hitachi.com

WARNING: multiple messages have this Message-ID (diff)
From: Blue Swirl <blauwirbel@gmail.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>,
	linux-kernel@vger.kernel.org, Borislav Petkov <bp@amd64.org>,
	qemu-devel@nongnu.org, "Franch Ch. Eigler" <fche@redhat.com>,
	Ingo Molnar <mingo@redhat.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Anthony Liguori <anthony@codemonkey.ws>,
	yrl.pp-manager.tt@hitachi.com, Amit Shah <amit.shah@redhat.com>,
	virtualization@lists.linux-foundation.org
Subject: Re: [Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace
Date: Fri, 27 Jul 2012 18:58:48 +0000	[thread overview]
Message-ID: <CAAu8pHsUkk8i_KVJNZtQJ8EaeiVWVt80_rV+p-sVstrmQ_j5dw@mail.gmail.com> (raw)
In-Reply-To: <500FAB33.4060301@hitachi.com>

On Wed, Jul 25, 2012 at 8:15 AM, Masami Hiramatsu
<masami.hiramatsu.pt@hitachi.com> wrote:
> (2012/07/25 5:26), Blue Swirl wrote:>
>>> The following patch set provides a low-overhead system for collecting kernel
>>> tracing data of guests by a host in a virtualization environment.
>>>
>>> A guest OS generally shares some devices with other guests or a host, so
>>> reasons of any problems occurring in a guest may be from other guests or a
>>> host.
>>> Then, to collect some tracing data of a number of guests and a host is needed
>>> when some problems occur in a virtualization environment. One of methods to
>>> realize that is to collect tracing data of guests in a host. To do this,
>>> network
>>> is generally used. However, high load will be taken to applications on guests
>>> using network I/O because there are many network stack layers. Therefore,
>>> a communication method for collecting the data without using network is
>>> needed.
>>
>> I implemented something similar earlier by passing trace data from
>> OpenBIOS to QEMU using the firmware configuration device. The data
>> format was the same as QEMU used for simpletrace event structure
>> instead of ftrace. I didn't commit it because of a few problems.
>
> Sounds interesting :)
> I guess you traced BIOS events, right?

Yes, I converted a few DPRINTFs to tracepoints as a proof of concept.

>
>> I'm not familiar with ftrace, is it possible to trace two guest
>> applications (BIOS and kernel) at the same time?
>
> Since ftrace itself is a tracing feature in the linux kernel, it
> can trace two or more applications (processes) if those run on linux
> kernel. However, I think OpenBIOS runs *under* the guest kernel.
> If so, ftrace currently can't trace OpenBIOS from guest side.

No, OpenBIOS boots the machine and then passes control to boot loader
and that to kernel. The kernel will make a few calls to OpenBIOS at
start but not later. OpenBIOS is used by QEMU as Sparc and PowerPC
BIOS.

>
> I think it may need another enhancement on both OpenBIOS and linux
> kernel to trace BIOS event from linux kernel.
>

Ideally both OpenBIOS and Linux should be able to feed trace events
back to QEMU independently.

>> Or could this be
>> handled by opening two different virtio-serial pipes, one for BIOS and
>> the other for the kernel?
>
> Of course, virtio-serial itself can open multiple channels, thus, if
> OpenBIOS can handle virtio, it can pass trace data via another
> channel.

Currently OpenBIOS probes the PCI bus and identifies virtio devices
but ignores them, adding virtio-serial support shouldn't be too hard.
There's a time window between CPU boot and PCI probe when the the
device will not be available though.

>
>> In my version, the tracepoint ID would have been used to demultiplex
>> QEMU tracepoints from BIOS tracepoints, but something like separate ID
>> spaces would have been better.
>
> I guess your feature notifies events to QEMU and QEMU records that in
> their own buffer. Therefore it must have different tracepoint IDs.
> On the other hand, with this feature, QEMU just passes trace-data to
> host-side pipe. Since outer tracing tool separately collects trace
> data, we don't need to demultiplex the data.
>
> Perhaps, in the analyzing phase (after tracing), we have to mix events
> again. At that time, we'll add some guest-ID for each event-ID, but
> it can be done offline.

Yes, the multiplexing/demultiplexing is only needed in my version
because the feeds are not independent.

>
> Best Regards,
>
> --
> Masami HIRAMATSU
> Software Platform Research Dept. Linux Technology Center
> Hitachi, Ltd., Yokohama Research Laboratory
> E-mail: masami.hiramatsu.pt@hitachi.com

WARNING: multiple messages have this Message-ID (diff)
From: Blue Swirl <blauwirbel@gmail.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	linux-kernel@vger.kernel.org, Borislav Petkov <bp@amd64.org>,
	qemu-devel@nongnu.org, "Franch Ch. Eigler" <fche@redhat.com>,
	Ingo Molnar <mingo@redhat.com>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Anthony Liguori <anthony@codemonkey.ws>,
	yrl.pp-manager.tt@hitachi.com, Amit Shah <amit.shah@redhat.com>,
	virtualization@lists.linux-foundation.org
Subject: Re: Re: [Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace
Date: Fri, 27 Jul 2012 18:58:48 +0000	[thread overview]
Message-ID: <CAAu8pHsUkk8i_KVJNZtQJ8EaeiVWVt80_rV+p-sVstrmQ_j5dw@mail.gmail.com> (raw)
In-Reply-To: <500FAB33.4060301@hitachi.com>

On Wed, Jul 25, 2012 at 8:15 AM, Masami Hiramatsu
<masami.hiramatsu.pt@hitachi.com> wrote:
> (2012/07/25 5:26), Blue Swirl wrote:>
>>> The following patch set provides a low-overhead system for collecting kernel
>>> tracing data of guests by a host in a virtualization environment.
>>>
>>> A guest OS generally shares some devices with other guests or a host, so
>>> reasons of any problems occurring in a guest may be from other guests or a
>>> host.
>>> Then, to collect some tracing data of a number of guests and a host is needed
>>> when some problems occur in a virtualization environment. One of methods to
>>> realize that is to collect tracing data of guests in a host. To do this,
>>> network
>>> is generally used. However, high load will be taken to applications on guests
>>> using network I/O because there are many network stack layers. Therefore,
>>> a communication method for collecting the data without using network is
>>> needed.
>>
>> I implemented something similar earlier by passing trace data from
>> OpenBIOS to QEMU using the firmware configuration device. The data
>> format was the same as QEMU used for simpletrace event structure
>> instead of ftrace. I didn't commit it because of a few problems.
>
> Sounds interesting :)
> I guess you traced BIOS events, right?

Yes, I converted a few DPRINTFs to tracepoints as a proof of concept.

>
>> I'm not familiar with ftrace, is it possible to trace two guest
>> applications (BIOS and kernel) at the same time?
>
> Since ftrace itself is a tracing feature in the linux kernel, it
> can trace two or more applications (processes) if those run on linux
> kernel. However, I think OpenBIOS runs *under* the guest kernel.
> If so, ftrace currently can't trace OpenBIOS from guest side.

No, OpenBIOS boots the machine and then passes control to boot loader
and that to kernel. The kernel will make a few calls to OpenBIOS at
start but not later. OpenBIOS is used by QEMU as Sparc and PowerPC
BIOS.

>
> I think it may need another enhancement on both OpenBIOS and linux
> kernel to trace BIOS event from linux kernel.
>

Ideally both OpenBIOS and Linux should be able to feed trace events
back to QEMU independently.

>> Or could this be
>> handled by opening two different virtio-serial pipes, one for BIOS and
>> the other for the kernel?
>
> Of course, virtio-serial itself can open multiple channels, thus, if
> OpenBIOS can handle virtio, it can pass trace data via another
> channel.

Currently OpenBIOS probes the PCI bus and identifies virtio devices
but ignores them, adding virtio-serial support shouldn't be too hard.
There's a time window between CPU boot and PCI probe when the the
device will not be available though.

>
>> In my version, the tracepoint ID would have been used to demultiplex
>> QEMU tracepoints from BIOS tracepoints, but something like separate ID
>> spaces would have been better.
>
> I guess your feature notifies events to QEMU and QEMU records that in
> their own buffer. Therefore it must have different tracepoint IDs.
> On the other hand, with this feature, QEMU just passes trace-data to
> host-side pipe. Since outer tracing tool separately collects trace
> data, we don't need to demultiplex the data.
>
> Perhaps, in the analyzing phase (after tracing), we have to mix events
> again. At that time, we'll add some guest-ID for each event-ID, but
> it can be done offline.

Yes, the multiplexing/demultiplexing is only needed in my version
because the feeds are not independent.

>
> Best Regards,
>
> --
> Masami HIRAMATSU
> Software Platform Research Dept. Linux Technology Center
> Hitachi, Ltd., Yokohama Research Laboratory
> E-mail: masami.hiramatsu.pt@hitachi.com

  reply	other threads:[~2012-07-27 18:59 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-24  2:36 [RFC PATCH 0/6] virtio-trace: Support virtio-trace Yoshihiro YUNOMAE
2012-07-24  2:36 ` Yoshihiro YUNOMAE
2012-07-24  2:36 ` [Qemu-devel] " Yoshihiro YUNOMAE
2012-07-24  2:37 ` [RFC PATCH 1/6] virtio/console: Add splice_write support Yoshihiro YUNOMAE
2012-07-24  2:37   ` Yoshihiro YUNOMAE
2012-07-24  2:37   ` [Qemu-devel] " Yoshihiro YUNOMAE
2012-08-09  9:00   ` Amit Shah
2012-08-09  9:00     ` Amit Shah
2012-08-09  9:00     ` [Qemu-devel] " Amit Shah
2012-08-09  9:12     ` Masami Hiramatsu
2012-08-09  9:12       ` Masami Hiramatsu
2012-08-09  9:12       ` [Qemu-devel] " Masami Hiramatsu
2012-07-24  2:37 ` [RFC PATCH 2/6] virtio/console: Add a failback for unstealable pipe buffer Yoshihiro YUNOMAE
2012-07-24  2:37   ` Yoshihiro YUNOMAE
2012-07-24  2:37   ` [Qemu-devel] " Yoshihiro YUNOMAE
2012-08-09  9:03   ` Amit Shah
2012-08-09  9:03     ` Amit Shah
2012-08-09  9:03     ` [Qemu-devel] " Amit Shah
2012-08-09  9:24     ` Borislav Petkov
2012-08-09  9:24     ` Borislav Petkov
2012-08-09  9:24       ` [Qemu-devel] " Borislav Petkov
2012-08-09  9:24     ` Masami Hiramatsu
2012-08-09  9:24       ` Masami Hiramatsu
2012-08-09  9:24       ` [Qemu-devel] " Masami Hiramatsu
2012-08-09  9:55       ` Amit Shah
2012-08-09  9:55         ` Amit Shah
2012-08-09  9:55         ` [Qemu-devel] " Amit Shah
2012-08-09  9:58         ` Avi Kivity
2012-08-09  9:58           ` Avi Kivity
2012-08-09  9:58           ` [Qemu-devel] " Avi Kivity
2012-08-09 10:14           ` Amit Shah
2012-08-09 10:14           ` Amit Shah
2012-08-09 10:14             ` [Qemu-devel] " Amit Shah
2012-08-09 12:35       ` Steven Rostedt
2012-08-09 12:35         ` [Qemu-devel] " Steven Rostedt
2012-08-09 12:35       ` Steven Rostedt
2012-07-24  2:37 ` [RFC PATCH 3/6] virtio/console: Wait until the port is ready on splice Yoshihiro YUNOMAE
2012-07-24  2:37   ` Yoshihiro YUNOMAE
2012-07-24  2:37   ` [Qemu-devel] " Yoshihiro YUNOMAE
2012-07-24  2:37 ` [RFC PATCH 4/6] ftrace: Allow stealing pages from pipe buffer Yoshihiro YUNOMAE
2012-07-24  2:37   ` Yoshihiro YUNOMAE
2012-07-24  2:37   ` [Qemu-devel] " Yoshihiro YUNOMAE
2012-07-30 22:12   ` Steven Rostedt
2012-07-30 22:12     ` Steven Rostedt
2012-07-30 22:12     ` [Qemu-devel] " Steven Rostedt
2012-07-24  2:37 ` [RFC PATCH 5/6] virtio/console: Allocate scatterlist according to the current pipe size Yoshihiro YUNOMAE
2012-07-24  2:37   ` Yoshihiro YUNOMAE
2012-07-24  2:37   ` [Qemu-devel] " Yoshihiro YUNOMAE
2012-07-24  2:37 ` [RFC PATCH 6/6] tools: Add guest trace agent as a user tool Yoshihiro YUNOMAE
2012-07-24  2:37   ` Yoshihiro YUNOMAE
2012-07-24  2:37   ` [Qemu-devel] " Yoshihiro YUNOMAE
2012-07-24  3:27 ` [RFC PATCH 0/6] virtio-trace: Support virtio-trace Masami Hiramatsu
2012-07-24  3:27 ` Masami Hiramatsu
2012-07-24  3:27   ` [Qemu-devel] " Masami Hiramatsu
2012-07-24 10:02 ` Stefan Hajnoczi
2012-07-24 10:02   ` Stefan Hajnoczi
2012-07-24 10:02   ` [Qemu-devel] " Stefan Hajnoczi
2012-07-24 11:03   ` Masami Hiramatsu
2012-07-24 11:03   ` Masami Hiramatsu
2012-07-24 11:03     ` [Qemu-devel] " Masami Hiramatsu
2012-07-24 11:19     ` Yoshihiro YUNOMAE
2012-07-24 11:19       ` Yoshihiro YUNOMAE
2012-07-24 11:19       ` [Qemu-devel] " Yoshihiro YUNOMAE
2012-07-24 13:41       ` Stefan Hajnoczi
2012-07-24 13:41         ` Stefan Hajnoczi
2012-07-24 13:41         ` [Qemu-devel] " Stefan Hajnoczi
2012-07-25  9:13         ` Re: " Yoshihiro YUNOMAE
2012-07-25  9:13           ` Yoshihiro YUNOMAE
2012-07-25  9:13           ` [Qemu-devel] " Yoshihiro YUNOMAE
2012-07-26 10:52           ` Re: " Stefan Hajnoczi
2012-07-26 10:52             ` Stefan Hajnoczi
2012-07-26 10:52             ` [Qemu-devel] " Stefan Hajnoczi
2012-07-24 13:43     ` Stefan Hajnoczi
2012-07-24 13:43       ` Stefan Hajnoczi
2012-07-24 13:43       ` [Qemu-devel] " Stefan Hajnoczi
2012-07-24 20:26 ` Blue Swirl
2012-07-24 20:26   ` Blue Swirl
2012-07-25  8:15   ` Masami Hiramatsu
2012-07-25  8:15     ` Masami Hiramatsu
2012-07-25  8:15     ` Masami Hiramatsu
2012-07-27 18:58     ` Blue Swirl [this message]
2012-07-27 18:58       ` Blue Swirl
2012-07-27 18:58       ` Blue Swirl
2012-07-26 11:35 ` Amit Shah
2012-07-26 11:35   ` Amit Shah
2012-07-26 11:35   ` [Qemu-devel] " Amit Shah
2012-07-27  8:55   ` Yoshihiro YUNOMAE
2012-07-27  8:55     ` Yoshihiro YUNOMAE
2012-07-27  8:55     ` [Qemu-devel] " Yoshihiro YUNOMAE
2012-07-27  9:43     ` Amit Shah
2012-07-27  9:43       ` Amit Shah
2012-07-27  9:43       ` [Qemu-devel] " Amit Shah
2012-07-31  0:52       ` Re: " Yoshihiro YUNOMAE
2012-07-31  0:52         ` Yoshihiro YUNOMAE
2012-07-31  0:52         ` [Qemu-devel] " Yoshihiro YUNOMAE
2012-08-09 10:16 ` Amit Shah
2012-08-09 10:16   ` Amit Shah
2012-08-09 10:16   ` [Qemu-devel] " Amit Shah
2012-08-21  2:17   ` Rusty Russell
2012-08-21  2:17     ` Rusty Russell
2012-08-21  2:17     ` [Qemu-devel] " Rusty Russell
2012-08-21  5:09     ` Amit Shah
2012-08-21  5:09       ` Amit Shah
2012-08-21  5:09       ` [Qemu-devel] " Amit Shah

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=CAAu8pHsUkk8i_KVJNZtQJ8EaeiVWVt80_rV+p-sVstrmQ_j5dw@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=amit.shah@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=arnd@arndb.de \
    --cc=bp@amd64.org \
    --cc=fche@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.hengli.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rostedt@goodmis.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=yoshihiro.yunomae.ez@hitachi.com \
    --cc=yrl.pp-manager.tt@hitachi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.