From: Jan Kara <jack@suse.cz>
To: Curt Wohlgemuth <curtw@google.com>
Cc: Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@infradead.org>,
Wu Fengguang <fengguang.wu@intel.com>,
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: Wed, 31 Aug 2011 00:24:49 +0200 [thread overview]
Message-ID: <20110830222449.GJ16202@quack.suse.cz> (raw)
In-Reply-To: <CAO81RMbyXvz214mTvjEg3NBpJ01JUw8+Goux4NoWZrZ_RCzLrA@mail.gmail.com>
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@suse.cz>
SUSE Labs, CR
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Jan Kara <jack@suse.cz>
To: Curt Wohlgemuth <curtw@google.com>
Cc: Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@infradead.org>,
Wu Fengguang <fengguang.wu@intel.com>,
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: Wed, 31 Aug 2011 00:24:49 +0200 [thread overview]
Message-ID: <20110830222449.GJ16202@quack.suse.cz> (raw)
In-Reply-To: <CAO81RMbyXvz214mTvjEg3NBpJ01JUw8+Goux4NoWZrZ_RCzLrA@mail.gmail.com>
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@suse.cz>
SUSE Labs, CR
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-08-30 22:24 UTC|newest]
Thread overview: 18+ 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 ` Curt Wohlgemuth
2011-08-22 18:38 ` [PATCH 2/3 v3] writeback: Add a 'reason' to wb_writeback_work Curt Wohlgemuth
2011-08-22 18:38 ` Curt Wohlgemuth
2011-08-29 16:23 ` Jan Kara
2011-08-29 16:23 ` Jan Kara
2011-08-29 16:34 ` Jan Kara
2011-08-30 18:06 ` Curt Wohlgemuth
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-22 18:38 ` Curt Wohlgemuth
2011-08-29 16:36 ` Jan Kara
2011-08-29 16:36 ` Jan Kara
2011-08-30 18:13 ` Curt Wohlgemuth
2011-08-30 22:24 ` Jan Kara [this message]
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
2011-08-29 16:21 ` 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=20110830222449.GJ16202@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.