[Virtio-fs] [PATCH 0/2][RFC] virtio-fs: Add some tracepoints

Masayoshi Mizuma msys.mizuma at gmail.com
Mon Aug 12 18:50:41 UTC 2019


Hi Stefan,

On Wed, Aug 07, 2019 at 02:28:36PM +0100, Stefan Hajnoczi wrote:
> On Mon, Jul 29, 2019 at 05:34:29PM -0400, Masayoshi Mizuma wrote:
> > From: Masayoshi Mizuma <m.mizuma at jp.fujitsu.com>
> > 
> > This patch series introduce some tracepoints. It will be
> > useful to debug the I/O request flow.
> > 
> > New trace events:
> > 
> >   - virtiofs_request_dispatched
> >   - virtiofs_request_done
> >   - virtiofs_hiprio_request_dispatched
> >   - virtiofs_hiprio_request_done
> > 
> > Above trace events is added to the following functions as
> > the tracepoints:
> > 
> >   - virtio_fs_enqueue_req
> >   - virtio_fs_requests_done_work
> >   - virtio_fs_hiprio_dispatch_work
> >   - virtio_fs_hiprio_done_work
> > 
> > Example of the trace record:
> > 
> >   cat-1420       [002] .... 34.687462: virtiofs_request_dispatched: opcode
> >       FUSE_READ unique 0x1a nodeid 0x2 in.len 80 flags ISREPLY|WAITING|SENT
> >       notify 1
> >   kworker/4:1-67 [004] .... 34.687531: virtiofs_request_done: opcode FUSE_READ
> >       unique 0x1a nodeid 0x2 in.len 80 flags ISREPLY|WAITING
> > 
> > Masayoshi Mizuma (2):
> >   add ftrace events
> >   add tracepoints
> > 
> >  fs/fuse/virtio_fs.c             |  21 ++++
> >  include/trace/events/virtiofs.h | 195 ++++++++++++++++++++++++++++++++
> >  2 files changed, 216 insertions(+)
> >  create mode 100644 include/trace/events/virtiofs.h
> 
> Looks good.  Two suggestions although I don't have a strong opinion:
> 
> 1. Please use "virtio_fs" instead of "virtiofs" for consistency with the
>    existing kernel code.

OK, I use virtio_fs.

> 
> 2. Please consider adding generic fuse.ko trace events for the request
>    lifecycle so both traditional FUSE and virtio-fs can benefit.  The
>    argument against this is that your patches correspond more closely to
>    virtqueue activity than tracepoints in the shared FUSE code, but I
>    wanted to mention the idea.

Yeah, it's a good idea to add generic fuse.ko trace events.

Thanks!
Masa




More information about the Virtio-fs mailing list