From: KOSAKI Motohiro Subject: Re: [PATCH] vfs: Add a trace point in the mark_inode_dirty function Date: Mon, 29 Nov 2010 14:15:23 +0900 (JST) Message-ID: <20101129141513.82BA.A69D9226@jp.fujitsu.com> References: <20101129103845.82A5.A69D9226@jp.fujitsu.com> <20101128205414.78384a8b@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Cc: kosaki.motohiro@jp.fujitsu.com, Christoph Hellwig , linux-fsdevel@vger.kernel.org, Al Viro , Steven Rostedt To: Arjan van de Ven Return-path: Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:33676 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1749667Ab0K2FP1 (ORCPT ); Mon, 29 Nov 2010 00:15:27 -0500 Received: from m5.gw.fujitsu.co.jp ([10.0.50.75]) by fgwmail7.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id oAT5FPlX029625 for (envelope-from kosaki.motohiro@jp.fujitsu.com); Mon, 29 Nov 2010 14:15:25 +0900 Received: from smail (m5 [127.0.0.1]) by outgoing.m5.gw.fujitsu.co.jp (Postfix) with ESMTP id 0AB3545DE51 for ; Mon, 29 Nov 2010 14:15:25 +0900 (JST) Received: from s5.gw.fujitsu.co.jp (s5.gw.fujitsu.co.jp [10.0.50.95]) by m5.gw.fujitsu.co.jp (Postfix) with ESMTP id DBC3945DE4F for ; Mon, 29 Nov 2010 14:15:24 +0900 (JST) Received: from s5.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s5.gw.fujitsu.co.jp (Postfix) with ESMTP id 95D101DB805B for ; Mon, 29 Nov 2010 14:15:24 +0900 (JST) Received: from ml14.s.css.fujitsu.com (ml14.s.css.fujitsu.com [10.249.87.104]) by s5.gw.fujitsu.co.jp (Postfix) with ESMTP id 3EEB11DB8038 for ; Mon, 29 Nov 2010 14:15:24 +0900 (JST) In-Reply-To: <20101128205414.78384a8b@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > On Mon, 29 Nov 2010 10:41:51 +0900 (JST) > KOSAKI Motohiro wrote: > > > > Signed-of-by: Arjan van de Ven > > > --- > > > fs/fs-writeback.c | 3 +++ > > > include/linux/fs.h | 12 ++++++++++++ > > > include/trace/events/writeback.h | 28 > > > ++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 0 > > > deletions(-) > > > > > > diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c > > > index 3d06ccc..62e33cc 100644 > > > --- a/fs/fs-writeback.c > > > +++ b/fs/fs-writeback.c > > > @@ -952,6 +952,9 @@ void __mark_inode_dirty(struct inode *inode, > > > int flags) if ((inode->i_state & flags) == flags) > > > return; > > > > > > + if (flags & (I_DIRTY_SYNC | I_DIRTY_DATASYNC | > > > I_DIRTY_PAGES)) > > > + trace_writeback_inode_dirty(inode, flags); > > > + > > > > Why can't we move this branch into TP_fast_assign()? > > not really because then the tracepoint is already in process of being > emitted... no way to retract it anymore. I'm not tracing expert. but Steven said we can it in past. (cc him) http://www.spinics.net/lists/linux-ext4/msg20045.html