lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1399422592.13268.15.camel@kjgkr>
Date:	Wed, 07 May 2014 09:29:52 +0900
From:	Jaegeuk Kim <jaegeuk.kim@...sung.com>
To:	Chao Yu <chao2.yu@...sung.com>
Cc:	linux-f2fs-devel@...ts.sourceforge.net,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [f2fs-dev][PATCH 6/6] f2fs: add a tracepoint for
 f2fs_read_data_pages

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@...sung.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

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ