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 from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux