Re: [PATCH 3/3 v3] writeback: Add writeback stats for pages written

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 30-08-11 11:13:50, Curt Wohlgemuth wrote:
> Hi Jan:
> 
> >> +static const char *wb_stats_labels[WB_REASON_MAX] = {
> >> +     [WB_REASON_BALANCE_DIRTY] = "page: balance_dirty_pages",
> >> +     [WB_REASON_BACKGROUND] = "page: background_writeout",
> >> +     [WB_REASON_TRY_TO_FREE_PAGES] = "page: try_to_free_pages",
> >> +     [WB_REASON_SYNC] = "page: sync",
> >> +     [WB_REASON_PERIODIC] = "page: periodic",
> >> +     [WB_REASON_FDATAWRITE] = "page: fdatawrite",
> >> +     [WB_REASON_LAPTOP_TIMER] = "page: laptop_periodic",
> >> +     [WB_REASON_FREE_MORE_MEM] = "page: free_more_memory",
> >> +     [WB_REASON_FS_FREE_SPACE] = "page: fs_free_space",
> >> +};
> >  I don't think it's good to have two enum->string translation tables for
> > reasons. That's prone to errors which is in fact proven by the fact that
> > you ommitted FORKER_THREAD reason here.
> 
> Ah, thanks for catching the omitted reason.  I assume you mean the
> table above, and
> 
>    +#define show_work_reason(reason)
> 
> from the patch 2/3 (in the trace events file).  Hmm, that could be a
> challenge, given the limitations on what you can do in trace macros.
> I'll think on this though.
  Ah right, with trace points it's not so simple. I guess we could have
an array with labels as a global symbol and dereference it in tracepoints.

								Honza
-- 
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  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: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]