On Mon, Sep 13, 2010 at 04:30:40AM +0800, Michael Rubin wrote: > The kernel already exposes the user desired thresholds in /proc/sys/vm > with dirty_background_ratio and background_ratio. But the kernel may > alter the number requested without giving the user any indication that > is the case. > > Knowing the actual ratios the kernel is honoring can help app developers > understand how their buffered IO will be sent to the disk. > > $ grep threshold /proc/vmstat > nr_dirty_threshold 409111 > nr_dirty_background_threshold 818223 > > Signed-off-by: Michael Rubin <mrubin@xxxxxxxxxx> > --- > include/linux/mmzone.h | 2 ++ > mm/vmstat.c | 4 ++++ > 2 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h > index d0d7454..1e87936 100644 > --- a/include/linux/mmzone.h > +++ b/include/linux/mmzone.h > @@ -106,6 +106,8 @@ enum zone_stat_item { > NR_SHMEM, /* shmem pages (included tmpfs/GEM pages) */ > NR_FILE_DIRTIED, /* accumulated dirty pages */ > NR_WRITTEN, /* accumulated written pages */ > + NR_DIRTY_THRESHOLD, /* writeback threshold */ s/writeback/dirty throttling/ > + NR_DIRTY_BG_THRESHOLD, /* bg writeback threshold */ I have no idea about this interface change. No ACK or NAK. But technical wise, the above two enum items should better be removed to avoid possibly eating one more cache line. The two items can be printed by explicit code. Thanks, Fengguang -- 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