[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121121035924.GO2591@dastard>
Date: Wed, 21 Nov 2012 14:59:24 +1100
From: Dave Chinner <david@...morbit.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Robert Jarzmik <robert.jarzmik@...e.fr>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] mm: trace filemap add and del
On Tue, Nov 20, 2012 at 03:57:35PM -0800, Andrew Morton wrote:
> On Thu, 8 Nov 2012 20:54:10 +0100
> Robert Jarzmik <robert.jarzmik@...e.fr> wrote:
.....
> > + __field(dev_t, s_dev)
>
> Perhaps use super_block.s_id here
>
> > + ),
> > +
> > + TP_fast_assign(
> > + __entry->page = page;
> > + __entry->i_no = page->mapping->host->i_ino;
> > + __entry->pageofs = page->index;
> > + if (page->mapping->host->i_sb)
> > + __entry->s_dev = page->mapping->host->i_sb->s_dev;
> > + else
> > + __entry->s_dev = page->mapping->host->i_rdev;
>
> and hence avoid all this stuff.
We actually have an informal convention for formating filesystem
trace events, and that is to use the device number....
>
> > + ),
> > +
> > + TP_printk("page=%p pfn=%lu blk=%d:%d inode+ofs=%lu+%lu",
... and to prefix messages like:
TP_printk("dev %d:%d ino 0x%llx ....
MAJOR(__entry->dev), MINOR(__entry->dev),
i.e. the start of the event message has all the identifying
information where it is easy to grep for and get all the events for
a specific dev/inode combination without even having to think about
it.
XFS, ext3/4, jbd/jdb2 and gfs2 follow this convention, so we should
keep propagating that pattern in the name of consistency, rather
than having different trace formats for different parts of the
VFS/FS layers...
Cheers,
Dave.
--
Dave Chinner
david@...morbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists