From: Jan Kara <jack@suse.cz>
To: Curt Wohlgemuth <curtw@google.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Wu Fengguang <fengguang.wu@intel.com>, Jan Kara <jack@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Dave Chinner <david@fromorbit.com>,
Michael Rubin <mrubin@google.com>,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 3/3 v3] writeback: Add writeback stats for pages written
Date: Mon, 29 Aug 2011 18:36:45 +0200 [thread overview]
Message-ID: <20110829163645.GG5672@quack.suse.cz> (raw)
In-Reply-To: <1314038327-22645-3-git-send-email-curtw@google.com>
On Mon 22-08-11 11:38:47, Curt Wohlgemuth wrote:
> Add a new file, /proc/writeback, which displays
> machine global data for how many pages were cleaned for
> which reasons.
I'm not sure about the placement in /proc/writeback - maybe I'd be
happier if it was somewhere under /sys/kernel/debug but I don't really have
a better suggestion and I don't care that much either. Maybe Christoph or
Andrew have some idea?
...
> diff --git a/include/linux/writeback.h b/include/linux/writeback.h
> index bdda069..5168ac9 100644
> --- a/include/linux/writeback.h
> +++ b/include/linux/writeback.h
> @@ -59,6 +59,7 @@ enum wb_reason {
> WB_REASON_TRY_TO_FREE_PAGES,
> WB_REASON_SYNC,
> WB_REASON_PERIODIC,
> + WB_REASON_FDATAWRITE,
> WB_REASON_LAPTOP_TIMER,
> WB_REASON_FREE_MORE_MEM,
> WB_REASON_FS_FREE_SPACE,
> @@ -67,6 +68,7 @@ enum wb_reason {
> WB_REASON_MAX,
> };
>
> +
The additional empty line doesn't make much sense here?
> /*
> * A control structure which tells the writeback code what to do. These are
> * always on the stack, and hence need no locking. They are always initialised
> diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> index 474bcfe..6613391 100644
> --- a/mm/backing-dev.c
> +++ b/mm/backing-dev.c
...
> @@ -56,9 +60,77 @@ void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2)
> }
> }
>
> +
And another empty line here?
> +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.
> @@ -157,6 +248,7 @@ static inline void bdi_debug_unregister(struct backing_dev_info *bdi)
> }
> #endif
>
> +
Another empty line here? You seem to like them ;)
> static ssize_t read_ahead_kb_store(struct device *dev,
> struct device_attribute *attr,
> const char *buf, size_t count)
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2011-08-29 16:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-22 18:38 [PATCH 1/3] writeback: send work item to queue_io, move_expired_inodes Curt Wohlgemuth
2011-08-22 18:38 ` [PATCH 2/3 v3] writeback: Add a 'reason' to wb_writeback_work Curt Wohlgemuth
2011-08-29 16:23 ` Jan Kara
2011-08-29 16:34 ` Jan Kara
2011-08-30 18:06 ` Curt Wohlgemuth
2011-08-22 18:38 ` [PATCH 3/3 v3] writeback: Add writeback stats for pages written Curt Wohlgemuth
2011-08-29 16:36 ` Jan Kara [this message]
2011-08-30 18:13 ` Curt Wohlgemuth
2011-08-30 22:24 ` Jan Kara
2011-08-29 16:21 ` [PATCH 1/3] writeback: send work item to queue_io, move_expired_inodes Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110829163645.GG5672@quack.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=curtw@google.com \
--cc=david@fromorbit.com \
--cc=fengguang.wu@intel.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mrubin@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).