diff options
author | Yafang Shao <laoar.shao@gmail.com> | 2019-05-13 17:23:11 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-14 09:47:51 -0700 |
commit | 19343b5bdd16ad4ae6b845ef829f68b683c4dfb5 (patch) | |
tree | f6e36441b6b86ea3e4d499ebc35e3e7c9b6bd203 /include/trace/events | |
parent | 60b62ff7cc4217ac3de76535fa4c1510a798dbcb (diff) |
mm/page-writeback: introduce tracepoint for wait_on_page_writeback()
Recently there have been some hung tasks on our server due to
wait_on_page_writeback(), and we want to know the details of this
PG_writeback, i.e. this page is writing back to which device. But it is
not so convenient to get the details.
I think it would be better to introduce a tracepoint for diagnosing the
writeback details.
Link: http://lkml.kernel.org/r/1556274402-19018-1-git-send-email-laoar.shao@gmail.com
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/trace/events')
-rw-r--r-- | include/trace/events/writeback.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index 32db72c7c055..aa7f3aeac740 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h @@ -53,7 +53,7 @@ WB_WORK_REASON struct wb_writeback_work; -TRACE_EVENT(writeback_dirty_page, +DECLARE_EVENT_CLASS(writeback_page_template, TP_PROTO(struct page *page, struct address_space *mapping), @@ -79,6 +79,20 @@ TRACE_EVENT(writeback_dirty_page, ) ); +DEFINE_EVENT(writeback_page_template, writeback_dirty_page, + + TP_PROTO(struct page *page, struct address_space *mapping), + + TP_ARGS(page, mapping) +); + +DEFINE_EVENT(writeback_page_template, wait_on_page_writeback, + + TP_PROTO(struct page *page, struct address_space *mapping), + + TP_ARGS(page, mapping) +); + DECLARE_EVENT_CLASS(writeback_dirty_inode_template, TP_PROTO(struct inode *inode, int flags), |