(cc'ing Vivek and Jens) On Wed, Jun 26, 2013 at 12:26:10PM -0700, Anatol Pomozov wrote: > @@ -548,6 +548,9 @@ u64 __blkg_prfill_u64(struct seq_file *sf, struct blkg_policy_data *pd, u64 v) > if (!dname) > return 0; > > + if (!v) > + return 0; > + I don't think it'd be a good idea to filter out 0 by default from __blkg_prfill_u64(). It'd probably be a better idea to do the filtering from the users of __blkg_prfill_u64(). Would that be a lot more churn? > @@ -571,19 +574,23 @@ u64 __blkg_prfill_rwstat(struct seq_file *sf, struct blkg_policy_data *pd, > [BLKG_RWSTAT_ASYNC] = "Async", > }; > const char *dname = blkg_dev_name(pd->blkg); > - u64 v; > + u64 total; > int i; > > if (!dname) > return 0; > > + total = rwstat->cnt[BLKG_RWSTAT_READ] + rwstat->cnt[BLKG_RWSTAT_WRITE]; > + /* skip devices with no activity */ > + if (!total) > + return 0; > + Doing it from rwstat is fine as it's always printing "stats" and suppressing 0 stats by default should be fine, I think. Can you please update the function comment accordingly tho? Vivek, any objections? Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe cgroups" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html