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

From: Masami Hiramatsu
Date: Mon Jul 23 2012 - 23:27:27 EST


(2012/07/24 11:36), Yoshihiro YUNOMAE wrote:
> Therefore, we propose a new system "virtio-trace", which uses enhanced
> virtio-serial and existing ring-buffer of ftrace, for collecting guest kernel
> tracing data. In this system, there are 5 main components:
> (1) Ring-buffer of ftrace in a guest
> - When trace agent reads ring-buffer, a page is removed from ring-buffer.
> (2) Trace agent in the guest
> - Splice the page of ring-buffer to read_pipe using splice() without
> memory copying. Then, the page is spliced from write_pipe to virtio
> without memory copying.
> (3) Virtio-console driver in the guest
> - Pass the page to virtio-ring
> (4) Virtio-serial bus in QEMU
> - Copy the page to kernel pipe
> (5) Reader in the host
> - Read guest tracing data via FIFO(named pipe)

So, this is our answer for the argued points in previous thread.
This virtio-serial and ftrace enhancements doesn't introduce new
"ringbuffer" in the kernel, and just use virtio's ringbuffer.
Also, using splice gives us a great advantage in the performance
because of copy-less trace-data transfer.

Actually, one copy should occur in the host (to write it into the pipe),
because removing physical pages of the guest is hard to track and may
involve a TLB flush per page, even if it is done in background.

Thank you,

--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@xxxxxxxxxxx


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/