All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH 03/10 v2] f2fs: add submit_bio tracepoint
Date: Wed, 4 Jan 2017 15:35:06 -0800	[thread overview]
Message-ID: <20170104233506.GC1011@jaegeuk.local> (raw)
In-Reply-To: <20161230185117.3832-3-jaegeuk@kernel.org>

Change log from v1:
 - remove F2FS_OP
 - share single tracing structure, f2fs__bio
 - split f2fs_prepare_read/write_io and f2fs_submit_read/write_io

>From f5c6ab0f19fb627ebf28ab6a18c0a32b4c8f914f Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <jaegeuk@kernel.org>
Date: Wed, 21 Dec 2016 12:13:03 -0800
Subject: [PATCH] f2fs: add submit_bio tracepoint

This patch adds final submit_bio() tracepoint.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/data.c              | 12 ++++++++----
 include/trace/events/f2fs.h | 45 ++++++++++++++++++++++++++++++---------------
 2 files changed, 38 insertions(+), 19 deletions(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 2c5df1dc1479..a06b2d187aec 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -175,6 +175,10 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
 			current->plug && (type == DATA || type == NODE))
 			blk_finish_plug(current->plug);
 	}
+	if (is_read_io(bio_op(bio)))
+		trace_f2fs_submit_read_bio(sbi->sb, type, bio);
+	else
+		trace_f2fs_submit_write_bio(sbi->sb, type, bio);
 	submit_bio(bio);
 }
 
@@ -185,12 +189,12 @@ static void __submit_merged_bio(struct f2fs_bio_info *io)
 	if (!io->bio)
 		return;
 
+	bio_set_op_attrs(io->bio, fio->op, fio->op_flags);
+
 	if (is_read_io(fio->op))
-		trace_f2fs_submit_read_bio(io->sbi->sb, fio, io->bio);
+		trace_f2fs_prepare_read_bio(io->sbi->sb, fio->type, io->bio);
 	else
-		trace_f2fs_submit_write_bio(io->sbi->sb, fio, io->bio);
-
-	bio_set_op_attrs(io->bio, fio->op, fio->op_flags);
+		trace_f2fs_prepare_write_bio(io->sbi->sb, fio->type, io->bio);
 
 	__submit_bio(io->sbi, io->bio, fio->type);
 	io->bio = NULL;
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 4c942599581b..04c527410ecc 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -784,12 +784,11 @@ DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_mbio,
 	TP_CONDITION(page->mapping)
 );
 
-DECLARE_EVENT_CLASS(f2fs__submit_bio,
+DECLARE_EVENT_CLASS(f2fs__bio,
 
-	TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio,
-						struct bio *bio),
+	TP_PROTO(struct super_block *sb, int type, struct bio *bio),
 
-	TP_ARGS(sb, fio, bio),
+	TP_ARGS(sb, type, bio),
 
 	TP_STRUCT__entry(
 		__field(dev_t,	dev)
@@ -802,9 +801,9 @@ DECLARE_EVENT_CLASS(f2fs__submit_bio,
 
 	TP_fast_assign(
 		__entry->dev		= sb->s_dev;
-		__entry->op		= fio->op;
-		__entry->op_flags	= fio->op_flags;
-		__entry->type		= fio->type;
+		__entry->op		= bio_op(bio);
+		__entry->op_flags	= bio->bi_opf;
+		__entry->type		= type;
 		__entry->sector		= bio->bi_iter.bi_sector;
 		__entry->size		= bio->bi_iter.bi_size;
 	),
@@ -817,22 +816,38 @@ DECLARE_EVENT_CLASS(f2fs__submit_bio,
 		__entry->size)
 );
 
-DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_write_bio,
+DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_prepare_write_bio,
+
+	TP_PROTO(struct super_block *sb, int type, struct bio *bio),
+
+	TP_ARGS(sb, type, bio),
+
+	TP_CONDITION(bio)
+);
+
+DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_prepare_read_bio,
+
+	TP_PROTO(struct super_block *sb, int type, struct bio *bio),
+
+	TP_ARGS(sb, type, bio),
+
+	TP_CONDITION(bio)
+);
+
+DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_submit_read_bio,
 
-	TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio,
-							struct bio *bio),
+	TP_PROTO(struct super_block *sb, int type, struct bio *bio),
 
-	TP_ARGS(sb, fio, bio),
+	TP_ARGS(sb, type, bio),
 
 	TP_CONDITION(bio)
 );
 
-DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_read_bio,
+DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_submit_write_bio,
 
-	TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio,
-							struct bio *bio),
+	TP_PROTO(struct super_block *sb, int type, struct bio *bio),
 
-	TP_ARGS(sb, fio, bio),
+	TP_ARGS(sb, type, bio),
 
 	TP_CONDITION(bio)
 );
-- 
2.11.0

  parent reply	other threads:[~2017-01-04 23:35 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-30 18:51 [PATCH 01/10] f2fs: reassign new segment for mode=lfs Jaegeuk Kim
2016-12-30 18:51 ` [PATCH 02/10] f2fs: fix wrong tracepoints for op and op_flags Jaegeuk Kim
2017-01-04  3:25   ` Chao Yu
2017-01-04  3:25     ` [f2fs-dev] " Chao Yu
2016-12-30 18:51 ` [PATCH 03/10] f2fs: add submit_bio tracepoint Jaegeuk Kim
2016-12-30 18:51   ` Jaegeuk Kim
2017-01-04  3:32   ` [f2fs-dev] " Chao Yu
2017-01-04  3:32     ` Chao Yu
2017-01-04 23:35   ` Jaegeuk Kim [this message]
2017-01-12 11:07     ` [PATCH 03/10 v2] " Chao Yu
2017-01-12 11:07       ` Chao Yu
2017-01-12 11:07       ` Chao Yu
2016-12-30 18:51 ` [PATCH 04/10] f2fs: support IO alignment for DATA and NODE writes Jaegeuk Kim
2016-12-30 18:51   ` Jaegeuk Kim
2017-01-04  8:23   ` [f2fs-dev] " Chao Yu
2017-01-04  8:23     ` Chao Yu
2017-01-04 23:44     ` Jaegeuk Kim
2017-01-04 23:44       ` [f2fs-dev] " Jaegeuk Kim
2017-01-12 11:15       ` Chao Yu
2017-01-12 11:15         ` Chao Yu
2016-12-30 18:51 ` [PATCH 05/10] f2fs: get io size bit from mount option Jaegeuk Kim
2016-12-30 18:51   ` Jaegeuk Kim
2016-12-30 18:51 ` [PATCH 06/10] f2fs: show the max number of atomic operations Jaegeuk Kim
2016-12-30 18:51   ` Jaegeuk Kim
2017-01-04  8:45   ` Chao Yu
2017-01-04  8:45     ` Chao Yu
2017-01-04 23:50   ` [PATCH 06/10 v2] " Jaegeuk Kim
2017-01-12 11:15     ` Chao Yu
2017-01-12 11:15       ` Chao Yu
2017-01-12 11:15       ` Chao Yu
2016-12-30 18:51 ` [PATCH 07/10] f2fs: don't allow encrypted operations without keys Jaegeuk Kim
2016-12-30 18:51   ` Jaegeuk Kim
2017-01-04  8:56   ` Chao Yu
2017-01-04  8:56     ` [f2fs-dev] " Chao Yu
2016-12-30 18:51 ` [PATCH 08/10] f2fs: relax async discard commands more Jaegeuk Kim
2016-12-30 18:51   ` Jaegeuk Kim
2017-01-04  9:29   ` [f2fs-dev] " Chao Yu
2017-01-04  9:29     ` Chao Yu
2017-01-05  3:19     ` Chao Yu
2017-01-05  3:19       ` Chao Yu
2017-01-05  8:17       ` Chao Yu
2017-01-05  8:17         ` [f2fs-dev] " Chao Yu
2017-01-05 19:59         ` Jaegeuk Kim
2017-01-05 19:59           ` [f2fs-dev] " Jaegeuk Kim
2017-01-05 19:46       ` Jaegeuk Kim
2017-01-06  2:06         ` Chao Yu
2017-01-06  2:06           ` Chao Yu
2017-01-06  2:42           ` Jaegeuk Kim
2017-01-06  2:42             ` [f2fs-dev] " Jaegeuk Kim
2017-01-06  3:32             ` Chao Yu
2017-01-06  3:32               ` Chao Yu
2017-02-22  7:23             ` Chao Yu
2017-02-22  7:23               ` Chao Yu
2017-02-22  7:23               ` Chao Yu
2017-02-22 21:15               ` Jaegeuk Kim
2017-02-22 21:15                 ` [f2fs-dev] " Jaegeuk Kim
2017-02-23  2:08                 ` Chao Yu
2017-02-23  2:08                   ` [f2fs-dev] " Chao Yu
2017-02-23  2:42                   ` Jaegeuk Kim
2017-02-23  2:42                     ` [f2fs-dev] " Jaegeuk Kim
2016-12-30 18:51 ` [PATCH 09/10] f2fs: avoid needless checkpoint in f2fs_trim_fs Jaegeuk Kim
2016-12-30 18:51   ` Jaegeuk Kim
2017-02-22  7:23   ` Chao Yu
2017-02-22  7:23     ` [f2fs-dev] " Chao Yu
2016-12-30 18:51 ` [PATCH 10/10] f2fs: return fs_trim if there is no candidate Jaegeuk Kim
2016-12-30 18:51   ` Jaegeuk Kim
2017-02-22  7:23   ` Chao Yu
2017-02-22  7:23     ` [f2fs-dev] " Chao Yu
2017-02-22 21:26     ` Jaegeuk Kim
2017-02-22 21:26       ` [f2fs-dev] " Jaegeuk Kim
2017-02-23  2:12       ` Chao Yu
2017-02-23  2:12         ` [f2fs-dev] " Chao Yu
2017-02-23  2:47         ` Jaegeuk Kim
2017-02-23  2:47           ` [f2fs-dev] " Jaegeuk Kim
2017-01-04  3:24 ` [f2fs-dev] [PATCH 01/10] f2fs: reassign new segment for mode=lfs Chao Yu
2017-01-04  3:24   ` Chao Yu
2017-01-04 22:48   ` Jaegeuk Kim
2017-01-12 11:03     ` Chao Yu
2017-01-12 11:03       ` 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=20170104233506.GC1011@jaegeuk.local \
    --to=jaegeuk@kernel.org \
    --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 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.