Re: [Qemu-devel] [PATCH 3/5] trace-cmd: Support trace-agent of virtio-trace

2012-08-22 Thread Yoshihiro YUNOMAE
Hi Steven, (2012/08/22 22:51), Steven Rostedt wrote: On Wed, 2012-08-22 at 17:43 +0900, Yoshihiro YUNOMAE wrote: Add read path and control path to use trace-agent of virtio-trace. When we use trace-agent, trace-cmd will be used as follows: # AGENT_READ_DIR=/tmp/virtio-trace/tracing

[Qemu-devel] [PATCH 3/5] trace-cmd: Support trace-agent of virtio-trace

2012-08-22 Thread Yoshihiro YUNOMAE
\ trace-cmd record -e "sched:*" Here, AGENT_READ_DIR is the path for a reading directory of virtio-trace, AGENT_CTL is a control path of trace-agent, and TRACING_DIR is a debugfs path of a guest. Signed-off-by: Yoshihiro YUNOMAE --- trace-cmd.h |1 + trace-recorde

[Qemu-devel] [PATCH 4/5] trace-cmd: Add non-blocking option for open() and splice_read()

2012-08-22 Thread Yoshihiro YUNOMAE
nonblock option to open() and splice_read(). Signed-off-by: Yoshihiro YUNOMAE --- trace-recorder.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/trace-recorder.c b/trace-recorder.c index 3b750e9..6577fe8 100644 --- a/trace-recorder.c +++ b/trace-recorder.c

[Qemu-devel] [PATCH 5/5] trace-cmd: Use polling function

2012-08-22 Thread Yoshihiro YUNOMAE
Use poll() for avoiding a busy loop to read trace data of a guest from FIFO. Signed-off-by: Yoshihiro YUNOMAE --- trace-recorder.c | 42 -- 1 files changed, 36 insertions(+), 6 deletions(-) diff --git a/trace-recorder.c b/trace-recorder.c index

[Qemu-devel] [PATCH 2/5] trace-cmd: Use tracing directory to count CPUs

2012-08-22 Thread Yoshihiro YUNOMAE
From: Masami Hiramatsu Count debugfs/tracing/per_cpu/cpu* to determine the number of CPUs. Signed-off-by: Masami Hiramatsu Signed-off-by: Yoshihiro YUNOMAE --- trace-record.c | 41 + 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a

[Qemu-devel] [PATCH 1/5] trace-cmd: Use TRACE_DIR envrionment variable if defined

2012-08-22 Thread Yoshihiro YUNOMAE
From: Masami Hiramatsu Use TRACE_DIR environment variable for setting debugfs/tracing directory if defined. This is for controlling guest(or remote) ftrace. Signed-off-by: Masami Hiramatsu Signed-off-by: Yoshihiro YUNOMAE --- trace-util.c |9 + 1 files changed, 9 insertions

[Qemu-devel] [PATCH 0/5] trace-cmd: Add a recorder readable feature for virtio-trace

2012-08-22 Thread Yoshihiro YUNOMAE
- Support for trace-cmd => done - Support for 9pfs protocol - Support for non-blocking mode in QEMU Thank you, --- Masami Hiramatsu (2): trace-cmd: Use tracing directory to count CPUs trace-cmd: Use TRACE_DIR envrionment variable if defined Yoshihiro YUNOMAE (3): trace-cm

[Qemu-devel] [PATCH V2 6/6] tools: Add guest trace agent as a user tool

2012-08-09 Thread Yoshihiro YUNOMAE
g - write trace data to stdout by using -o option - controlled by start/stop orders from a Host Changes in v2: - Cleanup (change fprintf() to pr_err() and an include guard) Signed-off-by: Yoshihiro YUNOMAE --- tools/virtio/virtio-trace/Makefile | 14 + tools/virtio/virtio-tr

[Qemu-devel] [PATCH V2 4/6] ftrace: Allow stealing pages from pipe buffer

2012-08-09 Thread Yoshihiro YUNOMAE
From: Masami Hiramatsu Use generic steal operation on pipe buffer to allow stealing ring buffer's read page from pipe buffer. Note that this could reduce the performance of splice on the splice_write side operation without affinity setting. Since the ring buffer's read pages are allocated on the

[Qemu-devel] [PATCH V2 5/6] virtio/console: Allocate scatterlist according to the current pipe size

2012-08-09 Thread Yoshihiro YUNOMAE
From: Masami Hiramatsu Allocate scatterlist according to the current pipe size. This allows splicing bigger buffer if the pipe size has been changed by fcntl. Changes in v2: - Just a minor fix for avoiding a confliction with previous patch. Signed-off-by: Masami Hiramatsu --- drivers/char/v

[Qemu-devel] [PATCH V2 3/6] virtio/console: Wait until the port is ready on splice

2012-08-09 Thread Yoshihiro YUNOMAE
From: Masami Hiramatsu Wait if the port is not connected or full on splice like as write is doing. Signed-off-by: Masami Hiramatsu --- drivers/char/virtio_console.c | 39 +++ 1 files changed, 27 insertions(+), 12 deletions(-) diff --git a/drivers/char/vi

[Qemu-devel] [PATCH V2 2/6] virtio/console: Add a failback for unstealable pipe buffer

2012-08-09 Thread Yoshihiro YUNOMAE
From: Masami Hiramatsu Add a failback memcpy path for unstealable pipe buffer. If buf->ops->steal() fails, virtio-serial tries to copy the page contents to an allocated page, instead of just failing splice(). Signed-off-by: Masami Hiramatsu --- drivers/char/virtio_console.c | 28 +++

[Qemu-devel] [PATCH V2 1/6] virtio/console: Add splice_write support

2012-08-09 Thread Yoshihiro YUNOMAE
From: Masami Hiramatsu Enable to use splice_write from pipe to virtio-console port. This steals pages from pipe and directly send it to host. Note that this may accelerate only the guest to host path. Changes in v2: - Use GFP_KERNEL instead of GFP_ATOMIC in syscall context function. Signed-of

[Qemu-devel] [PATCH V2 0/6] virtio-trace: Support virtio-trace

2012-08-09 Thread Yoshihiro YUNOMAE
e: Wait until the port is ready on splice virtio/console: Add a failback for unstealable pipe buffer virtio/console: Add splice_write support Yoshihiro YUNOMAE (1): tools: Add guest trace agent as a user tool drivers/char/virtio_console.c | 198 +

Re: [Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-30 Thread Yoshihiro YUNOMAE
Hi Amit, Sorry for the late reply. (2012/07/27 18:43), Amit Shah wrote: On (Fri) 27 Jul 2012 [17:55:11], Yoshihiro YUNOMAE wrote: Hi Amit, Thank you for commenting on our work. (2012/07/26 20:35), Amit Shah wrote: On (Tue) 24 Jul 2012 [11:36:57], Yoshihiro YUNOMAE wrote

Re: [Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-27 Thread Yoshihiro YUNOMAE
Hi Amit, Thank you for commenting on our work. (2012/07/26 20:35), Amit Shah wrote: On (Tue) 24 Jul 2012 [11:36:57], Yoshihiro YUNOMAE wrote: [...] Therefore, we propose a new system "virtio-trace", which uses enhanced virtio-serial and existing ring-buffer of ftrace, for collec

Re: [Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-25 Thread Yoshihiro YUNOMAE
Hi Stefan, (2012/07/24 22:41), Stefan Hajnoczi wrote: On Tue, Jul 24, 2012 at 12:19 PM, Yoshihiro YUNOMAE wrote: Are you using text formatted ftrace? No, currently using raw format, but we'd like to reformat it in text. Capturing the info necessary to translate numbers into symbols i

Re: [Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-24 Thread Yoshihiro YUNOMAE
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

[Qemu-devel] [RFC PATCH 5/6] virtio/console: Allocate scatterlist according to the current pipe size

2012-07-23 Thread Yoshihiro YUNOMAE
From: Masami Hiramatsu Allocate scatterlist according to the current pipe size. This allows splicing bigger buffer if the pipe size has been changed by fcntl. Signed-off-by: Masami Hiramatsu Cc: Amit Shah Cc: Arnd Bergmann Cc: Greg Kroah-Hartman --- drivers/char/virtio_console.c | 23 +++

[Qemu-devel] [RFC PATCH 4/6] ftrace: Allow stealing pages from pipe buffer

2012-07-23 Thread Yoshihiro YUNOMAE
From: Masami Hiramatsu Use generic steal operation on pipe buffer to allow stealing ring buffer's read page from pipe buffer. Note that this could reduce the performance of splice on the splice_write side operation without affinity setting. Since the ring buffer's read pages are allocated on the

[Qemu-devel] [RFC PATCH 6/6] tools: Add guest trace agent as a user tool

2012-07-23 Thread Yoshihiro YUNOMAE
g - write trace data to stdout by using -o option - controlled by start/stop orders from a Host Signed-off-by: Yoshihiro YUNOMAE --- tools/virtio/virtio-trace/Makefile | 14 + tools/virtio/virtio-trace/README| 118 tools/virtio/virtio-trace/trace-agent-ct

[Qemu-devel] [RFC PATCH 3/6] virtio/console: Wait until the port is ready on splice

2012-07-23 Thread Yoshihiro YUNOMAE
From: Masami Hiramatsu Wait if the port is not connected or full on splice like as write is doing. Signed-off-by: Masami Hiramatsu Cc: Amit Shah Cc: Arnd Bergmann Cc: Greg Kroah-Hartman --- drivers/char/virtio_console.c | 39 +++ 1 files changed, 27 in

[Qemu-devel] [RFC PATCH 1/6] virtio/console: Add splice_write support

2012-07-23 Thread Yoshihiro YUNOMAE
From: Masami Hiramatsu Enable to use splice_write from pipe to virtio-console port. This steals pages from pipe and directly send it to host. Note that this may accelerate only the guest to host path. Signed-off-by: Masami Hiramatsu Cc: Amit Shah Cc: Arnd Bergmann Cc: Greg Kroah-Hartman ---

[Qemu-devel] [RFC PATCH 2/6] virtio/console: Add a failback for unstealable pipe buffer

2012-07-23 Thread Yoshihiro YUNOMAE
From: Masami Hiramatsu Add a failback memcpy path for unstealable pipe buffer. If buf->ops->steal() fails, virtio-serial tries to copy the page contents to an allocated page, instead of just failing splice(). Signed-off-by: Masami Hiramatsu Cc: Amit Shah Cc: Arnd Bergmann Cc: Greg Kroah-Hartm

[Qemu-devel] [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-23 Thread Yoshihiro YUNOMAE
rtio/console: Add splice_write support Yoshihiro YUNOMAE (1): tools: Add guest trace agent as a user tool drivers/char/virtio_console.c | 198 ++-- kernel/trace/trace.c|8 - tools/virtio/virtio-trace/Makefile | 14 + to

[Qemu-devel] [RFC PATCH 1/2] ivring: Add a ring-buffer driver on IVShmem

2012-06-05 Thread Yoshihiro YUNOMAE
uffer like as ftrace and one ring-buffer one CPU will be implemented near the future. Signed-off-by: Yoshihiro YUNOMAE Signed-off-by: Masami Hiramatsu Signed-off-by: Akihiro Nagai Cc: Greg Kroah-Hartman Cc: Ohad Ben-Cohen Cc: Linus Walleij Cc: MyungJoo Ham Cc: Rusty Russell Cc: Joerg Roedel

Re: [Qemu-devel] [RFC PATCH 1/2] ivring: Add a ring-buffer driver on IVShmem

2012-06-05 Thread Yoshihiro YUNOMAE
(2012/06/05 22:10), Borislav Petkov wrote: On Tue, Jun 05, 2012 at 10:01:17PM +0900, Yoshihiro YUNOMAE wrote: This patch adds a ring-buffer driver for IVShmem device, a virtual RAM device in QEMU. This driver can be used as a ring-buffer for kernel logging or tracing of a guest OS by recording

[Qemu-devel] [RFC PATCH 1/2] ivring: Add a ring-buffer driver on IVShmem

2012-06-05 Thread Yoshihiro YUNOMAE
uffer like as ftrace and one ring-buffer one CPU will be implemented near the future. Signed-off-by: Yoshihiro YUNOMAE Signed-off-by: Masami Hiramatsu Signed-off-by: Akihiro Nagai Cc: Greg Kroah-Hartman Cc: Ohad Ben-Cohen Cc: Linus Walleij Cc: MyungJoo Ham Cc: Rusty Russell Cc: Joerg Roedel

[Qemu-devel] [RFC PATCH 2/2] ivring: Add a ring-buffer reader tool

2012-06-05 Thread Yoshihiro YUNOMAE
: ./ivring_reader -m 2 -f /tmp/log.txt -S 10 -N 2 -s /ivshmem In this case, two log files are output as /tmp/log.txt.0 and /tmp/log.txt.1 whose sizes are 10MB. Signed-off-by: Yoshihiro YUNOMAE Signed-off-by: Masami Hiramatsu Signed-off-by: Akihiro Nagai Cc: Borislav Petkov Cc: Arnaldo Carvalho de

[Qemu-devel] [RFC PATCH 0/2] ivring: Add IVRing driver

2012-06-05 Thread Yoshihiro YUNOMAE
el Tracing & Tracing Across Host OS and Guest OS Speakers: Yoshihiro Yunomae and Akihiro Nagai You can download our slides about IVRing in the schedule page. ***Evaluation*** When a host collects tracing data of a guest, the performance of using IVRing is compared with