From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH 2/3 v3] writeback: Add a 'reason' to wb_writeback_work Date: Mon, 29 Aug 2011 18:34:25 +0200 Message-ID: <20110829163425.GF5672@quack.suse.cz> References: <1314038327-22645-1-git-send-email-curtw@google.com> <1314038327-22645-2-git-send-email-curtw@google.com> <20110829162313.GE5672@quack.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Wu Fengguang , Jan Kara , Andrew Morton , Dave Chinner , Michael Rubin , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org To: Curt Wohlgemuth Return-path: Content-Disposition: inline In-Reply-To: <20110829162313.GE5672@quack.suse.cz> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Mon 29-08-11 18:23:13, Jan Kara wrote: > On Mon 22-08-11 11:38:46, Curt Wohlgemuth wrote: > > This creates a new 'reason' field in a wb_writeback_work > > structure, which unambiguously identifies who initiates > > writeback activity. A 'wb_reason' enumeration has been > > added to writeback.h, to enumerate the possible reasons. > > > > The 'writeback_work_class' and tracepoint event class and > > 'writeback_queue_io' tracepoints are updated to include the > > symbolic 'reason' in all trace events. > > > > And the 'writeback_inodes_sbXXX' family of routines has had > > a wb_stats parameter added to them, so callers can specify > > why writeback is being started. > Looks good. You can add: Acked-by: Jan Kara Oh, one small typo correction: > > +#define show_work_reason(reason) \ > > + __print_symbolic(reason, \ > > + {WB_REASON_BALANCE_DIRTY, "balance_dirty"}, \ > > + {WB_REASON_BACKGROUND, "background"}, \ > > + {WB_REASON_TRY_TO_FREE_PAGES, "try_to_free_pages"}, \ > > + {WB_REASON_SYNC, "sync"}, \ > > + {WB_REASON_PERIODIC, "periodic"}, \ > > + {WB_REASON_LAPTOP_TIMER, "laptop_timer"}, \ > > + {WB_REASON_FREE_MORE_MEM, "free_more_memory"}, \ > > + {WB_REASON_FS_FREE_SPACE, "FS_free_space"}, \ ^^ should be in non-capital letters? > > + {WB_REASON_FORKER_THREAD, "forker_thread"} \ > > + ) Honza -- Jan Kara SUSE Labs, CR -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org