FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 02-05-2010, 08:48 AM
Christoph Hellwig
 
Default gfs2: add IO submission trace points

On Fri, Feb 05, 2010 at 09:49:54AM +0000, Steven Whitehouse wrote:
> Hi,
>
> On Fri, 2010-02-05 at 16:45 +1100, Dave Chinner wrote:
> > Useful for tracking down where specific IOs are being issued
> > from.
> >
> > Signed-off-by: Dave Chinner <dchinner@redhat.com>
> > ---
> > fs/gfs2/log.c | 6 ++++++
> > fs/gfs2/lops.c | 6 ++++++
> > fs/gfs2/trace_gfs2.h | 41 +++++++++++++++++++++++++++++++++++++++++
> > 3 files changed, 53 insertions(+), 0 deletions(-)
> >
> > diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
> > index 4511b08..bd26dff 100644
> > --- a/fs/gfs2/log.c
> > +++ b/fs/gfs2/log.c
> > @@ -121,6 +121,7 @@ __acquires(&sdp->sd_log_lock)
> > lock_buffer(bh);
> > if (test_clear_buffer_dirty(bh)) {
> > bh->b_end_io = end_buffer_write_sync;
> > + trace_gfs2_submit_bh(bh, WRITE_SYNC_PLUG, __func__);
> > submit_bh(WRITE_SYNC_PLUG, bh);
> This looks like it could be a generically useful function, I wonder if
> it would be possible to do this directly in submit_bh, since we should
> be able to use __builtin_return_address(0) to find out the origin of the
> call?

Yes, we could. The tracing code normally uses the _RET_IP_ wrapper
for __builtin_return_address(0) for some reason, though.
 

Thread Tools




All times are GMT. The time now is 12:35 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org