[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100913031524.GD7697@localhost>
Date: Mon, 13 Sep 2010 11:15:24 +0800
From: Wu Fengguang <fengguang.wu@...el.com>
To: Michael Rubin <mrubin@...gle.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"jack@...e.cz" <jack@...e.cz>, "riel@...hat.com" <riel@...hat.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"david@...morbit.com" <david@...morbit.com>,
"kosaki.motohiro@...fujitsu.com" <kosaki.motohiro@...fujitsu.com>,
"npiggin@...nel.dk" <npiggin@...nel.dk>, "hch@....de" <hch@....de>,
"axboe@...nel.dk" <axboe@...nel.dk>
Subject: Re: [PATCH 5/5] writeback: Reporting dirty thresholds in
/proc/vmstat
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@...gle.com>
> ---
> 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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists