From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
To: Chao Yu <chao2.yu@samsung.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH 6/6] f2fs: add a tracepoint for f2fs_read_data_pages
Date: Wed, 07 May 2014 09:29:52 +0900 [thread overview]
Message-ID: <1399422592.13268.15.camel@kjgkr> (raw)
In-Reply-To: <004801cf6908$e2149bd0$a63dd370$@samsung.com>
Hi Chao,
2014-05-06 (화), 16:54 +0800, Chao Yu:
> This patch adds a tracepoint for f2fs_read_data_pages to trace when pages are
> readahead by VFS.
>
> Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> ---
> fs/f2fs/data.c | 3 +++
> include/trace/events/f2fs.h | 26 ++++++++++++++++++++++++++
> 2 files changed, 29 insertions(+)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index 8c250a5..f2d1e8a 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -729,6 +729,9 @@ static int f2fs_read_data_pages(struct file *file,
> struct list_head *pages, unsigned nr_pages)
> {
> struct inode *inode = file->f_mapping->host;
> + struct page *page = list_entry(pages->prev, struct page, lru);
IMO, it needs to avoid the above line.
Thanks,
> +
> + trace_f2fs_readpages(inode, page, nr_pages);
>
> /* If the file has inline data, skip readpages */
> if (f2fs_has_inline_data(inode))
> diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
> index b983990..7fbaaaa 100644
> --- a/include/trace/events/f2fs.h
> +++ b/include/trace/events/f2fs.h
> @@ -847,6 +847,32 @@ TRACE_EVENT(f2fs_writepages,
> __entry->for_sync)
> );
>
> +TRACE_EVENT(f2fs_readpages,
> +
> + TP_PROTO(struct inode *inode, struct page *page, unsigned int nrpage),
> +
> + TP_ARGS(inode, page, nrpage),
> +
> + TP_STRUCT__entry(
> + __field(dev_t, dev)
> + __field(ino_t, ino)
> + __field(pgoff_t, start)
> + __field(unsigned int, nrpage)
> + ),
> +
> + TP_fast_assign(
> + __entry->dev = inode->i_sb->s_dev;
> + __entry->ino = inode->i_ino;
> + __entry->start = page->index;
> + __entry->nrpage = nrpage;
> + ),
> +
> + TP_printk("dev = (%d,%d), ino = %lu, start = %lu nrpage = %u",
> + show_dev_ino(__entry),
> + (unsigned long)__entry->start,
> + __entry->nrpage)
> +);
> +
> TRACE_EVENT(f2fs_submit_page_mbio,
>
> TP_PROTO(struct page *page, int rw, int type, block_t blk_addr),
--
Jaegeuk Kim
Samsung
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2014-05-07 0:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-06 8:54 [f2fs-dev][PATCH 6/6] f2fs: add a tracepoint for f2fs_read_data_pages Chao Yu
2014-05-07 0:29 ` Jaegeuk Kim [this message]
2014-05-08 8:58 ` Chao Yu
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=1399422592.13268.15.camel@kjgkr \
--to=jaegeuk.kim@samsung.com \
--cc=chao2.yu@samsung.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).