From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yoshihiro YUNOMAE Subject: Re: Re: [RFC PATCH 0/6] virtio-trace: Support virtio-trace Date: Tue, 24 Jul 2012 20:19:51 +0900 Message-ID: <500E84D7.7060103@hitachi.com> References: <20120724023657.6600.52706.stgit@ltc189.sdl.hitachi.co.jp> <500E810A.4030309@hitachi.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; Format="flowed" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <500E810A.4030309@hitachi.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Stefan Hajnoczi Cc: Herbert Xu , Arnd Bergmann , Greg Kroah-Hartman , Frederic Weisbecker , Dhaval Giani , linux-kernel@vger.kernel.org, Borislav Petkov , qemu-devel@nongnu.org, Amit Shah , "Franch Ch. Eigler" , Ingo Molnar , Mathieu Desnoyers , Steven Rostedt , Anthony Liguori , yrl.pp-manager.tt@hitachi.com, Masami Hiramatsu , virtualization@lists.linux-foundation.org, Srikar Dronamraju List-Id: virtualization@lists.linuxfoundation.org SGkgU3RlZmFuLAoKVGhhbmsgeW91IGZvciBjb21tZW50aW5nIG9uIG91ciBwYXRjaCBzZXQuCgoo MjAxMi8wNy8yNCAyMDowMyksIE1hc2FtaSBIaXJhbWF0c3Ugd3JvdGU6Cj4gKDIwMTIvMDcvMjQg MTk6MDIpLCBTdGVmYW4gSGFqbm9jemkgd3JvdGU6Cj4+IE9uIFR1ZSwgSnVsIDI0LCAyMDEyIGF0 IDM6MzYgQU0sIFlvc2hpaGlybyBZVU5PTUFFCj4+IDx5b3NoaWhpcm8ueXVub21hZS5lekBoaXRh Y2hpLmNvbT4gd3JvdGU6Cj4+PiBUaGUgcGVyZm9ybWFuY2Ugb2YgZWFjaCBtZXRob2QgaXMgY29t cGFyZWQgYXMgZm9sbG93czoKPj4+ICAgWzFdIE5hdGl2ZQo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dmlhIHRoZSBzcGVjaWFsIGZpbGUgb24gZXhwb3J0ZWQKPiBkZWJ1Z2ZzLikKPgo+IE9mIGNvdXJz ZSwgdGhpcyBhbHNvIHJlcXVpcmVzIG1vZGlmeWluZyB0cmFjZS1jbWQvcGVyZiB0byBhY2NlcHQK PiBzb21lIG9wdGlvbnMgbGlrZSBndWVzdC1kZWJ1Z2ZzIG1vdW50IHBvaW50LCBndWVzdCdzIHNl cmlhbAo+IGNoYW5uZWwgcGlwZSAob3IgdW5peCBzb2NrZXQ/KSwgZXRjLiBIb3dldmVyLCBpdCB3 aWxsIGJlIGEgc21hbGwKPiBjaGFuZ2UuCj4KPiBUaGFuayB5b3UsCj4KCiA+PiBBcmUgeW91IHVz aW5nIHRleHQgZm9ybWF0dGVkIGZ0cmFjZT8KTm8sIGN1cnJlbnRseSB1c2luZyByYXcgZm9ybWF0 LCBidXTjgIB3ZSdkIGxpa2UgdG8gcmVmb3JtYXQgaXQgaW4gdGV4dC4KClRoYW5rIHlvdSwKCi0t IApZb3NoaWhpcm8gWVVOT01BRQpTb2Z0d2FyZSBQbGF0Zm9ybSBSZXNlYXJjaCBEZXB0LiBMaW51 eCBUZWNobm9sb2d5IENlbnRlcgpIaXRhY2hpLCBMdGQuLCBZb2tvaGFtYSBSZXNlYXJjaCBMYWJv cmF0b3J5CkUtbWFpbDogeW9zaGloaXJvLnl1bm9tYWUuZXpAaGl0YWNoaS5jb20KCgpfX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpWaXJ0dWFsaXphdGlvbiBt YWlsaW5nIGxpc3QKVmlydHVhbGl6YXRpb25AbGlzdHMubGludXgtZm91bmRhdGlvbi5vcmcKaHR0 cHM6Ly9saXN0cy5saW51eGZvdW5kYXRpb24ub3JnL21haWxtYW4vbGlzdGluZm8vdmlydHVhbGl6 YXRpb24= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753447Ab2GXLT5 (ORCPT ); Tue, 24 Jul 2012 07:19:57 -0400 Received: from mail7.hitachi.co.jp ([133.145.228.42]:60980 "EHLO mail7.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753244Ab2GXLT4 (ORCPT ); Tue, 24 Jul 2012 07:19:56 -0400 X-Greylist: delayed 31365 seconds by postgrey-1.27 at vger.kernel.org; Tue, 24 Jul 2012 07:19:56 EDT X-AuditID: b753bd60-940f3ba000004f2e-98-500e84d9ddce X-AuditID: b753bd60-940f3ba000004f2e-98-500e84d9ddce Message-ID: <500E84D7.7060103@hitachi.com> Date: Tue, 24 Jul 2012 20:19:51 +0900 From: Yoshihiro YUNOMAE User-Agent: Mozilla/5.0 (Windows NT 5.2; rv:13.0) Gecko/20120604 Thunderbird/13.0 MIME-Version: 1.0 To: Stefan Hajnoczi Cc: Masami Hiramatsu , linux-kernel@vger.kernel.org, Herbert Xu , Arnd Bergmann , Frederic Weisbecker , yrl.pp-manager.tt@hitachi.com, qemu-devel@nongnu.org, Borislav Petkov , virtualization@lists.linux-foundation.org, "Franch Ch. Eigler" , Ingo Molnar , Mathieu Desnoyers , Steven Rostedt , Anthony Liguori , Greg Kroah-Hartman , Amit Shah , Srikar Dronamraju , Dhaval Giani Subject: Re: Re: [RFC PATCH 0/6] virtio-trace: Support virtio-trace References: <20120724023657.6600.52706.stgit@ltc189.sdl.hitachi.co.jp> <500E810A.4030309@hitachi.com> In-Reply-To: <500E810A.4030309@hitachi.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stefan, Thank you for commenting on our patch set. (2012/07/24 20:03), Masami Hiramatsu wrote: > (2012/07/24 19:02), Stefan Hajnoczi wrote: >> On Tue, Jul 24, 2012 at 3:36 AM, Yoshihiro YUNOMAE >> wrote: >>> The performance of each method is compared as follows: >>> [1] Native >>> - only recording trace data to ring-buffer on a guest >>> [2] Virtio-trace >>> - running a trace agent on a guest >>> - a reader on a host opens FIFO using cat command >>> [3] IVRing >>> - A SystemTap script in a guest records trace data to IVRing. >>> -- probe points are same as ftrace. >>> [4] Virtio-serial(normal) >>> - A reader(using cat) on a guest output trace data to a host using >>> standard output via virtio-serial. >> >> The first time I read this I thought you are adding a new virtio-trace >> device. But it looks like this series really add splice support to >> virtio-console and that yields a big performance improvement when >> sending trace_pipe_raw. > > Yes, sorry for the confusion. Actually this is an enhancement of > virtio-serial. I'm working with Yoshihiro on this feature. > >> Guest ftrace is useful and I like this. Have you thought about >> controlling ftrace from the host? Perhaps a command could be added to >> the QEMU guest agent which basically invokes trace-cmd/perf. > > As you can see, guest trace-agent can be controlled via a > control channel. In our scenario, host tools can control that > instead of guest one. > > We are considering that exporting the tracing part of guest's > debugfs to host via another virtio-serial channel by using > 9pfs, so that the host tools can refer that. > > (In this scenario, guest trace-agent will also provide 9pfs server. > Since it means that the agent can handle writing a special file, > trace-agent can be controlled via the special file on exported > debugfs.) > > Of course, this also requires modifying trace-cmd/perf to accept > some options like guest-debugfs mount point, guest's serial > channel pipe (or unix socket?), etc. However, it will be a small > change. > > Thank you, > >> Are you using text formatted ftrace? No, currently using raw format, but we'd like to reformat it in text. Thank you, -- Yoshihiro YUNOMAE Software Platform Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: yoshihiro.yunomae.ez@hitachi.com From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Std9p-0004zf-6u for qemu-devel@nongnu.org; Tue, 24 Jul 2012 07:20:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Std9i-00010H-Of for qemu-devel@nongnu.org; Tue, 24 Jul 2012 07:20:04 -0400 Received: from mail7.hitachi.co.jp ([133.145.228.42]:60984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Std9i-000107-9U for qemu-devel@nongnu.org; Tue, 24 Jul 2012 07:19:58 -0400 Message-ID: <500E84D7.7060103@hitachi.com> Date: Tue, 24 Jul 2012 20:19:51 +0900 From: Yoshihiro YUNOMAE MIME-Version: 1.0 References: <20120724023657.6600.52706.stgit@ltc189.sdl.hitachi.co.jp> <500E810A.4030309@hitachi.com> In-Reply-To: <500E810A.4030309@hitachi.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Herbert Xu , Arnd Bergmann , Greg Kroah-Hartman , Frederic Weisbecker , Dhaval Giani , linux-kernel@vger.kernel.org, Borislav Petkov , qemu-devel@nongnu.org, Amit Shah , "Franch Ch. Eigler" , Ingo Molnar , Mathieu Desnoyers , Steven Rostedt , Anthony Liguori , yrl.pp-manager.tt@hitachi.com, Masami Hiramatsu , virtualization@lists.linux-foundation.org, Srikar Dronamraju Hi Stefan, Thank you for commenting on our patch set. (2012/07/24 20:03), Masami Hiramatsu wrote: > (2012/07/24 19:02), Stefan Hajnoczi wrote: >> On Tue, Jul 24, 2012 at 3:36 AM, Yoshihiro YUNOMAE >> wrote: >>> The performance of each method is compared as follows: >>> [1] Native >>> - only recording trace data to ring-buffer on a guest >>> [2] Virtio-trace >>> - running a trace agent on a guest >>> - a reader on a host opens FIFO using cat command >>> [3] IVRing >>> - A SystemTap script in a guest records trace data to IVRing. >>> -- probe points are same as ftrace. >>> [4] Virtio-serial(normal) >>> - A reader(using cat) on a guest output trace data to a host us= ing >>> standard output via virtio-serial. >> >> The first time I read this I thought you are adding a new virtio-trace >> device. But it looks like this series really add splice support to >> virtio-console and that yields a big performance improvement when >> sending trace_pipe_raw. > > Yes, sorry for the confusion. Actually this is an enhancement of > virtio-serial. I'm working with Yoshihiro on this feature. > >> Guest ftrace is useful and I like this. Have you thought about >> controlling ftrace from the host? Perhaps a command could be added to >> the QEMU guest agent which basically invokes trace-cmd/perf. > > As you can see, guest trace-agent can be controlled via a > control channel. In our scenario, host tools can control that > instead of guest one. > > We are considering that exporting the tracing part of guest's > debugfs to host via another virtio-serial channel by using > 9pfs, so that the host tools can refer that. > > (In this scenario, guest trace-agent will also provide 9pfs server. > Since it means that the agent can handle writing a special file, > trace-agent can be controlled via the special file on exported > debugfs.) > > Of course, this also requires modifying trace-cmd/perf to accept > some options like guest-debugfs mount point, guest's serial > channel pipe (or unix socket?), etc. However, it will be a small > change. > > Thank you, > >> Are you using text formatted ftrace? No, currently using raw format, but=E3=80=80we'd like to reformat it in t= ext. Thank you, --=20 Yoshihiro YUNOMAE Software Platform Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: yoshihiro.yunomae.ez@hitachi.com