From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH 03/12] gfs2: enhance log_blocks trace point to show log blocks free
Date: Fri, 21 Aug 2020 12:33:28 -0500 [thread overview]
Message-ID: <20200821173337.20377-4-rpeterso@redhat.com> (raw)
In-Reply-To: <20200821173337.20377-1-rpeterso@redhat.com>
This patch adds some code to enhance the log_blocks trace point. It
reports the number of free log blocks. This makes the trace point much
more useful, especially for debugging performance problems when we can
tell when the journal gets full and needs to wait for flushes, etc.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
fs/gfs2/trace_gfs2.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/gfs2/trace_gfs2.h b/fs/gfs2/trace_gfs2.h
index e0025258107a..fe140ceef74d 100644
--- a/fs/gfs2/trace_gfs2.h
+++ b/fs/gfs2/trace_gfs2.h
@@ -388,15 +388,17 @@ TRACE_EVENT(gfs2_log_blocks,
TP_STRUCT__entry(
__field( dev_t, dev )
__field( int, blocks )
+ __field( int, blks_free )
),
TP_fast_assign(
__entry->dev = sdp->sd_vfs->s_dev;
__entry->blocks = blocks;
+ __entry->blks_free = atomic_read(&sdp->sd_log_blks_free);
),
- TP_printk("%u,%u log reserve %d", MAJOR(__entry->dev),
- MINOR(__entry->dev), __entry->blocks)
+ TP_printk("%u,%u log reserve %d %d", MAJOR(__entry->dev),
+ MINOR(__entry->dev), __entry->blocks, __entry->blks_free)
);
/* Writing back the AIL */
--
2.26.2
next prev parent reply other threads:[~2020-08-21 17:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 17:33 [Cluster-devel] [GFS2 PATCH 00/12] gfs2: jdata patch collection revisited Bob Peterson
2020-08-21 17:33 ` [Cluster-devel] [GFS2 PATCH 01/12] gfs2: rename gfs2_write_full_page to gfs2_write_jdata_page, remove parm Bob Peterson
2020-08-21 17:33 ` [Cluster-devel] [GFS2 PATCH 02/12] gfs2: add missing log_blocks trace points in gfs2_write_revokes Bob Peterson
2020-08-21 17:33 ` Bob Peterson [this message]
2020-08-21 17:33 ` [Cluster-devel] [GFS2 PATCH 04/12] gfs2: Wipe jdata and ail1 in gfs2_journal_wipe, formerly gfs2_meta_wipe Bob Peterson
2020-08-21 17:33 ` [Cluster-devel] [GFS2 PATCH 05/12] gfs2: Calculate number of revokes during evict Bob Peterson
2020-08-27 6:00 ` Andreas Gruenbacher
2020-08-21 17:33 ` [Cluster-devel] [GFS2 PATCH 06/12] gfs2: Create transaction for inodes with i_nlink != 0 Bob Peterson
2020-08-27 6:00 ` Andreas Gruenbacher
2020-08-27 7:41 ` Steven Whitehouse
2020-08-27 13:00 ` Bob Peterson
2020-08-21 17:33 ` [Cluster-devel] [GFS2 PATCH 07/12] gfs2: make gfs2_ail1_empty_one return the count of active items Bob Peterson
2020-08-27 6:00 ` Andreas Gruenbacher
2020-08-27 16:45 ` Bob Peterson
2020-08-21 17:33 ` [Cluster-devel] [GFS2 PATCH 08/12] gfs2: don't lock sd_ail_lock in gfs2_releasepage Bob Peterson
2020-08-21 17:33 ` [Cluster-devel] [GFS2 PATCH 09/12] gfs2: Only set PageChecked if we have a transaction Bob Peterson
2020-08-21 17:33 ` [Cluster-devel] [GFS2 PATCH 10/12] gfs2: simplify gfs2_block_map Bob Peterson
2020-08-21 17:33 ` [Cluster-devel] [GFS2 PATCH 11/12] gfs2: Ignore journal log writes for jdata holes Bob Peterson
2020-08-21 17:33 ` [Cluster-devel] [GFS2 PATCH 12/12] gfs2: add some much needed cleanup for log flushes that fail Bob Peterson
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=20200821173337.20377-4-rpeterso@redhat.com \
--to=rpeterso@redhat.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 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).